From b193403959e6df66503a2f16450b6901040ad6b8 Mon Sep 17 00:00:00 2001 From: wangfukang <15630117759@163.com> Date: Mon, 24 Aug 2026 10:47:00 +0800 Subject: [PATCH] 1 --- package2/group/groupBuySingle.vue | 4 +- package2/group/studentStoreList.vue | 310 ++++++++++++++++++++-------- package2/myCenter/addGoods.vue | 180 ++++++++++++++-- 3 files changed, 383 insertions(+), 111 deletions(-) diff --git a/package2/group/groupBuySingle.vue b/package2/group/groupBuySingle.vue index 02dca8f..68a378d 100644 --- a/package2/group/groupBuySingle.vue +++ b/package2/group/groupBuySingle.vue @@ -56,7 +56,7 @@ :value="shopItem.shopScore ? shopItem.shopScore : 5" /> - + {{shopItem.shopTypeTitle}} @@ -83,7 +83,7 @@ 公告 - {{shopItem.remark}} + {{shopItem.remark != null ? shopItem.remark : ''}} diff --git a/package2/group/studentStoreList.vue b/package2/group/studentStoreList.vue index ba30fc6..d916a66 100644 --- a/package2/group/studentStoreList.vue +++ b/package2/group/studentStoreList.vue @@ -80,61 +80,52 @@ 换个关键词或分类试试,新的校园店铺会出现在这里 - - + + 休息中 - 销量 {{item.saleCount != null ? item.saleCount : 0}} - - {{item.uiLiveText}} + - + 拼团更省钱 {{item.shopName}} - {{item.subtitle || '校园附近宝藏小店,约上同学一起拼'}} - @@ -1549,11 +1540,11 @@ .shop-card { margin-bottom: 20rpx; - padding: 18rpx 16rpx 16rpx; - border-radius: 32rpx; - background: rgba(255, 255, 255, 0.98); - border: 1rpx solid rgba(255, 221, 188, 0.72); - box-shadow: 0 16rpx 34rpx rgba(178, 102, 48, 0.12); + padding: 0; + border-radius: 34rpx; + background: rgba(255, 255, 255, 0.9); + border: 1rpx solid rgba(255, 221, 188, 0.76); + box-shadow: 0 18rpx 44rpx rgba(178, 102, 48, 0.12); position: relative; z-index: 1; overflow: hidden; @@ -1561,8 +1552,12 @@ } .community-shop-card { - padding: 20rpx 18rpx 18rpx; - border-radius: 36rpx; + padding: 0; + border-radius: 34rpx; + } + + .shop-card-disabled { + box-shadow: none; } .shop-card::after { @@ -1576,6 +1571,16 @@ top: -120rpx; } + .shop-card-bg { + position: absolute; + top: -120rpx; + right: -90rpx; + width: 300rpx; + height: 300rpx; + border-radius: 50%; + background: rgba(255, 225, 177, 0.38); + } + .closed-mask { width: 100%; height: 100%; @@ -1583,7 +1588,7 @@ top: 0; left: 0; z-index: 8; - border-radius: 32rpx; + border-radius: inherit; background: rgba(92, 48, 21, 0.16); display: flex; align-items: center; @@ -1640,20 +1645,21 @@ } .shop-top { + padding: 22rpx; display: flex; position: relative; - z-index: 1; + z-index: 2; } .shop-img { - width: 204rpx; - height: 204rpx; + width: 188rpx; + height: 188rpx; flex-shrink: 0; - border-radius: 28rpx; + border-radius: 32rpx; background: #fff1df; position: relative; overflow: hidden; - box-shadow: 0 12rpx 26rpx rgba(178, 102, 48, 0.12); + box-shadow: 0 16rpx 32rpx rgba(178, 102, 48, 0.16); } .shop-img image { @@ -1662,33 +1668,32 @@ } .shop-img-badge { - width: 42rpx; - height: 42rpx; - border-radius: 50%; - background: rgba(255, 255, 255, 0.96); - color: #e96632; - font-size: 22rpx; + height: 36rpx; + padding: 0 12rpx; + border-radius: 999rpx; + background: rgba(255, 255, 255, 0.9); + color: #ff6f2c; + font-size: 19rpx; font-weight: 900; - line-height: 42rpx; + line-height: 36rpx; text-align: center; position: absolute; - left: 10rpx; - top: 10rpx; + left: 9rpx; + top: 2rpx; } .shop-info { flex: 1; min-width: 0; - padding-left: 20rpx; + padding-left: 22rpx; box-sizing: border-box; } .shop-name { - padding-right: 90rpx; color: #2f2016; - font-size: 34rpx; + font-size: 31rpx; font-weight: 900; - line-height: 42rpx; + line-height: 40rpx; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; @@ -1711,6 +1716,92 @@ align-items: center; } + .shop-content-center { + display: flex; + align-items: center; + margin: 16rpx 0 14rpx; + } + + .shop-rate { + height: 34rpx; + padding-right: 8rpx; + border-radius: 17rpx; + background: rgba(255, 224, 178, 0.5); + display: flex; + align-items: center; + overflow: hidden; + } + + .shop-rate-num { + width: 42rpx; + height: 34rpx; + margin-right: 6rpx; + border-radius: 17rpx 8rpx 8rpx 17rpx; + background: linear-gradient(90deg, #ff7444 0%, #ffb854 100%); + color: #fff; + font-size: 18rpx; + font-weight: 900; + line-height: 34rpx; + text-align: center; + } + + .shop-tag { + flex: 1; + min-width: 0; + line-height: 40rpx; + text-align: right; + } + + .shop-tag text { + display: inline-block; + max-width: 180rpx; + padding: 6rpx 12rpx; + border-radius: 18rpx; + background: #fff0dc; + color: #d65f2c; + font-size: 20rpx; + font-weight: 900; + line-height: 26rpx; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + box-sizing: border-box; + } + + .shop-content-bottom { + display: flex; + align-items: center; + } + + .shop-deal { + flex: 1; + min-width: 0; + } + + .shop-deal text { + display: inline-block; + max-width: 100%; + padding: 7rpx 12rpx; + border-radius: 16rpx; + background: rgba(255, 235, 211, 0.88); + color: #8f684c; + font-size: 20rpx; + font-weight: 800; + line-height: 28rpx; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + box-sizing: border-box; + } + + .shop-sale { + margin-left: 12rpx; + color: #ff5a35; + font-size: 21rpx; + font-weight: 900; + white-space: nowrap; + } + .social-row { margin-top: 12rpx; display: flex; @@ -1844,51 +1935,58 @@ } .product-strip { - margin-top: 18rpx; + width: 100%; + margin-top: 0; + padding: 0 0 22rpx; + border-top: 1rpx solid rgba(255, 126, 39, 0.08); display: flex; - gap: 12rpx; position: relative; - z-index: 1; - overflow: hidden; + z-index: 2; + overflow-x: scroll; + overflow-y: hidden; + background: rgba(255, 250, 246, 0.58); + box-sizing: border-box; } .product-card { - width: 31.6%; - flex: 0 0 31.6%; + width: 148rpx; + flex: 0 0 148rpx; min-width: 0; - padding: 10rpx; - border-radius: 22rpx; - background: #fff7ee; - border: 1rpx solid rgba(255, 226, 198, 0.82); + margin: 16rpx 0 0 18rpx; + padding: 0 4rpx; + border-radius: 0; + background: transparent; + border: 0; box-sizing: border-box; - box-shadow: 0 10rpx 22rpx rgba(178, 102, 48, 0.08); + box-shadow: none; } .community-products .product-card:first-child { - transform: rotate(-1deg); + transform: none; } .community-products .product-card:nth-child(2) { - transform: rotate(1deg); + transform: none; } .community-products .product-card:nth-child(3) { - transform: rotate(-0.6deg); + transform: none; } .product-card image { - width: 100%; - height: 150rpx; - border-radius: 18rpx; + width: 136rpx; + height: 136rpx; + border-radius: 24rpx; background: #fff1df; + box-shadow: 0 10rpx 22rpx rgba(178, 102, 48, 0.12); } .product-name { - margin-top: 8rpx; + margin-top: 10rpx; color: #3f2618; - font-size: 21rpx; - font-weight: 800; - line-height: 30rpx; + font-size: 22rpx; + font-weight: 900; + line-height: 32rpx; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; @@ -1896,24 +1994,62 @@ .product-price { margin-top: 4rpx; - display: flex; + min-height: 66rpx; + } + + .origin-price { + display: block; + color: #9b9588; + font-size: 21rpx; + font-weight: 700; + line-height: 28rpx; + text-decoration: line-through; + } + + .group-buy-price { + display: inline-flex; align-items: center; + max-width: 100%; + min-height: 32rpx; + margin-top: 6rpx; + padding: 0 8rpx 0 6rpx; + border-radius: 18rpx; + background: linear-gradient(90deg, #fff1df, #ffe6e1); + color: #ff5a45; + font-size: 20rpx; + font-weight: 900; + line-height: 32rpx; + box-shadow: 0 6rpx 12rpx rgba(255, 57, 57, 0.09); + white-space: nowrap; + box-sizing: border-box; + } + + .group-buy-price-solo { + margin-top: 0; + padding: 0; + background: transparent; + box-shadow: none; } .group-label { - margin-right: 6rpx; - padding: 2rpx 7rpx; - border-radius: 8rpx; - background: #fff0dc; - color: #b4572d; + width: 26rpx; + height: 26rpx; + margin-right: 5rpx; + border-radius: 50%; + background: #ff6d49; + color: #fff; font-size: 18rpx; font-weight: 900; + line-height: 26rpx; + text-align: center; + flex-shrink: 0; } .group-price { - color: #f0441f; - font-size: 23rpx; + color: #ff1f1f; + font-size: 24rpx; font-weight: 900; + white-space: nowrap; } .shop-bottom { diff --git a/package2/myCenter/addGoods.vue b/package2/myCenter/addGoods.vue index 703ee46..415ec73 100644 --- a/package2/myCenter/addGoods.vue +++ b/package2/myCenter/addGoods.vue @@ -66,11 +66,17 @@ - - - {{value[0]}}(可选{{value[1].canbuy || 1}}个): - - {{item}}、 + + + + {{value[0]}}(可选{{value[1].canbuy || 1}}个) + x + + + + {{item}} + x + @@ -438,6 +444,9 @@ submit() { let that = this; this.syncLunchBoxByMoreBuy() + if (!this.validateRequiredProductFields()) { + return + } if (!this.validateProductSpecs()) { return } @@ -482,6 +491,31 @@ // } // }); }, + validateRequiredProductFields() { + const productName = String(this.formData.productName || '').trim() + if (!productName) { + this.tui.toast('请输入商品名称') + return false + } + if (!this.formData.productPicture) { + this.tui.toast('请上传商品主图') + return false + } + for (let i = 0; i < this.formData.attributeListPrice.length; i++) { + const specPrice = String(this.formData.attributeListPrice[i].specPrice || '').trim() + if (!specPrice) { + this.tui.toast('请输入商品价格') + return false + } + } + const startPayNum = String(this.formData.startPayNum || '').trim() + if (!startPayNum) { + this.tui.toast('请输入起售数量') + return false + } + this.formData.productName = productName + return true + }, back() { uni.navigateBack() }, @@ -582,37 +616,82 @@ this.formData.sellEndTime = e.detail.value } }, + confirmDeleteAttributeCategory(categoryName){ + uni.showModal({ + title: '提示', + content: '确定删除“' + categoryName + '”分类及其下所有属性吗?', + success: (res) => { + if(res.confirm){ + this.removeAttributeCategory(categoryName) + } + } + }) + }, + confirmDeleteAttributeValue(categoryName, attributeTitle){ + uni.showModal({ + title: '提示', + content: '确定删除“' + attributeTitle + '”属性吗?', + success: (res) => { + if(res.confirm){ + this.removeAttributeValue(categoryName, attributeTitle) + } + } + }) + }, + removeAttributeCategory(categoryName){ + let attributeListMap = new Map(this.formData.attributeList1) + attributeListMap.delete(categoryName) + this.formData.attributeList1 = attributeListMap + this.attrValueArr = this.attrValueArr.filter(item => item.parentName != categoryName) + delete this.canbuyMap[categoryName] + this.$forceUpdate() + }, + removeAttributeValue(categoryName, attributeTitle){ + let attributeListMap = new Map(this.formData.attributeList1) + let attributeGroup = attributeListMap.get(categoryName) + if(!attributeGroup){ + return + } + let nextTitle = (attributeGroup.title || []).filter(item => item != attributeTitle) + if(nextTitle.length == 0){ + attributeListMap.delete(categoryName) + delete this.canbuyMap[categoryName] + }else{ + attributeListMap.set(categoryName, Object.assign({}, attributeGroup, { + title: nextTitle + })) + } + this.formData.attributeList1 = attributeListMap + this.attrValueArr = this.attrValueArr.filter(item => !(item.parentName == categoryName && item.title == attributeTitle)) + this.$forceUpdate() + }, guigeSubmit(){ if(this.modalclassType == 'shuxing'){ // 保存当前分类的canbuy值 if(this.typeToAttrName){ this.canbuyMap[this.typeToAttrName] = parseInt(this.currentCanbuy) || 1 } + let attributeListMap = new Map() for(let i=0;i