1、所有列表的展示图的格式为aspectFill

2、分类页面的活动列表的发布者名的省略
This commit is contained in:
wangzimeng 2025-08-11 16:26:20 +08:00
parent f8ef0a190c
commit 102480ea99
5 changed files with 1136 additions and 1133 deletions

View File

@ -28,7 +28,7 @@
</view>
<span class="line"></span>
<view style="margin:30rpx;" class="flex" @click="toDetail(item.id, item.order_no, item.status)">
<image class="tut" :src="item.detail.images[0]"></image>
<image class="tut" :src="item.detail.images[0]" mode="aspectFill"></image>
<view style="margin-left: 20rpx;width: 80%;">
<view>
<span style="font-weight: 600;">{{ item.detail.title }}</span>

View File

@ -43,10 +43,10 @@
<view class="item-img">
<image v-if="item.images.length>0"
style="width: 170rpx;height: 170rpx;border-radius: 20rpx;" :src="item.images[0]"
mode=""></image>
mode="aspectFill"></image>
<image v-else style="width: 170rpx;height: 170rpx;border-radius: 20rpx;"
src="https://naweigetetest2.hschool.com.cn/miniapp/invoice/draftImgNo.png"
mode=""></image>
mode="aspectFill"></image>
</view>
<view class="item-con">
<view class="itenCon-actName" style="">{{item.title !='' ? item.title:'描述待补充' }}
@ -134,7 +134,7 @@
<view class="imgs_con_div"
v-for="(items_img, index) in item.images.slice(0, 3)" :key="index">
<image class="imgs_con" :src="items_img"></image>
<image class="imgs_con" :src="items_img" mode="aspectFill"></image>
</view>
</view>

View File

@ -42,12 +42,12 @@
</image>
<image v-else :src="item.headimage"
style="width: 36rpx;height: 36rpx;border-radius: 80rpx;"></image>
<span v-if="cate_ids != 1"
style="color: #9C9C9C;margin-left: 10rpx;">{{ item.user.nickname }}</span>
<span v-else
style="color: #9C9C9C;margin-left: 10rpx;">{{ item.teacher.name }}</span>
<view>
<span style="color:#0CA013;margin-left: 20rpx;"
<span v-if="cate_ids != 1" class="white-space"
style="color: #9C9C9C;margin-left: 10rpx;width: 192rpx;">{{ item.user.nickname }}</span>
<span v-else class="white-space"
style="color: #9C9C9C;margin-left: 10rpx;width: 192rpx;">{{ item.teacher.name }}</span>
<view class="white-space" style="width: 43%;">
<span style="color:#0CA013;margin-left: 10rpx;"
v-for="items_t in item.classes_cate.slice(0, 1)">#{{ items_t}}</span>
</view>
</view>
@ -56,10 +56,10 @@
<view class="time flex align-items white-space">
<!-- <span class="time_tex" v-if="item.status == 2">{{ '报名中' }}</span> -->
<!-- <span class="time_tex time_texs" v-if="item.status == 4">{{ '进行中' }}</span> -->
<span style="margin-right:20rpx;">{{ dateWeeks(item.start_time) }}</span><span
<span style="margin-right:12rpx;">{{ dateWeeks(item.start_time) }}</span><span
style="width: 1rpx;height: 22rpx;background: #323232;"></span>
<span class="white-space"
style="margin-left: 20rpx;width: 260rpx;">{{ item.address }}{{ item.address_detail }}</span>
style="margin-left: 12rpx;width: 260rpx;">{{ item.address }}{{ item.address_detail }}</span>
</view>
</view>
@ -68,7 +68,7 @@
style="margin-top: 20rpx;margin-bottom: 32rpx;">
<view class="imgs_con_div" v-for="(items_img, index) in item.images.slice(0, 3)"
:key="index">
<image class="imgs_con" :src="items_img"></image>
<image class="imgs_con" :src="items_img" mode="aspectFill"></image>
</view>
</view>
</view>
@ -402,7 +402,7 @@
page: this.page,
limit: this.limit,
order: "normal",
status: "2", //5
status: "2,3,4,5", //5
auth_status: 1 //
},
})

View File

@ -20,7 +20,9 @@
<image src="/static/index/schoolNight.png" mode="widthFix" class="imgstop_ye" @click="toshool"></image>
</view>
<scroll-view @scrolltolower="onScrolltolower" :refresher-enabled="true" :refresher-triggered="homrS" @refresherrefresh="onS" scroll-y="true" class="flex align-items" style="height: 1250rpx;box-sizing: border-box;">
<scroll-view @scrolltolower="onScrolltolower" :refresher-enabled="true" :refresher-triggered="homrS"
@refresherrefresh="onS" scroll-y="true" class="flex align-items"
style="height: 1250rpx;box-sizing: border-box;">
<view class="swiper-box">
<!-- <MySwiper :list="swiperList"></MySwiper> -->
<view class="swiper_s">
@ -78,7 +80,8 @@
style="width: 36rpx;height: 36rpx;border-radius: 80rpx;"></image>
<image v-else :src="item.headimage"
style="width: 36rpx;height: 36rpx;border-radius: 80rpx;"></image>
<span v-if="cate_ids != 1" class="white-space" style="color: #9C9C9C;margin-left: 10rpx;width: 210rpx;">{{
<span v-if="cate_ids != 1" class="white-space"
style="color: #9C9C9C;margin-left: 10rpx;width: 210rpx;">{{
item.user.nickname }}</span>
<span v-else class="white-space"
style="color: #9C9C9C;margin-left: 10rpx;width: 210rpx;">{{
@ -107,7 +110,7 @@
style="margin-top: 20rpx;margin-bottom: 32rpx;">
<view class="imgs_con_div" v-for="(items_img, index) in item.images.slice(0, 3)"
:key="index">
<image class="imgs_con" :src="items_img"></image>
<image class="imgs_con" :src="items_img" mode="aspectFill"></image>
</view>
</view>
</view>
@ -139,7 +142,7 @@
</view>
</view>
</view>
<u-loadmore v-if="hotList.length > 0" :status="loadStatus" ></u-loadmore>
<u-loadmore v-if="hotList.length > 0" :status="loadStatus"></u-loadmore>
<view v-if="hotList.length > 0" style="height: 100rpx;width: 100%;"></view>
<view class="flex flex-column flex-start align-items" v-if="hotList.length == 0">
<image src="/static/message/activen.png" mode="" style="width: 180rpx;height: 180rpx;">
@ -272,17 +275,17 @@
</template>
<script>
// import MySwiper from "@/components/fuyu-MixSwiper/fuyu-MixSwiper.vue";
import {
// import MySwiper from "@/components/fuyu-MixSwiper/fuyu-MixSwiper.vue";
import {
dateWeek
} from '../../utils/dateFormat'
export default {
} from '../../utils/dateFormat'
export default {
components: {
//MySwiper,
},
data() {
return {
homrS:false,
homrS: false,
swiperCurrent: 0, //
showPopbq: false, //
bqList: [], //
@ -349,21 +352,21 @@ export default {
// }
},
methods: {
onScrolltolower(){
onScrolltolower() {
if (this.hotList.length < this.count) {
this.page+=1;
this.page += 1;
this.getHotList();
}
},
onS(){
this.homrS=true;
onS() {
this.homrS = true;
uni.showLoading({
title: '加载中...'
});
this.resetLists();
this.getHotList();
setTimeout(() => {
this.homrS=false;
this.homrS = false;
uni.hideLoading();
uni.stopPullDownRefresh();
}, 2000)
@ -375,8 +378,8 @@ export default {
title: '请登录',
icon: 'none',
duration: 2000,
complete: function () {
setTimeout(function () {
complete: function() {
setTimeout(function() {
uni.switchTab({
url: '/pages/my/index',
});
@ -469,8 +472,8 @@ export default {
title: '请登录',
icon: 'none',
duration: 2000,
complete: function () {
setTimeout(function () {
complete: function() {
setTimeout(function() {
uni.switchTab({
url: '/pages/my/index',
});
@ -488,7 +491,7 @@ export default {
}
},
swiperChange(e) {
if(e.detail.source =='autoplay' || e.detail.source == 'touch'){
if (e.detail.source == 'autoplay' || e.detail.source == 'touch') {
this.swiperCurrent = e.detail.current;
}
},
@ -505,8 +508,8 @@ export default {
title: '请登录',
icon: 'none',
duration: 2000,
complete: function () {
setTimeout(function () {
complete: function() {
setTimeout(function() {
uni.switchTab({
url: '/pages/my/index',
});
@ -751,7 +754,7 @@ export default {
page: this.page,
limit: this.limit,
order: "normal",
status: "2", //5
status: "2,3,4,5", //5
auth_status: 1 //
},
})
@ -798,8 +801,8 @@ export default {
title: '请登录',
icon: 'none',
duration: 2000,
complete: function () {
setTimeout(function () {
complete: function() {
setTimeout(function() {
uni.switchTab({
url: '/pages/my/index',
});
@ -850,43 +853,43 @@ export default {
});
},
},
};
};
</script>
<style lang="scss" scoped>
.w-100 {
.w-100 {
width: 100%;
}
}
.flex {
.flex {
display: flex;
}
}
.justify-center {
.justify-center {
justify-content: center;
}
}
.space-between {
.space-between {
justify-content: space-between;
}
}
.align-items {
.align-items {
align-items: center;
}
}
.flex-column {
.flex-column {
flex-flow: column;
}
}
.justify-start {
.justify-start {
justify-content: start;
}
}
.mar-top-30 {
.mar-top-30 {
margin-top: 30rpx;
}
}
.tab_all {
.tab_all {
position: relative;
display: flex;
justify-content: flex-start;
@ -949,9 +952,9 @@ export default {
color: #323232;
}
}
}
}
.recharge {
.recharge {
width: 750rpx;
background-color: #f7f7f7;
background-image: url("https://naweigetetest2.hschool.com.cn/dyqc/bgx2.png");
@ -1269,9 +1272,9 @@ export default {
}
}
}
.white-space {
.white-space {
overflow: hidden;
/* 确保超出容器的文本被隐藏 */
white-space: nowrap;
@ -1279,7 +1282,7 @@ export default {
text-overflow: ellipsis;
/* 使用省略号表示被截断的文本 */
width: 100%;
}
}
@ -1290,7 +1293,7 @@ export default {
.pos {
.pos {
position: relative;
.ab {
@ -1325,9 +1328,9 @@ export default {
color: #ff4810;
line-height: 38rpx;
}
}
}
.part {
.part {
width: 162rpx;
height: 70rpx;
background: url(@/static/index/shangche.png);
@ -1337,9 +1340,9 @@ export default {
font-weight: 400;
font-size: 42rpx;
color: #BBFC5B;
}
}
.part1 {
.part1 {
width: 162rpx;
height: 70rpx;
background: url(@/static/index/shangchew.png);
@ -1349,14 +1352,14 @@ export default {
font-weight: 400;
font-size: 42rpx;
color: #9C9C9C;
}
}
.swiper-box {
.swiper-box {
height: 580rpx;
position: relative;
}
}
.popup_bq {
.popup_bq {
display: flex;
flex-direction: column;
align-items: center;
@ -1413,10 +1416,10 @@ export default {
}
}
}
</style>
<style lang="scss">
.serch_top {
.serch_top {
.u-search {
::v-deep .u-search__content {
@ -1432,22 +1435,22 @@ export default {
height: 36rpx !important;
}
}
}
}
.swiper_s {
.swiper_s {
width: 100%;
height: 100%;
}
}
.swiper-image {
.swiper-image {
width: 100%;
height: 100%;
border-radius: 36rpx;
object-fit: contain;
}
}
.text {
.text {
position: absolute;
/* 确保文字在模糊背景之上 */
z-index: 200;
@ -1460,9 +1463,9 @@ export default {
width: 100%;
bottom: 70rpx;
transform: translateZ(0);
}
}
.fnon_tit {
.fnon_tit {
position: absolute;
left: 5%;
z-index: 1;
@ -1473,25 +1476,25 @@ export default {
backdrop-filter: blur(4px);
border-radius: 36rpx;
bottom: 30rpx;
}
}
// .fnon_tit::before {
// content: "";
// position: absolute;
// top: 0;
// left: 0;
// right: 0;
// bottom: 0;
// backdrop-filter: blur(4px);
// /* */
// pointer-events: none;
// /* */
// border-radius: 36rpx;
// z-index: 0;
// /* */
// }
// .fnon_tit::before {
// content: "";
// position: absolute;
// top: 0;
// left: 0;
// right: 0;
// bottom: 0;
// backdrop-filter: blur(4px);
// /* */
// pointer-events: none;
// /* */
// border-radius: 36rpx;
// z-index: 0;
// /* */
// }
.dots {
.dots {
position: absolute;
bottom: 50rpx;
width: 100%;
@ -1510,30 +1513,30 @@ export default {
// transform: scale(0.9);
}
}
}
}
.line-row {
.line-row {
margin: 40rpx 0rpx;
height: 1rpx;
width: 100%;
background: #eeeeee;
}
}
.input {
.input {
text-align: right;
font-family: PingFang SC, PingFang SC;
font-size: 26rpx;
color: #343434;
line-height: 32rpx;
}
}
.plasty {
.plasty {
color: #999999;
font-weight: 300;
font-size: 28rpx;
}
}
.textarea_mph {
.textarea_mph {
::v-deep .u-textarea {
height: 237rpx;
padding: 20rpx;
@ -1543,9 +1546,9 @@ export default {
background-color: #F8F8F8 !important;
border-radius: 18rpx;
}
}
}
.btn_1 {
.btn_1 {
width: 100%;
height: 90rpx;
background: #323232;
@ -1557,5 +1560,5 @@ export default {
line-height: 90rpx;
text-align: center;
margin-top: 50rpx;
}
}
</style>

View File

@ -117,7 +117,7 @@
<view class="flex align-items" style="margin-top: 20rpx;">
<image class="imgs_con" v-for="(items_img, index) in item.images.slice(0, 3)"
:key="index" :src="items_img"></image>
:key="index" :src="items_img" mode="aspectFill"></image>
</view>
</view>
</view>