diff --git a/pages/info/postProductInfo/index.js b/pages/info/postProductInfo/index.js index 89739fc..1e643e0 100644 --- a/pages/info/postProductInfo/index.js +++ b/pages/info/postProductInfo/index.js @@ -91,20 +91,33 @@ Page({ let resData = res.data try { - if (resData.product_data && resData.is_package==1) { - for(let key in resData.product_data) { - resData.product_data[key] = JSON.parse(resData.product_data[key]) + if (resData.product_data && resData.is_package==1) { + for(let key in resData.product_data) { + resData.product_data[key] = JSON.parse(resData.product_data[key]) + } + // if (resData.product_data["住"]) { + // resData.product_data["住"] = JSON.parse(resData.product_data["住"]) + // } + // if (resData.product_data["游"]) { + // resData.product_data["游"] = JSON.parse(resData.product_data["游"]) + // } + // if (resData.product_data["食"]) { + // resData.product_data["食"] = JSON.parse(resData.product_data["食"]) + // } } - // if (resData.product_data["住"]) { - // resData.product_data["住"] = JSON.parse(resData.product_data["住"]) - // } - // if (resData.product_data["游"]) { - // resData.product_data["游"] = JSON.parse(resData.product_data["游"]) - // } - // if (resData.product_data["食"]) { - // resData.product_data["食"] = JSON.parse(resData.product_data["食"]) - // } - } + + resData.shipment_tag_arr = [] + if (resData.shipment_tag) { + resData.shipment_tag_arr = resData.shipment_tag.split(',') + resData.shipment_tag_str = resData.shipment_tag_arr.slice(1).join(' | ') + } + if (resData.service_tag) { + resData.service_tag_str = resData.service_tag.split(',').join(' | ') + } + if (resData.parameter_tag) { + resData.parameter_tag_str = resData.parameter_tag.split(',').join(' | ') + } + } catch(e) {} let swiperRange = this.data.swiperRange; @@ -159,14 +172,14 @@ Page({ commonApi._post("search/product_recommend", { offset: 0, - limit: 6, + limit: 4, rand: true, type: 'post', product_ids:options.id, }).then(res => { try { this.setData({ - tjList: res.data.list + tjList: res.data.list.slice(0,4) }) } catch (error) { console.log(error); diff --git a/pages/info/postProductInfo/index.wxml b/pages/info/postProductInfo/index.wxml index db828dc..e3ca65f 100644 --- a/pages/info/postProductInfo/index.wxml +++ b/pages/info/postProductInfo/index.wxml @@ -2,42 +2,45 @@ - - {{swiperCurrent+1}}/{{swiperRange.sku.max+1}} - - 视频 - 图片 - 款式 + + + + + + + + + + + + + + + + + + + {{item.sku_name}} + + + + + + + 视频 + 图片 + 款式 + + {{swiperCurrent+1}}/{{swiperRange.sku.max+1}} - - - - - - - - - - - - - - - - - - - - {{item.sku_name}} - - - - 补贴价 ¥{{ allowance_data.mini_price / 100 }}起 @@ -71,22 +74,25 @@ - + - - 预计48小时内发货 - 江苏苏州 | 快递:免运费 + + {{info.shipment_tag_arr[0]}} + {{info.shipment_tag_str}} > - + - 极速退款 | 未使用可退 | 客服售后 + {{info.service_tag_str}} > - + - 名称 鸡头米 | 产地 苏州 | 类型 机剥 | 重量 500g + {{info.parameter_tag_str}} > @@ -205,21 +211,21 @@ 预订须知 + - - + + + 产品推荐 - - {{item.title}} - - {{item.price/100}} - + + {{item.title}} + {{item.price/100}} @@ -348,19 +354,26 @@ {{otherInfoShow==3?"产品参数":otherInfoShow==2?"服务说明":"发货说明"}} - 该商品预计13小时内发货 - 订单支付成功后48小时内发货,若未在48小时内发货消费者 可联系客服咨询催促发货。 + + + + + + - + + + diff --git a/pages/info/postProductInfo/index.wxss b/pages/info/postProductInfo/index.wxss index 81ec2e2..04bedac 100644 --- a/pages/info/postProductInfo/index.wxss +++ b/pages/info/postProductInfo/index.wxss @@ -15,41 +15,45 @@ page { .swiper-bottom{ position: absolute; /* top: 750rpx; */ - margin-top: 694rpx; + bottom: 77rpx; right: 0; - width: fit-content; - height: 56rpx; - line-height: 56rpx; - /* background: rgba(1, 0, 0, 0.6); - border-radius: 13rpx 0 0 13rpx; */ + width: 90rpx; + height: fit-content; display: flex; + flex-direction: column; align-items: center; font-weight: 500; font-size: 24rpx; color: rgba(255,255,255,0.5); z-index: 10; - - overflow: hidden; } .swuper-bottom-bg{ - display: flex; background: rgba(1, 0, 0, 0.6); - border-radius: 13rpx 0 0 0; - padding: 0 5rpx; + border-radius: 20rpx 0rpx 0rpx 20rpx; + display: flex; + flex-direction: column; + width: 100%; + padding: 8rpx 0; + margin-bottom: 12rpx; } .swiper-bottom-item{ - padding: 0 14rpx; + width: 100%; + text-align: center; + padding: 14rpx 0; } .swiper-bottom-item.active{ color: #fff; } .swiper-bottom-item.bottom-number{ + max-width: 100%; + width: fit-content; background: rgba(1, 0, 0, 0.6); border-radius: 13rpx; height: 40rpx; line-height: 40rpx; padding: 0 10rpx; - margin-right: 6rpx; + overflow: hidden; + box-sizing: border-box; } .top-info { @@ -459,8 +463,9 @@ page { } .btns .btn:nth-child(1) { - margin-right: 3rpx; + /* margin-right: 3rpx; */ border-radius: 39rpx 0 0 39rpx; + background: #FD7601; } .btns .btn:nth-child(2) { @@ -692,6 +697,7 @@ width: 250rpx; border-radius: 50%; right: 20rpx; bottom: 166rpx; + z-index: 15; } .cart-box image { @@ -922,16 +928,16 @@ height: 133rpx; flex-wrap: wrap; } .proitem{ - width: 226rpx; - height: 234rpx; + width: 334rpx; + height: 497rpx; background: #FFFFFF; border-radius: 10rpx; margin-top: 20rpx; } .item-hd image{ - width: 226rpx; - height: 130rpx; - border-radius: 10rpx 10rpx 0px 0px; + width: 334rpx; + height: 342rpx; + border-radius: 13rpx 13rpx 0px 0px; } .item-bm{ padding: 8rpx 12rpx;