| | |
| | | bookId: { |
| | | type: Number |
| | | }, |
| | | isshowDrawBtn:{ |
| | | type:Boolean |
| | | isshowDrawBtn: { |
| | | type: Boolean |
| | | }, |
| | | successOrderNumber: { |
| | | type: Number, |
| | | |
| | | } |
| | | }, |
| | | |
| | |
| | | // this.triggerEvent('allAddShoppiingCar', myEventDetail, myEventOption) |
| | | // }, |
| | | goBuyResource() { |
| | | console.log(this.properties.successOrderNumber); |
| | | if(this.properties.successOrderNumber !== 0){ |
| | | |
| | | |
| | | |
| | | } |
| | | wx.navigateTo({ |
| | | url: `/packageBookService/pages/bookServices/detail/buyResource/index?productLinkPath=${this.properties.buyResourceData.productLinkPath}&refCode=${this.properties.buyResourceData.refCode}&bookId=${this.properties.bookId}`, |
| | | }) |
| | | |
| | | |
| | | }, |
| | | |
| | | changeReceive(type) { |
| | |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | }) |
| | |
| | | display: flex; |
| | | justify-content: space-evenly; |
| | | align-items: center; |
| | | padding: 0 0 20rpx 15rpx; |
| | | /* padding: 0 0 20rpx 15rpx; */ |
| | | padding: 5rpx; |
| | | border-bottom: 1px solid #EFF0F1; |
| | | } |
| | | |
| | |
| | | .btn-box { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | width: 49%; |
| | | width: 50%; |
| | | } |
| | | |
| | | .practice-btn { |
| | |
| | | item.isShopCar = false |
| | | this.triggerEvent("updateCloudLearning") |
| | | } |
| | | |
| | | } |
| | | }, |
| | | sadd() { |
| | |
| | | width: '100%' |
| | | }, |
| | | ], |
| | | showIndex: '' |
| | | showIndex: '', |
| | | successOrderNumber: '' |
| | | }, |
| | | |
| | | resetTree: function (e) { |
| | |
| | | }, |
| | | }; |
| | | app.MG.store.getProductDetail(query).then(async (res) => { |
| | | console.log(res.datas, 'res.datas'); |
| | | this.setData({ |
| | | bookDetail: res.datas, |
| | | buyIdList: res.datas.purchasedSaleMethodIdList, |
| | |
| | | this.setData({ |
| | | noFile: true, |
| | | }); |
| | | // debugger |
| | | if (this.data.bookDetail.pdf) { |
| | | this.setData({ |
| | | "fileInfo.bookName": this.data.bookDetail.name, |
| | |
| | | "fileInfo.freePage": this.data.bookDetail.probationPage, |
| | | }); |
| | | } else if (this.data.bookDetail.protectedEpub) { |
| | | |
| | | this.setData({ |
| | | "fileInfo.bookName": this.data.bookDetail.name, |
| | | "fileInfo.fileType": "epub", |
| | |
| | | }, |
| | | // 申请教学资源 |
| | | applyResource() { |
| | | if (this.data.applyResourceState) { |
| | | return wx.showToast({ |
| | | icon: "error", |
| | | title: "请勿重复点击", |
| | | }); |
| | | } |
| | | |
| | | // if (this.data.applyResourceState) { |
| | | // return wx.showToast({ |
| | | // icon: "error", |
| | | // title: "请勿重复点击", |
| | | // }); |
| | | // } |
| | | this.setData({ |
| | | applyResourceState: true, |
| | | }); |
| | |
| | | }; |
| | | // 确认订单 |
| | | const confirmOrderRes = await app.MG.store.confirmOrder(parameter); |
| | | console.log(confirmOrderRes.orderNumber, 'confirmOrderRes.orderNumber'); |
| | | |
| | | |
| | | |
| | | if (confirmOrderRes.orderNumber) { |
| | | child.changeReceive(false); |
| | | wx.showToast({ |
| | | title: "领取成功", |
| | | }); |
| | | this.getBookInfo(this.data.bookId); |
| | | this.setData({ |
| | | successOrderNumber: confirmOrderRes.orderNumber |
| | | }) |
| | | |
| | | |
| | | } |
| | | } catch (error) { |
| | | console.log(error); |
| | |
| | | }); |
| | | return false; |
| | | } |
| | | |
| | | // debugger |
| | | wx.navigateTo({ |
| | | url: "/packageBookService/pages/components/webView/index?md5=" + |
| | | this.data.fileInfo.md5 + |
| | |
| | | </t-tab-panel> |
| | | <t-tab-panel label="云学习" icon="{{tabValue == 'jsek_cloudLearning' ? learnResourceClickIcon : learnResourceIcon}}" value="jsek_cloudLearning" style="{{tabPanelstyle}}"> |
| | | <view wx:if="{{!loading && learn.length}}"> |
| | | <learn-resource bind:getFreeResource="getFreeResource" bind:allAddShoppiingCar="allAddShoppiingCar" id="learn-resource" buyResourceData="{{buyResourceData}}" bookId="{{bookDetail.id}}" isshowDrawBtn="{{isshowDrawBtn}}"></learn-resource> |
| | | <learn-resource bind:getFreeResource="getFreeResource" bind:allAddShoppiingCar="allAddShoppiingCar" id="learn-resource" buyResourceData="{{buyResourceData}}" bookId="{{bookDetail.id}}" isshowDrawBtn="{{isshowDrawBtn}}" successOrderNumber="{{successOrderNumber}}" ></learn-resource> |
| | | |
| | | <tree id="tree" openIds="{{openLearnids}}" bookInfo="{{bookDetail}}" tab="{{tabValue}}" treeList="{{learn}}" buyIds="{{buyIdList}}" openLearnids="{{openLearnids}}" bind:updateShoppingCartHidden="updateShoppingCartHidden" bind:updateCloudLearning="updateCloudLearning"></tree> |
| | | </view> |
| | |
| | | // 播放完成处理,按钮变一下 |
| | | myAudio.onEnded((res) => { |
| | | this.setData({ |
| | | isplay: false |
| | | isplay: true |
| | | }) |
| | | }); |
| | | |
| | |
| | | myAudioPos: myAudio.currentTime / myAudio.duration * 100, |
| | | myAudioCurrent: this.format(myAudio.currentTime), |
| | | myAudioDuration: this.format(myAudio.duration), |
| | | |
| | | }); |
| | | }) |
| | | console.log(this.data.myAudioCurrent); |
| | |
| | | this.setData({ |
| | | myAudioPos: position, |
| | | myAudioCurrent: this.format(currentTime) |
| | | |
| | | }) |
| | | }, |
| | | |
| | |
| | | |
| | | .outsideDetailsName { |
| | | overflow-y: scroll; |
| | | overflow-x: hidden; |
| | | height: 35vh; |
| | | } |
| | | |
| | |
| | | width: 210rpx; |
| | | display: flex; |
| | | flex-direction: row; |
| | | |
| | | } |
| | | |
| | | .wrapper { |
| | |
| | | height: 0px !important; |
| | | } |
| | | |
| | | .t-tabs__scroll::after { |
| | | height: 0rpx !important; |
| | | } |
| | | |
| | | .buttonBox { |
| | | position: absolute; |
| | | top: 95rpx; |
| | |
| | | |
| | | .outsideDetailsName { |
| | | overflow-y: scroll; |
| | | overflow-x: hidden; |
| | | height: 35vh; |
| | | } |
| | | |
| | | .wrapper { |
| | | /* .wrapper { |
| | | overflow-y: scroll; |
| | | height: 45vh; |
| | | } |
| | | } */ |
| | |
| | | this.getDataList(false); |
| | | }, |
| | | async goBookDetails(e) { |
| | | |
| | | console.log(e.currentTarget.dataset); |
| | | const { |
| | | book, |
| | | remarks |
| | | } = e.currentTarget.dataset; |
| | | let parentData = null; |
| | | let bookId = book.orderSaleMethod.product.id; |
| | | if (remarks == null) { |
| | | parentData = await app.MG.store.getProductBySaleMethod({ |
| | | 'saleMethodId': book.orderSaleMethod.id |
| | | }) |
| | | |
| | | parentData = await app.MG.store.getProductBySaleMethod({ |
| | | 'saleMethodId': book.orderSaleMethod.id |
| | | }) |
| | | if (parentData.parentProduct.length > 0) { |
| | | bookId = parentData.parentProduct[parentData.parentProduct.length - 1].id; |
| | | } else if (remarks != null && JSON.parse(remarks).pId) { |
| | | bookId = JSON.parse(remarks).pId |
| | | } |
| | | wx.navigateTo({ |
| | | url: `/packageBookService/pages/bookServices/detail/index?id=${bookId}&name=${book.name}`, |
| | |
| | | fileType: [], |
| | | jsek_resource: [], |
| | | freeFile: [], |
| | | bookshelf_freeEpub: [], //epub试读百分比 |
| | | bookshelf_probationPage: [], //pdf试读页数 |
| | | ...searchObj |
| | | }, |
| | | SysType: 'CmsItem' |
| | |
| | | }) |
| | | wx.stopPullDownRefresh() |
| | | }, |
| | | // downloadData(event) { |
| | | // this.setData({ |
| | | // downloadLoadin: true |
| | | // }) |
| | | // console.log(111); |
| | | // const item = event.currentTarget.dataset.item; |
| | | // // console.log(item.datas.freeFile.Value); |
| | | // const URL = app.config.requestCtx + '/file/api/ApiDownload?md5=' + item.datas.freeFile.Value |
| | | // item.determine = false |
| | | // console.log(URL, 'URL'); |
| | | // setTimeout(() => { |
| | | // if (URL) { |
| | | // item.determine = true |
| | | // } |
| | | // }, 600) |
| | | // wx.downloadFile({ |
| | | // url: URL, |
| | | // success: function (res) { |
| | | // const filePath = res.tempFilePath; |
| | | // wx.openDocument({ |
| | | // filePath: filePath, |
| | | // success: function (res) { |
| | | // console.log('打开文档成功'); |
| | | // }, |
| | | // fail: function (res) { |
| | | // console.log('打开文档失败', res); |
| | | // } |
| | | // }); |
| | | // }, |
| | | // fail: function (res) { |
| | | // console.log('下载文件失败', res); |
| | | // } |
| | | // }); |
| | | // setTimeout(() => { |
| | | // this.setData({ |
| | | // downloadLoadin: false |
| | | // }); |
| | | // }, 2000); |
| | | // }, |
| | | downloadData(event) { |
| | | this.setData({ |
| | | downloadLoadin: true |
| | | }) |
| | | console.log(111); |
| | | const item = event.currentTarget.dataset.item; |
| | | // console.log(item.datas.freeFile.Value); |
| | | const URL = app.config.requestCtx + '/file/api/ApiDownload?md5=' + item.datas.freeFile.Value |
| | | item.determine = false |
| | | console.log(URL, 'URL'); |
| | | setTimeout(() => { |
| | | if (URL) { |
| | | item.determine = true |
| | | } |
| | | }, 600) |
| | | wx.downloadFile({ |
| | | url: URL, |
| | | success: function (res) { |
| | | const filePath = res.tempFilePath; |
| | | wx.openDocument({ |
| | | filePath: filePath, |
| | | success: function (res) { |
| | | console.log('打开文档成功'); |
| | | }, |
| | | fail: function (res) { |
| | | console.log('打开文档失败', res); |
| | | } |
| | | }); |
| | | }, |
| | | fail: function (res) { |
| | | console.log('下载文件失败', res); |
| | | } |
| | | |
| | | const item = event.currentTarget.dataset.item |
| | | console.log(item); |
| | | wx.navigateTo({ |
| | | url: "/packageBookService/pages/components/webView/index?md5=" + |
| | | item.freeFile + |
| | | "&fileName=" + |
| | | item.name + |
| | | "&fileType=" + |
| | | item.fileType + "&bookBuy=true" |
| | | // "&freePage=" + |
| | | // this.data.fileInfo.freePage + |
| | | |
| | | // + |
| | | // "&bookId=" + |
| | | // this.data.bookDetail.id, |
| | | }); |
| | | setTimeout(() => { |
| | | this.setData({ |
| | | downloadLoadin: false |
| | | }); |
| | | }, 2000); |
| | | |
| | | |
| | | }, |
| | | onSearchSubmit: function (e) { |
| | | const keyword = e.detail.value; |
| | |
| | | |
| | | .contentBox { |
| | | margin-top: 200rpx; |
| | | /* |
| | | -webkit-transform: translateX(52.796875px); |
| | | transform: translateX(52.796875px); */ |
| | | |
| | | } |
| | | |
| | | .noDataBox { |
| | |
| | | /* background-size: 100% 100%; |
| | | background-position: 100% 100%; */ |
| | | background-image: url(https://jsek.bnuic.com/home/image/click-icon.png); |
| | | background-position: right center; |
| | | background-size: 40% 90%; |
| | | background-position: 90% center; |
| | | background-size: 30% 60%; |
| | | /* 将背景图片位置设置为靠右 */ |
| | | } |
| | | |
| | | .t-search__input-box .t-input__keyword { |
| | | font-size: var(--td-search-font-size, var(--td-font-size-m, 28rpx)) !important; |
| | | } |
| | |
| | | * 页面的初始数据 |
| | | */ |
| | | data: { |
| | | start: 1, |
| | | loading: true, |
| | | hidden: true, |
| | | bookName: '', |
| | |
| | | navBarHeight: '', |
| | | barHeight: '', |
| | | subtitleName: '', |
| | | totalSize: '', |
| | | passId: '', |
| | | isMore: null, |
| | | }, |
| | | |
| | | /** |
| | |
| | | |
| | | this.setData({ |
| | | bookName: options.bookName, |
| | | subtitleName: options.subtitleName |
| | | subtitleName: options.subtitleName, |
| | | passId: options.id |
| | | }) |
| | | |
| | | const passId = options.id |
| | | |
| | | this.bookExhibitionGet(passId) |
| | | this.getBookExhibitionDetails(passId) |
| | | this.getBookExhibitionDetails() |
| | | }, |
| | | |
| | | /** |
| | |
| | | }) |
| | | }, |
| | | //书展详情接口 |
| | | getBookExhibitionDetails(passId) { |
| | | this.setData({ |
| | | loading: true, |
| | | hidden: true, |
| | | }) |
| | | getBookExhibitionDetails() { |
| | | |
| | | app.MG.store.getProductList({ |
| | | path: '*', |
| | | storeInfo: 'jsek_bookFair', |
| | | mainProductId: passId, |
| | | mainProductId: this.data.passId, |
| | | queryType: 'Related', // 查询类型: Related:查询关联商品;SubProduct: 查询子商品; |
| | | paging: { |
| | | start: 0, |
| | | size: this.data.start * 6 |
| | | }, |
| | | fields: { |
| | | author: [], |
| | | publicationDate: [], |
| | |
| | | }).then(res => { |
| | | |
| | | this.setData({ |
| | | bookExhibitionList: res.datas |
| | | bookExhibitionList: res.datas, |
| | | totalSize: res.total |
| | | }) |
| | | console.log(this.data.bookExhibitionList, 'bookExhibitionList'); |
| | | |
| | | this.setData({ |
| | | loading: false, |
| | | hidden: false, |
| | |
| | | goBack() { |
| | | wx.navigateBack(); |
| | | }, |
| | | // 触底函数 |
| | | onReachBottom() { |
| | | console.log(this.data.bookExhibitionList.length); |
| | | console.log(this.data.totalSize); |
| | | if (this.data.bookExhibitionList.length < this.data.totalSize) { |
| | | console.log(11111); |
| | | this.setData({ |
| | | isMore: true, |
| | | start: this.data.start + 1 |
| | | }) |
| | | this.getBookExhibitionDetails() |
| | | } else { |
| | | this.setData({ |
| | | isMore: true, |
| | | }) |
| | | setTimeout(() => { |
| | | this.setData({ |
| | | isMore: false |
| | | }) |
| | | console.log('300'); |
| | | }, 300) |
| | | } |
| | | }, |
| | | |
| | | }) |
| | |
| | | { |
| | | "component": true, |
| | | "usingComponents": { |
| | | "t-icon": "tdesign-miniprogram/icon/icon" |
| | | "t-icon": "tdesign-miniprogram/icon/icon", |
| | | "t-loading": "tdesign-miniprogram/loading/loading" |
| | | }, |
| | | "navigationStyle": "custom" |
| | | "navigationStyle": "custom", |
| | | "enablePullDownRefresh": true, |
| | | "onReachBottomDistance": 200 |
| | | } |
| | |
| | | <view class="booksTextBox"> <text>{{item.name}}</text></view> |
| | | <view class="boosAuthor">{{item.author}}</view> |
| | | </view> |
| | | <view wx:if="{{bookExhibitionList.length > 0}}" class="bottom-box"> |
| | | <t-loading theme="circular" size="40rpx" class="wrapper" wx:if="{{isMore == true}}" /> |
| | | <text wx:if="{{isMore == false}}">没有更多了</text> |
| | | </view> |
| | | </view> |
| | | |
| | | </view> |
| | |
| | | |
| | | .outsideHeadBox { |
| | | margin-top: 200rpx; |
| | | } |
| | | |
| | | .bottom-box { |
| | | margin: 0 auto; |
| | | } |
| | |
| | | * 页面的初始数据 |
| | | */ |
| | | data: { |
| | | product: { |
| | | value: 'all', |
| | | options: [{ |
| | | value: 'all', |
| | | label: '全部产品', |
| | | }, |
| | | { |
| | | value: 'new', |
| | | label: '最新产品', |
| | | }, |
| | | { |
| | | value: 'hot', |
| | | label: '最火产品', |
| | | }, |
| | | ], |
| | | }, |
| | | loading: true, |
| | | hidden: true, |
| | | totalSize: '', |
| | |
| | | sorter: { |
| | | value: 'default', |
| | | }, |
| | | // product: { |
| | | // value: '*', |
| | | // options: [{ |
| | | // value: '*', |
| | | // label: '总分类', |
| | | // }, |
| | | // { |
| | | // value: 'jsek_bFHigherEducation', |
| | | // //重点项目 |
| | | // price: 'jsek_higherEducation', |
| | | // label: '高等教育', |
| | | // }, |
| | | // { |
| | | // value: 'jsek_bFVocationalEducation', |
| | | // //重点项目 |
| | | // price: 'jsek_vocationalEducation', |
| | | // label: '职业教育', |
| | | // }, |
| | | // { |
| | | // value: 'jsek_bFTeacherEducation', |
| | | // //重点项目 |
| | | // price: 'jsek_teacherEducation', |
| | | // label: '教师教育', |
| | | // }, |
| | | // ], |
| | | // }, |
| | | product: { |
| | | value: '*', |
| | | options: [{ |
| | | value: '*', |
| | | label: '总分类', |
| | | }, |
| | | { |
| | | value: 'jsek_bFHigherEducation', |
| | | //重点项目 |
| | | price: 'jsek_higherEducation', |
| | | label: '高等教育', |
| | | }, |
| | | { |
| | | value: 'jsek_bFVocationalEducation', |
| | | //重点项目 |
| | | price: 'jsek_vocationalEducation', |
| | | label: '职业教育', |
| | | }, |
| | | { |
| | | value: 'jsek_bFTeacherEducation', |
| | | //重点项目 |
| | | price: 'jsek_teacherEducation', |
| | | label: '教师教育', |
| | | }, |
| | | ], |
| | | }, |
| | | multipleSelect: { |
| | | value: [], |
| | | options: [], |
| | |
| | | }, |
| | | |
| | | |
| | | |
| | | |
| | | // 总分类 |
| | | // 总分类 |
| | | onChange(e) { |
| | | console.log(e); |
| | | // e.stopImmediatePropagation(); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | this.data.page.size = 16 //更改显示的值 |
| | | const newValue = e.detail.value; |
| | | const selectedOption = this.data.product.options.find(option => option.value === newValue); |
| | | const newPrice = selectedOption ? selectedOption.price : null; |
| | | const bookExhibitionListsubsidiary = [] |
| | | this.setData({ |
| | | bookExhibitionListsubsidiary: this.data.bookExhibitionList |
| | | }) |
| | | console.log(bookExhibitionListsubsidiary, 'bookExhibitionListsubsidiary'); |
| | | console.log(newValue, 'newValue'); |
| | | console.log(newPrice, 'newPrice'); |
| | | |
| | | if (newPrice) { |
| | | this.setData({ |
| | | keynoteDisabled: false |
| | | }) |
| | | } |
| | | if (!newPrice) { |
| | | this.setData({ |
| | | keynoteDisabled: true |
| | | }) |
| | | } |
| | | console.log(newValue); |
| | | this.setData({ |
| | | 'product.value': newValue, |
| | | 'product.price': newPrice, // 将选中的 price 值保存在数据中 |
| | | }); |
| | | this.bookExhibitionGet(newValue); |
| | | this.keyProjectsGet(newPrice); |
| | | // 调用更新页面数据的函数,传入新的 value 和 price 值 |
| | | |
| | | if (this.data.keynoteValue) { |
| | | //如果有数据就清空并刷新页面 |
| | | this.data.keynoteValue = [] |
| | | this.bookExhibitionGet(newValue) |
| | | this.onLoad() |
| | | } |
| | | // e.stopImmediatePropagation() |
| | | |
| | | }, |
| | | |
| | | // 总分类 |
| | | // 总分类 |
| | | // onChange(e) { |
| | | |
| | | // this.data.page.size = 16 //更改显示的值 |
| | | // const newValue = e.detail.value; |
| | | // const selectedOption = this.data.product.options.find(option => option.value === newValue); |
| | | // const newPrice = selectedOption ? selectedOption.price : null; |
| | | // const bookExhibitionListsubsidiary = [] |
| | | // this.setData({ |
| | | // bookExhibitionListsubsidiary: this.data.bookExhibitionList |
| | | // }) |
| | | // console.log(bookExhibitionListsubsidiary, 'bookExhibitionListsubsidiary'); |
| | | // console.log(newValue, 'newValue'); |
| | | // console.log(newPrice, 'newPrice'); |
| | | |
| | | // if (newPrice) { |
| | | // this.setData({ |
| | | // keynoteDisabled: false |
| | | // }) |
| | | // } |
| | | // if (!newPrice) { |
| | | // this.setData({ |
| | | // keynoteDisabled: true |
| | | // }) |
| | | // } |
| | | // console.log(newValue); |
| | | // this.setData({ |
| | | // 'product.value': newValue, |
| | | // 'product.price': newPrice, // 将选中的 price 值保存在数据中 |
| | | // }); |
| | | // this.bookExhibitionGet(newValue); |
| | | // this.keyProjectsGet(newPrice); |
| | | // // 调用更新页面数据的函数,传入新的 value 和 price 值 |
| | | |
| | | // if (this.data.keynoteValue) { |
| | | // //如果有数据就清空并刷新页面 |
| | | // this.data.keynoteValue = [] |
| | | // this.bookExhibitionGet(newValue) |
| | | // this.onLoad() |
| | | // } |
| | | // }, |
| | | |
| | | // 重点项目 |
| | | handleMultipleSelect(e) { |
| | |
| | | }); |
| | | }, |
| | | handleConfirm(event) { |
| | | |
| | | |
| | | |
| | | const { |
| | | value |
| | | } = event.detail; |
| | |
| | | console.log(e.detail.value, 'e.detail.value'); |
| | | this.bookExhibitionGet() |
| | | }, |
| | | onTest() { |
| | | onOpend() { |
| | | console.log(7555); |
| | | } |
| | | }) |
| | |
| | | <view class="menuBox"> |
| | | <t-dropdown-menu> |
| | | |
| | | <!-- show-overlay="{{false}}" --> |
| | | |
| | | <!-- <t-dropdown-item options="{{product.options}}" value="{{product.value}}" bindchange="onChange" /> --> |
| | | <t-dropdown-item options="{{product.options}}" value="{{product.value}}" bindchange="onChange" /> |
| | | |
| | | |
| | | <!-- disabled="{{keynoteDisabled}}" --> |
| | | <t-dropdown-item label=" 重点项目" options="{{multipleSelect.options}}" value="{{multipleSelect.value}}" bindchange="handleMultipleSelect" multiple bind:confirm="handleConfirm" bind:reset="handleReset"> |
| | | <t-dropdown-item disabled="{{keynoteDisabled}}" label=" 重点项目" options="{{multipleSelect.options}}" value="{{multipleSelect.value}}" bindchange="handleMultipleSelect" multiple bind:confirm="handleConfirm" bind:reset="handleReset"> |
| | | </t-dropdown-item> |
| | | |
| | | <t-dropdown-item options="{{sorter.options}}" default-value="{{sorter.value}}" bindchange="onSort" /> |
| | | |
| | | </t-dropdown-menu> |
| | | <!-- <view class="outsideSortBox"> |
| | | <view class="sortBox" bind:tap="onSwapRight"> |
| | | <text>排序</text> |
| | | <view class="iconBox"> |
| | | <t-icon class="swapRight" name="swap-right" size="35rpx" color="{{nameSort == 'Asc' ? '#ff6c00' : ''}}" /> |
| | | <t-icon class="swapLeft" name="swap-right" size="35rpx" color="{{nameSort == 'Desc' ? '#ff6c00' : ''}}" /> |
| | | </view> |
| | | </view> |
| | | </view> --> |
| | | |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | </view> |
| | | <view class="contentBox" wx:for="{{bookExhibitionList}}" wx:key="index" wx:for-item="item" wx:for-index="index" data-item="{{item}}" bind:tap="onBookExhibitionDetails"> |
| | | <view class="imageBox"> |
| | | <view></view> |
| | | <image wx:if="{{item.icon}}" src="{{item.icon}}" mode="aspectFit" /> |
| | | <image wx:else src="/static/images/bookExhibitionList/banner.png" mode="aspectFit" /> |
| | | </view> |
| | |
| | | width: 330rpx; |
| | | margin: 10px 0; |
| | | background-color: #fff; |
| | | /* z-index: 11600; */ |
| | | } |
| | | |
| | | .contentBox .imageBox { |
| | |
| | | height: calc(100vh - 300rpx); |
| | | /* width: calc(100vw - 60rpx); */ |
| | | /* height: 700rpx; */ |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | .t-search__input-box--square { |
| | | border-radius: var(--td-search-square-radius, var(--td-radius-default, 36rpx)) !important; |
| | | height: 72rpx; |
| | | } |
| | | |
| | | .t-radio { |
| | | font-size: var(--td-radio-font-size, 28rpx) !important; |
| | | } |
| | |
| | | /* padding: 30rpx; */ |
| | | background: #F2F3F8; |
| | | border-radius: 18rpx 18rpx 18rpx 18rpx; |
| | | padding-bottom: 325rpx; |
| | | /* padding-bottom: 325rpx; */ |
| | | height: calc(100vh - 250rpx); |
| | | |
| | | /* width: calc(100vw - 60rpx); */ |
| | | |
| | | } |
| | |
| | | margin: 30rpx 0; |
| | | border-radius: 18rpx 18rpx 18rpx 18rpx; |
| | | height: 260rpx; |
| | | |
| | | } |
| | | |
| | | .totalPriceText { |
| | |
| | | |
| | | .noDataBox { |
| | | width: 100%; |
| | | margin-top: 200rpx; |
| | | /* margin-top: 200rpx; */ |
| | | height: 620rpx; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | |
| | | // pages/cart/paymentPage/index.js |
| | | import Toast from 'tdesign-miniprogram/toast/index'; |
| | | |
| | | const app = getApp() |
| | | import { |
| | | getPublicImage |
| | |
| | | } |
| | | } |
| | | app.MG.store.getUserOrderList(data).then((res) => { |
| | | |
| | | res.datas.forEach((item) => { |
| | | this.data.myOrderOrderNumber.push(item.saleMethodLinks[0].orderSaleMethod.id) |
| | | console.log(this.data.myOrderOrderNumber); |
| | |
| | | // 用户未绑定微信 报500 |
| | | app.MG.store.makeWeChatPay(resOrderNum).then(payRes => { |
| | | console.log(payRes, 'payRes'); |
| | | const payVal = JSON.parse(payRes); |
| | | console.log(payVal); |
| | | wx.requestPayment({ |
| | | "appId": payVal.appId, |
| | | "timeStamp": payVal.timeStamp, |
| | | "nonceStr": payVal.nonceStr, |
| | | "package": payVal.package, |
| | | "signType": payVal.signType, |
| | | "paySign": payVal.paySign, |
| | | success: function (res) { |
| | | console.log('支付成功'); |
| | | if (res.errMsg == 'requestPayment:ok') { |
| | | that.setData({ |
| | | isPaySuccess: true |
| | | }) |
| | | if (payRes) { |
| | | const payVal = JSON.parse(payRes); |
| | | console.log(payVal); |
| | | wx.requestPayment({ |
| | | "appId": payVal.appId, |
| | | "timeStamp": payVal.timeStamp, |
| | | "nonceStr": payVal.nonceStr, |
| | | "package": payVal.package, |
| | | "signType": payVal.signType, |
| | | "paySign": payVal.paySign, |
| | | success: function (res) { |
| | | console.log('支付成功'); |
| | | if (res.errMsg == 'requestPayment:ok') { |
| | | that.setData({ |
| | | isPaySuccess: true |
| | | }) |
| | | } |
| | | }, |
| | | fail: function (res) { |
| | | console.log('支付失败'); |
| | | }, |
| | | // 无论支付成功失败都会调用 |
| | | "complete": function (res) { |
| | | if (res.errMsg == 'requestPayment:ok') { |
| | | that.setData({ |
| | | isPayComplete: true |
| | | }) |
| | | } |
| | | if (that.data.isPaySuccess && that.data.isPayComplete) { |
| | | that.navToBack() |
| | | } |
| | | } |
| | | }, |
| | | fail: function (res) { |
| | | console.log('支付失败'); |
| | | }, |
| | | // 无论支付成功失败都会调用 |
| | | "complete": function (res) { |
| | | if (res.errMsg == 'requestPayment:ok') { |
| | | that.setData({ |
| | | isPayComplete: true |
| | | }) |
| | | } |
| | | if (that.data.isPaySuccess && that.data.isPayComplete) { |
| | | that.navToBack() |
| | | } |
| | | } |
| | | }); |
| | | }); |
| | | } else { |
| | | Toast({ |
| | | context: this, |
| | | selector: '#t-toast', |
| | | message: '支付失败', |
| | | theme: 'warning', |
| | | direction: 'column', |
| | | }); |
| | | } |
| | | |
| | | }) |
| | | } |
| | | }) |
| | |
| | | }, |
| | | // 页面返回 |
| | | navToBack() { |
| | | |
| | | this.getOrderByOrderNumData() |
| | | // 返回 |
| | | wx.navigateBack() |
| | | }, |
| | |
| | | <view class="shoppingCartList"> |
| | | <view class="cartList" wx:for="{{productList}}" wx:key="index" wx:for-item="item" wx:for-index="index"> |
| | | <view class="imageBox"> |
| | | <image wx:if="{{item.paymentIcon}}" src="{{item.paymentIcon }}" mode="aspectFill" /> |
| | | <image wx:if="{{item.paymentIcon}}" src="{{item.paymentIcon }}" mode="aspectFit" /> |
| | | <image wx:else src="/static/images/default-book-img.png" class="imageStyle" mode="aspectFit" /> |
| | | </view> |
| | | <view class="cartListContent"> |
| | |
| | | color: #FF6C00 !important; |
| | | } |
| | | |
| | | .t-tabs__track { |
| | | background-color: #FF6C00 !important; |
| | | } |
| | | |
| | | .noDataBox { |
| | | margin: 0 auto; |
| | |
| | | -webkit-transform: translateX(38.9921875px) !important; |
| | | transform: translateX(38.9921875px) !important; |
| | | } */ |
| | | |
| | | .t-tabs .t-tabs__item--active { |
| | | background-repeat: no-repeat; |
| | | /* background-size: 100% 100%; |
| | |
| | | background-position: right center; |
| | | background-size: 50% 90%; |
| | | /* 将背景图片位置设置为靠右 */ |
| | | } |
| | | |
| | | .t-tabs__track { |
| | | background-color: #FF6C00 !important; |
| | | -webkit-transform: translateX(39px); |
| | | transform: translateX(39px); |
| | | } |