diff --git a/pages/info/postProductInfo/index.js b/pages/info/postProductInfo/index.js index 0c6d2ad..89739fc 100644 --- a/pages/info/postProductInfo/index.js +++ b/pages/info/postProductInfo/index.js @@ -43,7 +43,8 @@ Page({ video: {min:0,max:0}, picture: {min:0,max:0}, sku: {min:0,max:0} - } + }, + otherInfoShow: 0, }, /** @@ -115,7 +116,7 @@ Page({ info: resData, supplierId: res.data.supplier_id, iShop: res.data.supplier_id ? true : false, - swiperRange: swiperRange + swiperRange: swiperRange, }) // 获取补贴 @@ -319,7 +320,8 @@ Page({ selectSku: function (e) { let index = e.currentTarget.dataset.index; this.setData({ - skuIndex: index + skuIndex: index, + swiperCurrent: index+this.data.swiperRange.picture.max+1 }) }, showOrder: function () { @@ -341,8 +343,14 @@ Page({ }) return; } + let swiperCurrent = this.data.swiperCurrent; + let skuIndex = swiperCurrent - this.data.swiperRange.sku.min + console.log(swiperCurrent, skuIndex) + if (skuIndex<0) {skuIndex=0} this.setData({ - skuFlag: 'order' + skuFlag: 'order', + skuIndex: skuIndex, + swiperCurrent: skuIndex+this.data.swiperRange.picture.max+1 }) } }) @@ -745,10 +753,12 @@ Page({ }, swiperChange (e) { + if(e.detail.source == "touch") { let index = e.detail.current this.setData({ swiperCurrent: index }) + } console.log(e, this.data.swiperCurrent) }, changeSwiperCurrent (e) { @@ -757,6 +767,15 @@ Page({ swiperCurrent: index }) }, + changeSimpleVal (e) { + let keyname = e.currentTarget.dataset.keyname; + let val = e.currentTarget.dataset.val; + let param = {} + param[keyname] = val + this.setData(param) + console.log(this.data) + }, + /** * 生命周期函数--监听页面初次渲染完成 diff --git a/pages/info/postProductInfo/index.wxml b/pages/info/postProductInfo/index.wxml index 3f7deb1..db828dc 100644 --- a/pages/info/postProductInfo/index.wxml +++ b/pages/info/postProductInfo/index.wxml @@ -1,12 +1,15 @@ - + - {{swiperCurrent+1}}/{{swiperRange.sku.max+1}} - 视频 - 图片 - 款式 + {{swiperCurrent+1}}/{{swiperRange.sku.max+1}} + + 视频 + 图片 + 款式 + + @@ -17,7 +20,7 @@ + show-progress="{{true}}" > @@ -51,19 +54,45 @@ + style="flex-shrink: 0;" src="{{info.headimg}}" bind:tap="changeSwiperCurrent" data-index="{{0}}"> 款式选择 - > + > {{info.title}} - - - - {{item}} @@ -314,4 +339,38 @@ - \ No newline at end of file + + + + + + + + {{otherInfoShow==3?"产品参数":otherInfoShow==2?"服务说明":"发货说明"}} + + 该商品预计13小时内发货 + 订单支付成功后48小时内发货,若未在48小时内发货消费者 可联系客服咨询催促发货。 + + + + + 名称 + 鸡头米 + + + 购买须知 + 购买须知购买须知购买须知购买须知购买须知购买须知购买须知购买须知购买须知购买须知 + + + + + + + + + + + 确定 + + + \ No newline at end of file diff --git a/pages/info/postProductInfo/index.wxss b/pages/info/postProductInfo/index.wxss index cf45b77..81ec2e2 100644 --- a/pages/info/postProductInfo/index.wxss +++ b/pages/info/postProductInfo/index.wxss @@ -20,22 +20,37 @@ page { width: fit-content; height: 56rpx; line-height: 56rpx; - background: rgba(1, 0, 0, 0.6); - border-radius: 13rpx 0 0 13rpx; + /* background: rgba(1, 0, 0, 0.6); + border-radius: 13rpx 0 0 13rpx; */ display: flex; + align-items: center; font-weight: 500; font-size: 24rpx; color: rgba(255,255,255,0.5); z-index: 10; - padding: 0 5rpx; + overflow: hidden; } +.swuper-bottom-bg{ + display: flex; + background: rgba(1, 0, 0, 0.6); + border-radius: 13rpx 0 0 0; + padding: 0 5rpx; +} .swiper-bottom-item{ padding: 0 14rpx; } .swiper-bottom-item.active{ color: #fff; } +.swiper-bottom-item.bottom-number{ + background: rgba(1, 0, 0, 0.6); + border-radius: 13rpx; + height: 40rpx; + line-height: 40rpx; + padding: 0 10rpx; + margin-right: 6rpx; +} .top-info { background: white; @@ -647,18 +662,15 @@ width: 250rpx; font-size: 36rpx; z-index: 1; } */ -.icon-fenxiang { +.share-icon { position: absolute; right: 20rpx; margin-top: 20rpx; width: 60rpx; - line-height: 60rpx; - background: rgba(0, 0, 0, 0.4); - border-radius: 50%; - text-align: center; - color: #fff; - font-size: 36rpx; + height: 60rpx; z-index: 1; + background-image: url("https://static.ticket.sz-trip.com/uploads/20250826/81287df192b80ea03318e06b2b19ebe1.png"); + background-size: 100% 100%; } .icon-shoucang { @@ -1176,3 +1188,74 @@ color: #010101; +.other-info-box{ +} +.other-info-box .other-info-item{ + display: flex; + align-items: center; + font-weight: 500; + font-size: 27rpx; + color: #666666; + margin-top: 30rpx; +} +.other-info-box .other-info-item image{ + width: 32rpx; + height: 32rpx; + flex-shrink: 0; +} +.other-info-box .view-arrow{ + font-family: fangsong; + color: #999; + width: 25rpx; + flex-shrink: 0; +} +.other-info-box .other-content{ + padding: 0 20rpx; + overflow: hidden; + flex: 1; + width: 100rpx; + +} + +.other-info-content{ + min-height: 600rpx; + padding: 32rpx 23rpx; +} +.other-info-content .title{ + font-weight: bold; + font-size: 33rpx; + color: #060001; + text-align: center; + margin-bottom: 36rpx; +} +.other-info-content .key-title{ + color: #060001; + font-size: 27.67rpx; + line-height: 40rpx; + font-weight: bold; +} +.other-info-content .key-content{ + color: #666; + font-size: 27.67rpx; + line-height: 40rpx; + margin-top: 6rpx; +} +.prod-param{ + display: flex; + align-items: flex-start; + margin-bottom: 45rpx; +} +.prod-param .prod-key{ + flex: 1; + flex-shrink: 0; + font-weight: 500; + font-size: 27rpx; + color: #666666; +} +.prod-param .prod-content{ + flex: 1; + flex-shrink: 0; + font-weight: 500; +font-size: 27rpx; +color: #000000; +} \ No newline at end of file diff --git a/project.private.config.json b/project.private.config.json index 5822978..ddd41d2 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -6,6 +6,13 @@ "condition": { "miniprogram": { "list": [ + { + "name": "pages/info/postProductInfo/index", + "pathName": "pages/info/postProductInfo/index", + "query": "id=457638", + "launchMode": "default", + "scene": null + }, { "name": "pages/order/pay/index", "pathName": "pages/order/pay/index", diff --git a/utils/https.js b/utils/https.js index ac1e739..c120ad9 100644 --- a/utils/https.js +++ b/utils/https.js @@ -1,8 +1,8 @@ var app = getApp(); import util from "../utils/util" // import userApi from "../utils/https/user.js"; -// const baseUrl = "https://test.api.cloud.sz-trip.com/api/"; -let baseUrl = "https://api.cloud.sz-trip.com/api/"; +const baseUrl = "https://test.api.cloud.sz-trip.com/api/"; +// let baseUrl = "https://api.cloud.sz-trip.com/api/"; const env = wx.getAccountInfoSync().miniProgram.envVersion if (env == 'develop1') { baseUrl = "https://test.api.cloud.sz-trip.com/api/"