From 3dd2f91fbc88641202a272d8d179d40e0686ace4 Mon Sep 17 00:00:00 2001 From: QYF-GitLab1 <1940665526@qq.com> Date: 星期二, 08 七月 2025 16:24:00 +0800 Subject: [PATCH] 销售方式跳转、扫码、Isbn弹框、出版日期 --- packageDomain/pages/resourceDetails/document/index.js | 23 ++++++++--- pages/scanResult/index.js | 34 ++++++++++++----- packageDomain/pages/resourceDetails/myAudio/index.js | 6 ++- pages/home/home.wxml | 2 4 files changed, 46 insertions(+), 19 deletions(-) diff --git a/packageDomain/pages/resourceDetails/document/index.js b/packageDomain/pages/resourceDetails/document/index.js index 6117de8..f1399bd 100644 --- a/packageDomain/pages/resourceDetails/document/index.js +++ b/packageDomain/pages/resourceDetails/document/index.js @@ -416,13 +416,24 @@ learnSelectType: item.learnSelectType, }) } else { - wx.showToast({ - icon: 'none', - title: '璇峰厛杩斿洖璧勬簮鎵�鍦ㄥ浘涔﹁鎯呰喘涔拌棰戣祫婧�', + // wx.showToast({ + // icon: 'none', + // title: '璇峰厛杩斿洖璧勬簮鎵�鍦ㄥ浘涔﹁鎯呰喘涔拌棰戣祫婧�', + // }) + wx.showModal({ + title: '娓╅Θ鎻愮ず', + content: '璇峰厛杩斿洖璧勬簮鎵�鍦ㄥ浘涔﹁鎯呰喘涔拌棰戣祫婧�', + confirmText: '纭畾', + showCancel: false, // 鍏抽棴鍙栨秷鎸夐挳 + success: (res) => { + if (res.confirm) { + wx.navigateTo({ + url: `/packageBookService/pages/bookServices/detail/index?id=${this.data.bookDetail.id}&name=${this.data.bookDetail.name}&tabValue=jsek_cloudLearning`, + }); + } + } }) - wx.navigateTo({ - url: `/packageBookService/pages/bookServices/detail/index?id=${this.data.bookDetail.id}&name=${this.data.bookDetail.name}&tabValue=jsek_cloudLearning`, - }); + } }) }, diff --git a/packageDomain/pages/resourceDetails/myAudio/index.js b/packageDomain/pages/resourceDetails/myAudio/index.js index 9a87131..69afdd2 100644 --- a/packageDomain/pages/resourceDetails/myAudio/index.js +++ b/packageDomain/pages/resourceDetails/myAudio/index.js @@ -466,9 +466,11 @@ this.pubulicPlayFun(); } else { wx.showModal({ + title: '娓╅Θ鎻愮ず', content: '璇峰厛杩斿洖璧勬簮鎵�鍦ㄥ浘涔﹁鎯呰喘涔拌棰戣祫婧�', - showCancel: false, - complete: (res) => { + confirmText: '纭畾', + showCancel: false, // 鍏抽棴鍙栨秷鎸夐挳 + success: (res) => { if (res.confirm) { wx.navigateTo({ url: `/packageBookService/pages/bookServices/detail/index?id=${this.data.bookDetail.id}&name=${this.data.bookDetail.name}&tabValue=${this.data.formPath}`, diff --git a/pages/home/home.wxml b/pages/home/home.wxml index 52ee429..701fb14 100644 --- a/pages/home/home.wxml +++ b/pages/home/home.wxml @@ -41,7 +41,7 @@ </view> </view> <view class="listBox"> - <view wx:if="{{specialSubjectList.length > 0}}"> + <view class="listBox" wx:if="{{specialSubjectList.length > 0}}"> <view wx:for="{{specialSubjectList}}" wx:for-item="item" wx:for-index="index" wx:key="index" class="listItemBox"> <view class="listItem" bindtap="goSubjectDetail" data-book="{{item}}"> <view class="specialSubject-img"> diff --git a/pages/scanResult/index.js b/pages/scanResult/index.js index ae8c1a6..b274c29 100644 --- a/pages/scanResult/index.js +++ b/pages/scanResult/index.js @@ -237,16 +237,30 @@ }, }) .then(res => { - res.datas.map(item => { - item.name = item.name + '-' + this.data.goodsData.saleMethodList[0].name - item.price ? item.price = (item.price).toFixed(2) : ""; - item.oldPrice ? item.oldPrice = (item.oldPrice).toFixed(2) : ""; - item.icon ? item.icon = item.icon : item.icon = "/static/images/default-book-img.png", - item.itemType = this.data.goodsData.saleMethodList[0].type == 'createProductFolderSaleMethod' ? '鐩綍' : this.data.goodsData.saleMethodList[0].type == 'createProductItemSaleMethod' ? '璧勬簮' : '鐢靛瓙涔�' - }) - that.setData({ - productInfo: res.datas - }) + if (res.datas?.length > 0) { + const list = [] + this.data.goodsData.saleMethodList?.forEach(citem => { + const obj = { + name: res.datas[0].name + '-' + citem.name, + icon: res.datas[0].icon ? res.datas[0].icon : "/static/images/default-book-img.png", + itemType: citem.type == 'createProductFolderSaleMethod' ? '鐩綍' : citem.type == 'createProductItemSaleMethod' ? '璧勬簮' : '鐢靛瓙涔�', + price: res.datas[0].price ? (res.datas[0].price.price).toFixed(2) : "", + oldPrice: res.datas[0].oldPrice ? (res.datas[0].oldPrice).toFixed(2) : '' + } + list.push(obj) + }) + // res.datas.map(item => { + // item.name = item.name + '-' + this.data.goodsData.saleMethodList.map(item => item.name) + // item.price ? item.price = (item.price).toFixed(2) : ""; + // item.oldPrice ? item.oldPrice = (item.oldPrice).toFixed(2) : ""; + // item.icon ? item.icon = item.icon : item.icon = "/static/images/default-book-img.png", + // item.itemType = this.data.goodsData.saleMethodList[0].type == 'createProductFolderSaleMethod' ? '鐩綍' : this.data.goodsData.saleMethodList[0].type == 'createProductItemSaleMethod' ? '璧勬簮' : '鐢靛瓙涔�' + // }) + // debugger + that.setData({ + productInfo: list + }) + } }); }, -- Gitblit v1.9.1