From 94fdca9d82e8b360e1193c5b6494ffbe84a80f6b Mon Sep 17 00:00:00 2001 From: jiazhipeng Date: Tue, 26 Aug 2025 09:43:46 +0800 Subject: [PATCH] 1 --- pages/info/postProductInfo/index.js | 6 + pages/info/postProductInfo/index.wxml | 54 +++++--- pages/info/postProductInfo/index.wxss | 172 ++++++++++++++++++-------- 3 files changed, 165 insertions(+), 67 deletions(-) diff --git a/pages/info/postProductInfo/index.js b/pages/info/postProductInfo/index.js index fdc8505..0c6d2ad 100644 --- a/pages/info/postProductInfo/index.js +++ b/pages/info/postProductInfo/index.js @@ -751,6 +751,12 @@ Page({ }) console.log(e, this.data.swiperCurrent) }, + changeSwiperCurrent (e) { + let index = e.currentTarget.dataset.index + this.setData({ + swiperCurrent: index + }) + }, /** * 生命周期函数--监听页面初次渲染完成 diff --git a/pages/info/postProductInfo/index.wxml b/pages/info/postProductInfo/index.wxml index 7fb2e06..3f7deb1 100644 --- a/pages/info/postProductInfo/index.wxml +++ b/pages/info/postProductInfo/index.wxml @@ -3,7 +3,7 @@ - 1/2 + {{swiperCurrent+1}}/{{swiperRange.sku.max+1}} 视频 图片 款式 @@ -29,7 +29,9 @@ - {{item.sku_name}} + + {{item.sku_name}} + @@ -48,10 +50,13 @@ - + 款式选择 - + > @@ -106,7 +111,6 @@ 买家评价 {{info.rate}}分 暂无评价 - 共{{commentTotal}}条 > @@ -115,6 +119,7 @@ 这里空空如也,快去点评吧! 去点评 --> + @@ -144,9 +149,15 @@ + + + + + {{info.supplier_name}} + 进店 @@ -229,22 +240,33 @@ - {{info.sku[skuIndex].price/100}} - - 补贴价:¥{{ (1 - allowance_data.discount_rate / 100) * info.sku[skuIndex].price / 100 }} + + {{info.sku[skuIndex].price/100}} + + + 已选择:{{info.sku[skuIndex].sku_name}} + + + + + {{producNum}} + + + 限购5件 - 已选择:{{info.sku[skuIndex].sku_name}} + 产品分类({{info.sku.length}}) - {{item.sku_name}} - - - 数量 - - {{producNum}} - + + + {{item.sku_name}} + + + {{skuFlag=='cart'?'确认':'立即购买'}} diff --git a/pages/info/postProductInfo/index.wxss b/pages/info/postProductInfo/index.wxss index ce70200..cf45b77 100644 --- a/pages/info/postProductInfo/index.wxss +++ b/pages/info/postProductInfo/index.wxss @@ -210,7 +210,6 @@ page { } .comment-box{ background: #fff; - padding: 0 20rpx; margin: 20rpx 0; width: 100%; box-sizing: border-box; @@ -227,7 +226,7 @@ page { border-bottom: 1rpx solid #d9d9d9; font-weight: 500; color: #000; - font-size: 35rpx; + font-size: 33rpx; padding: 0 20rpx; background: #fff; border-radius: 13rpx 13rpx 0 0; @@ -271,8 +270,10 @@ page { /* margin: 0 20rpx; */ border-bottom: 1rpx solid #ccc; /* padding: 33rpx 0; */ - padding: 28rpx 20rpx; + padding: 28rpx 0rpx; background: #fff; + width: 100%; + box-sizing: border-box; } .product-comment:last-of-type{ border-bottom: none; @@ -319,7 +320,7 @@ page { .comment-content { width: 100%; padding-top: 12rpx; - font-size: 28rpx; + font-size: 27rpx; color: #000; font-weight: 500; } @@ -470,38 +471,38 @@ page { } .sku-info-box { - margin: 50rpx 40rpx; + margin: 50rpx 25rpx; display: flex; justify-content: space-between; } .sku-info-box image { - width: 218rpx; - height: 180rpx; + width: 173rpx; + height: 173rpx; border-radius: 13rpx; display: block; - margin-right: 40rpx; + margin-right: 15rpx; flex-shrink: 0; } .sku-info { flex: 1; + width: 100rpx; + height: 173rpx; + display: flex; + flex-direction: column; + justify-content: space-between; } .sku-price { font-size: 40rpx; - font-weight: 500; - color: #D62828; - margin: 20rpx 0; - display: flex; - justify-content: flex-start; - align-items: center; + font-weight: bold; + color: #F84A56; } .sku-price::before { content: "¥"; - font-weight: 400; - font-size: 27rpx; + font-size: 24rpx; vertical-align: baseline; } @@ -522,45 +523,63 @@ page { .sku-names { display: flex; - font-size: 29rpx; - color: #333; - margin: 0 40rpx; - text-align: center; + font-weight: 500; + font-size: 27rpx; + color: #333333; + margin: 0 25rpx; flex-wrap: wrap; margin-bottom: 20rpx; justify-content: space-between; + max-height: 800rpx; + min-height: 400rpx; + align-content: flex-start; } .sku-name-item { - background: #EFEFEF; - border: 1rpx solid #EFEFEF; - /* width: 318rpx; */ - line-height: 77rpx; - border-radius: 14rpx; - margin-bottom: 25rpx; - margin-right: 30rpx; + height: 67rpx; + border-radius: 13rpx; + margin-bottom: 34rpx; max-width: 100%; - padding: 0 15rpx; - min-width: 270rpx; + padding-right:15rpx; + min-width: 340rpx; + background: #EFEFEF; + display: flex; + align-items: center; + box-sizing: border-box; } - -.sku-name-item:nth-child(2n) { - margin-right: 0; +.sku-name-item>image{ + width: 67rpx; + height: 67rpx; + border-radius: 13rpx; + flex-shrink: 0; +} +.sku-name-item .sku-name{ + flex:1; + width: 100rpx; + padding-left: 15rpx; + color: #333; } -.sku-name-item.active { +.sku-name-item.active{ color: #0B898E; - border-color: #0B898E; + border: 1px solid #0B898E; background: rgba(11, 137, 142, 0.1); } +.sku-name-item.active .sku-name{ + color: #0B898E; + } .number-box { display: flex; align-items: center; - border-top: 1rpx solid #ccc; justify-content: space-between; - margin: 0 40rpx; - padding: 40rpx 0; + background: #EFEFEF; +border-radius: 13rpx; +padding: 10rpx 0; +box-sizing: border-box; +height: 53rpx; +width: 250rpx; + } .number-box text { @@ -570,23 +589,21 @@ page { } .number-box view { - border: 1rpx solid #666; - border-radius: 7rpx; text-align: center; - width: 67rpx; - line-height: 67rpx; - font-size: 33rpx; + width: 80rpx; + height: 33rpx; + line-height: 33rpx; + font-size: 31rpx; color: #000; } -.number-box view.disable { - border-color: #ccc; - color: #999; -} - .number-box view.number { width: 94rpx; - margin: 0 15rpx; + border-left: 1px solid #ccc; + border-right: 1px solid #ccc; +} +.limit-number{ + font-weight: 500;font-size: 27rpx;color: #666666;padding-left:20rpx; } .btn-box { @@ -1062,6 +1079,14 @@ height: 133rpx; border-radius: 13rpx; margin-right:20rpx; flex-shrink: 0; + box-sizing: border-box; +} +.select-img image.active{ + border: 2px solid #DC2525; +} +.select-img image.no-stock{ + border: none; + opacity: 0.5; } .select-img .select-img-text{ font-weight: bold; @@ -1092,6 +1117,15 @@ height: 133rpx; color: #999; } .sku-tips{ + width: 100%; + position: absolute; + bottom: 73rpx; + left: 0; + right: 0; + display: flex; + justify-content: center; +} +.sku-tips>view{ width: fit-content; max-width: 533rpx; height: 53rpx; @@ -1102,7 +1136,43 @@ height: 133rpx; font-weight: 500; font-size: 24rpx; color: #FFFFFF; - position: absolute; - bottom: 73rpx; margin: 0 auto; -} \ No newline at end of file +} + +.shop-container{ + display: flex; + align-items: center; + margin-top: 20rpx; + padding: 32rpx 23rpx; + width: 100%; + background: white; + box-sizing: border-box; +} +.shop-container .shop-img{ + width: 113rpx; + height: 113rpx; + flex-shrink: 0; +} +.shop-container .shop-btn{ + width: 135rpx; +height: 57rpx; +border-radius: 13rpx; +border: 1px solid #0B898E; +font-weight: 500; +font-size: 31rpx; +color: #0B898E; +text-align: center; +line-height: 57rpx; +flex-shrink: 0; +} +.shop-container .textOver2{ + flex: 1; + width: 100rpx; + padding: 0 50rpx 0 20rpx; + font-weight: bold; +font-size: 32rpx; +color: #010101; +} + + +