From bb30e2332f24e2c6c7c078d9718bcc58b18b9fcf Mon Sep 17 00:00:00 2001 From: wangzimeng <3297159934@qq.com> Date: Tue, 29 Jul 2025 14:58:03 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E7=A7=AF=E5=88=86=E5=95=86=E5=9F=8E?= =?UTF-8?q?=E7=9A=84=E4=BC=98=E6=83=A0=E5=88=B8=E7=9A=84=E4=B8=8B=E6=8B=89?= =?UTF-8?q?=E5=88=B7=E6=96=B0=E5=92=8C=E5=8A=A0=E8=BD=BD=E6=9B=B4=E5=A4=9A?= =?UTF-8?q?=202=E3=80=81=E6=8B=9B=E7=A7=9F=E5=88=97=E8=A1=A8=E7=9A=84?= =?UTF-8?q?=E5=8A=A0=E8=BD=BD=E6=9B=B4=E5=A4=9A=E7=9A=84=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E8=8E=B7=E5=8F=96=203=E3=80=81=E6=88=91?= =?UTF-8?q?=E7=9A=84=E4=BC=98=E6=83=A0=E5=88=B8=E7=9A=84=E9=9D=99=E6=80=81?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/app/score-shop.vue | 92 ++++-- pages/canteenRent/rentList.vue | 7 +- pages/coupon/list.vue | 544 +++++++++++++++++++-------------- pages/index/index.vue | 2 +- 4 files changed, 387 insertions(+), 258 deletions(-) diff --git a/pages/app/score-shop.vue b/pages/app/score-shop.vue index dd5866d..3fedbf5 100644 --- a/pages/app/score-shop.vue +++ b/pages/app/score-shop.vue @@ -20,43 +20,49 @@ - - - - - - - {{item.name}} - - {{item.score}}积分兑换 + + + + + + + + + {{item.name}} + + {{item.score}}积分兑换 + + - - - - - - - - - {{ item.name }} - - {{item.score}}积分兑换 + + + + + + + {{ item.name }} + + {{item.score}}积分兑换 + + - - - + + + + v-if="couponCount == 0" style="margin-top: 300rpx;"> 暂无数据信息 @@ -118,6 +124,12 @@ currentTab.value = e.index console.log('切换tabs', currentTab.value); listQuery.value.status = e.value + couponList.value = [] + if(currentTab.value == 0) { + + }else { + + } getCouponList(); } @@ -132,6 +144,7 @@ //满减券 const couponList = ref([]) const couponCount = ref(0) + const homrS = ref(false) async function getCouponList() { const res = await sheep.$api.app.scoreShop.fullList({ page: listQuery.value.page, @@ -140,7 +153,7 @@ order: 'normal' }); if (res.code === 1) { - couponList.value = res.data.list; + couponList.value = [...couponList.value,...res.data.list]; couponCount.value = res.data.count; score.value = res.data.score } else { @@ -150,6 +163,33 @@ }) } } + //加载更多 + function onScrolltolower() { + if (couponList.value.length < couponCount.value) { + listQuery.value.page += 1; + getCouponList(); + } + } + //下拉刷新 + function onS() { + homrS.value = true + listQuery.value.keywords = '' + uni.showLoading({ + title: '加载中...' + }); + resetLists(); + setTimeout(() => { + homrS.value = false; + uni.hideLoading(); + uni.stopPullDownRefresh(); + }, 2000) + } + // 重置列表 + function resetLists() { + listQuery.value.page = 1; + couponList.value = []; + getCouponList(); + } const showCouponPro = ref(false) const couponName = ref('') diff --git a/pages/canteenRent/rentList.vue b/pages/canteenRent/rentList.vue index 45c6da7..5e61dac 100644 --- a/pages/canteenRent/rentList.vue +++ b/pages/canteenRent/rentList.vue @@ -242,7 +242,8 @@ console.log('getList', res); if (res.data && res.data.list) { - rentList.value = res.data.list; + // rentList.value = res.data.list; + rentList.value =[...rentList.value,...res.data.list]; rentCount.value = res.data.count; // Safely process each item rentList.value = rentList.value.map(item => { @@ -284,7 +285,7 @@ title: '加载中...' }); resetLists(); - getList() + setTimeout(() => { homrS.value = false; uni.hideLoading(); @@ -295,7 +296,7 @@ function resetLists() { listQuery.value.page = 1; rentList.value = []; - // loadStatus.value = "loading"; + getList(); } function toDetail(e){ diff --git a/pages/coupon/list.vue b/pages/coupon/list.vue index 5103516..f6c6f79 100644 --- a/pages/coupon/list.vue +++ b/pages/coupon/list.vue @@ -1,239 +1,327 @@ + + + .fslh60 { + font-size: 60rpx; + line-height: 60rpx; + } + + .fslh28 { + font-size: 28rpx; + line-height: 28rpx; + } + + .fs32 { + font-size: 32rpx; + } + + .justify-center { + justify-content: center; + } + + .align-center { + align-items: center; + } + + .flex { + display: flex; + } + + .grid { + display: grid; + } + + .fs60 { + font-size: 60rpx; + } + + .fs24 { + font-size: 24rpx; + } + + .bold { + font-weight: bold; + } + + .regular { + font-weight: 400; + } + + .c3 { + color: #333333; + } + + .c3D { + color: #3d3d3d; + } + + .c9 { + color: #999999; + } + + .container { + background-color: #f7f7f7; + height: 100vh; + + .exChangeBox { + // background-color: #f7f7f7; + width: 690rpx; + margin-top: 30rpx; + + .couponsList { + width: 100%; + padding: 0 30rpx; + display: grid; + grid-template-columns: repeat(2, 1fr); + ; + grid-gap: 20px; + // display: flex; + // justify-content: center; + // align-items: center; + + + .list-item { + width: 690rpx; + background-image: url('https://jiangxiaoxian.0rui.cn/couponItemBack.png'); + background-size: 100%; + display: flex; + justify-content: space-between; + + .itemLeft { + width: 84rpx; + height: 103rpx; + padding: 40rpx 50rpx; + display: block; + justify-content: center; + align-items: center; + } + + .itemRight { + width: 446rpx; + height: 103rpx; + padding: 40rpx 30rpx; + display: flex; + justify-content: space-between; + align-items: center; + + .item-RightLeft { + // width: 84rpx; + // height: 103rpx; + // padding: 40rpx 50rpx; + display: block; + justify-content: flex-start; + align-items: center; + } + + .item-btn { + width: 160rpx; + height: 70rpx; + background: linear-gradient(to right, #FCCA58, #FFBD25); + border-radius: 106rpx; + align-items: center; + justify-content: center; + display: flex; + font-size: 28rpx; + line-height: 36rpx; + font-weight: bold; + color: #333333; + } + + } + + + .item-text { + padding: 30rpx; + + .exchangeBtn { + background-color: #fcc74e; + height: 70rpx; + width: 270rpx; + margin-top: 30rpx; + border-radius: 223rpx; + align-items: center; + justify-content: center; + display: flex; + font-size: 28rpx; + line-height: 30rpx; + font-weight: 400; + } + } + } + + } + + } + + } + \ No newline at end of file diff --git a/pages/index/index.vue b/pages/index/index.vue index bf31342..230745e 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -37,7 +37,7 @@ 平台学院 学知赋能成长 - + 原料商城 优材好料直供