From 27f9a69498c1e083e5d37155734a2442e3513d80 Mon Sep 17 00:00:00 2001 From: tianyi <13521030702@163.com> Date: Tue, 31 Mar 2026 15:38:56 +0800 Subject: [PATCH] 11 --- package1/buyFood/buyFood.vue | 22 ++-- package1/group/groupBuyDetail.vue | 10 +- package1/group/groupBuySingle.vue | 127 ++++++++++++++-------- package1/group/shopEvaluate.vue | 4 +- package1/myCenter/partTimeJobRegister.vue | 2 +- 5 files changed, 101 insertions(+), 64 deletions(-) diff --git a/package1/buyFood/buyFood.vue b/package1/buyFood/buyFood.vue index b3b5f5c..a5a10f6 100644 --- a/package1/buyFood/buyFood.vue +++ b/package1/buyFood/buyFood.vue @@ -35,9 +35,6 @@ - - {{shopItem.shopName || '未知商家'}} - 地址:{{shopItem.shopAddress || ''}} @@ -87,7 +84,7 @@ + style="height: 140rpx;line-height: 40rpx;padding: 0 40rpx;font-size: 28rpx;font-weight: 700;padding-top: 20rpx;"> 配送员 @@ -238,9 +235,9 @@ 备注 - + @@ -1138,7 +1135,10 @@ border-radius: 100rpx; margin: 20rpx auto; } - + .ziqu-text{ + align-items: center; + display: flex; + } .btn { width: 95%; height: 100rpx; @@ -1174,19 +1174,19 @@ .ziqu-address { display: flex; - height: 100rpx; + height: 110rpx; background: #fff; width: 90%; border-radius: 20rpx; font-size: 26rpx; - margin: 60rpx auto 0; + margin: 60rpx auto 20rpx; font-weight: bold; - line-height: 100rpx; + line-height: 40rpx; img { width: 40rpx; height: 40rpx; - margin: 30rpx 20rpx 0 30rpx; + margin: 36rpx 20rpx 0 30rpx; } } diff --git a/package1/group/groupBuyDetail.vue b/package1/group/groupBuyDetail.vue index bb074bb..1e43d6a 100644 --- a/package1/group/groupBuyDetail.vue +++ b/package1/group/groupBuyDetail.vue @@ -20,11 +20,11 @@ - {{shopItem.shopAddress}} + {{shopItem.shopAddress}} - 周一到周日 {{shopItem.shopTakeaway.businessHourBegin}}-{{shopItem.shopTakeaway.businessHourEnd}} + 周一到周日 {{shopItem.shopTakeaway.businessHourBegin}}-{{shopItem.shopTakeaway.businessHourEnd}} @@ -139,7 +139,7 @@ .back-btn{ position: absolute; bottom: 0; - left: 0; + left: 20rpx; } .title-name{ padding-top: 110rpx; @@ -156,10 +156,10 @@ padding: 20rpx; } .left{ - width: 60%; + width: 80%; } .right{ - width: 40%; + width: 20%; height: 160rpx; } .img-popup-content { diff --git a/package1/group/groupBuySingle.vue b/package1/group/groupBuySingle.vue index d2accec..efe0e35 100644 --- a/package1/group/groupBuySingle.vue +++ b/package1/group/groupBuySingle.vue @@ -91,10 +91,10 @@ - - + + + :style="{'border-top-right-radius':item.checked?'20rpx':'','border-bottom-right-radius':item.checked?'20rpx':'','color':item.checked?'rgba(0, 35, 28, 1)':'#777','background':item.checked?'#fff':''}"> {{item.categoryName}} @@ -143,7 +143,6 @@ - @@ -178,7 +177,7 @@ - + @@ -188,8 +187,9 @@ - 已选规格: - {{getSpecDisplayString(cartItem.specs)}} + + 已选规格:{{getSpecDisplayString(cartItem.specs)}} + @@ -287,9 +287,22 @@ - 搭配小食 - - + + 搭配小食 + + + + + - + + + {{vModelValue}} + + + + + + @@ -298,11 +311,14 @@ v-for="(spec, sIndex) in moreBuyList" :key="sIndex" @tap="selectMoreBuy(spec,sIndex)"> - ¥{{spec.attributeListPrice | sliceMsg}} ✕ {{spec.quantity ? spec.quantity : ''}} + ¥{{spec.attributeListPrice | sliceMsg}} {{spec.productName}} + + {{spec.quantity ? spec.quantity : ''}} + @@ -400,7 +416,7 @@ - + @@ -478,7 +494,14 @@ loadStatus: 'more', type: '', shopId: '', - shopItem: {}, + shopItem: { + shopIcon:'', + shopName:'', + shopScore:'', + shopTypeTitle:'', + saleCount:'', + remark:'', + }, productId: '', productItem: [], tuanzhangOrder:{}, @@ -501,8 +524,6 @@ lastScrollTop: 0, // 防止切换分类之后onPageScroll闪回的标志 isSwitching: false, - // 吸顶与滚动控制 - isContainerSticky: false, containerOriginalTop: 0, scrollIntoViewId: '', goodsListScrollTop: 0, @@ -527,9 +548,10 @@ onlineWorkerDuration:500, menuList: [{ categoryName: '猜你喜欢', - id: '', + id: '1', checked: true - }] + }], + shopRecommend:[] } }, components: { @@ -597,6 +619,11 @@ } catch(e) { this.shopItem = JSON.parse(option.item); } + this.shopRecommend = this.shopItem.products + for(let i=0;i= stickyThreshold && !this.isContainerSticky) { - this.isContainerSticky = true; - } + }, methods: { // 页面touchmove事件:吸顶后阻止页面整体滑动(让goods-list接管滚动) @@ -642,18 +667,13 @@ onGoodsListScroll(e) { if (this.isAutoScrolling) return; const scrollTop = e.detail.scrollTop; - // 向下滑动到顶部时,取消吸顶 - if (scrollTop <= 0 && this.isContainerSticky) { - this.isContainerSticky = false; - return; - } + // 根据滚动位置自动选中对应分类 this.detectCurrentCategory(); }, onGoodsListScrollToTop() { if (this.isAutoScrolling) return; - // 滚到顶部了,取消吸顶 - this.isContainerSticky = false; + }, // 检测当前可见的分类 detectCurrentCategory() { @@ -712,6 +732,7 @@ that.loadStatus = 'nomore'; if (res.code == 200) { that.productItem = res.result.records; + that.productItem = [...that.shopRecommend, ...that.productItem]; for(let i = 0;i 0 ?this.vModelValue -= 1:0 + } let moreBuyPrice = 0 for(let i = 0;i 0){ moreBuyPrice += Number((Number(this.moreBuyList[i].quantity) * Number(this.sliceMsg2(this.moreBuyList[i].attributeListPrice))).toFixed(2)) @@ -1247,7 +1268,7 @@ this.selectedGroupRule.groupPriceAndMore = Number(this.selectedGroupRule.groupPrice) + moreBuyPrice for(let i = 0;i - {{item.name}}({{item.num}}) + {{item.name}} {{item.num}} - * 学生证上传 身份信息仅用于认证身份,平台会严格保密 + * 学生证上传 身份信息仅用于认证身份,平台会严格保密