| | |
| | | itemFields: { |
| | | SysType: 'CmsFolder', |
| | | // 资源类型,试读文件,是否允许下载等参数 |
| | | // learnSelectType: [], |
| | | // selectType: [], |
| | | learnSelectType: [], |
| | | // freeFile: [], |
| | | // file: [], |
| | | // protectedFile: [], |
| | |
| | | .page { |
| | | padding: 200rpx 40rpx; |
| | | width: 100%; |
| | | height: 100%; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .title-text { |
| | |
| | | color: #000; |
| | | } |
| | | |
| | | .link { |
| | | width: 100%; |
| | | height: max-content; |
| | | word-wrap: break-word; |
| | | word-break: break-all; |
| | | } |
| | | |
| | | .link, |
| | | .bottom-btn { |
| | | margin-top: 50px; |
| | |
| | | hidden: true, |
| | | playerList: [], |
| | | progress: 0, |
| | | buyIdList: [], |
| | | buyList: [], |
| | | learnClassData: null, |
| | | bookDetail: null |
| | | }, |
| | | |
| | | format(time) { |
| | |
| | | formPath: options.formPath, |
| | | source: options.source, |
| | | }) |
| | | |
| | | if (options.parentName !== "教学资源" && options.parentName !== "云学习") { |
| | | this.setData({ |
| | | parentName: options.parentName, |
| | |
| | | this.resourceDetailsData() |
| | | this.getNoteList() |
| | | } |
| | | if (options.formPath == 'jsek_cloudLearning') this.getBookInfo(options.bookId) |
| | | }, |
| | | |
| | | /** |
| | |
| | | console.log('统计', data) |
| | | app.MG.job.newJobWithApiNewEvent(data).then((res) => {}) |
| | | }, |
| | | /** |
| | | * 页面相关事件处理函数--监听用户下拉动作 |
| | | */ |
| | | onPullDownRefresh() { |
| | | |
| | | // 获取图书详情 |
| | | getBookInfo(id) { |
| | | const query = { |
| | | path: "*", |
| | | queryType: "*", |
| | | productId: id, |
| | | favoriteTypes: "FavoriteBookCity", |
| | | itemFields: { |
| | | "SysType=": "CmsFolder", |
| | | }, |
| | | coverSize: { |
| | | height: 1, |
| | | }, |
| | | fields: {}, |
| | | }; |
| | | app.MG.store.getProductDetail(query).then(async (res) => { |
| | | console.log('图书详情', res); |
| | | this.setData({ |
| | | bookDetail: res.datas, |
| | | buyIdList: res.datas.purchasedSaleMethodIdList, |
| | | learnClassData: res.datas.cmsDatas[0].datas.find(item => item.refCode == "jsek_cloudLearning") |
| | | }) |
| | | this.getResourceDataList(this.data.learnClassData) |
| | | }); |
| | | }, |
| | | // 教学资源 云学习 获取 |
| | | getResourceDataList(type) { |
| | | let query = { |
| | | path: '*', |
| | | queryType: '*', |
| | | productId: this.data.bookDetail.id, |
| | | cmsPath: type.productLinkPath, |
| | | cmsType: '*', |
| | | itemFields: { |
| | | SysType: 'CmsFolder', |
| | | }, |
| | | pading: { |
| | | start: 0, |
| | | size: 999 |
| | | }, |
| | | } |
| | | app.MG.store.getProductDetailNoChildren(query).then((res) => { |
| | | const buyList = res.datas.cmsDatas[0].datas.filter(item => item.saleMethod.length && this.data.buyIdList.includes(item.saleMethod.find(citem => citem.SaleType == 'Normal').Id)) |
| | | if (this.data.learnClassData && this.data.learnClassData.saleMethod.length) { |
| | | const learnSaleMethod = this.data.learnClassData.saleMethod.find(citem => citem.SaleType == 'Normal') |
| | | if (this.data.buyIdList.includes(learnSaleMethod.Id)) buyList.push(learnClassData) |
| | | } |
| | | this.setData({ |
| | | buyList |
| | | }) |
| | | console.log('云学习', buyList); |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * 页面上拉触底事件的处理函数 |
| | | */ |
| | | onReachBottom() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 用户点击右上角分享 |
| | | */ |
| | | onShareAppMessage() {}, |
| | | onShareTimeline() {}, |
| | | onTabsChange(event) {}, |
| | | |
| | | onTabsClick(event) {}, |
| | | handleChange(e) { |
| | | this.setData({ |
| | |
| | | let selectedId = -1; // 初始化选中项索引 |
| | | let showDataUrl = ''; |
| | | let titleName = ''; |
| | | |
| | | res.datas.cmsDatas[0].datas.forEach((item, index) => { |
| | | if (this.data.source == 'qrcode') { |
| | | if (item.id == this.data.activeId) { |
| | |
| | | } |
| | | } else { |
| | | if (item.selectType === "audio" || item.learnSelectType === "audio") { |
| | | // this.data.threeLeveData.push(item); |
| | | if (this.data.storeInfo == 'jsek_digitalCourses') { |
| | | if (this.data.isBuy) { |
| | | if (item.sysType == 'CmsItem') { |
| | | this.data.threeLeveData.push(item) |
| | | } |
| | | } else { |
| | | if (item.sysType == 'CmsItem' && item.freeFile) { |
| | | this.data.threeLeveData.push(item) |
| | | } |
| | | } |
| | | } else { |
| | | if (res.datas.purchasedSaleMethodIdList.includes(item.defaultSaleMethodId) || item.freeFile) { |
| | | this.data.threeLeveData.push(item) |
| | | if (this.data.buyList.length) { |
| | | if (this.data.buyList.some(citem => item.productLinkPath.includes(citem.productLinkPath))) this.data.threeLeveData.push(item) |
| | | } else { |
| | | if (!item.saleMethod.length) this.data.threeLeveData.push(item) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | }); |
| | | this.data.threeLeveData.forEach((items, indexs) => { |
| | | if (this.data.productLinkPath == items.productLinkPath) { |
| | | selectedId = indexs; |
| | | } |
| | | }) |
| | | selectedId = this.data.threeLeveData.findIndex(items => items.productLinkPath == this.data.productLinkPath) |
| | | if (selectedId !== -1) { |
| | | let datas = this.data.threeLeveData[selectedId]; |
| | | if (this.data.formPath == 'jsek_cloudLearning') { |
| | |
| | | loading: false, |
| | | hidden: false |
| | | }); |
| | | console.log(1, this.data); |
| | | this.pubulicPlayFun(); |
| | | }); |
| | | }, |
| | |
| | | this.setData({ |
| | | showData: item.file ? app.config.requestCtx + '/file/api/ApiDownload?md5=' + item.file : app.config.requestCtx + '/file/api/ApiDownload?md5=' + item.freeFile |
| | | }) |
| | | console.log(2, this.data); |
| | | this.pubulicPlayFun() |
| | | } |
| | | } |
| | |
| | | videoLoading: false, |
| | | progress: 0, |
| | | playerList: [], |
| | | videoLoading: true |
| | | videoLoading: true, |
| | | buyIdList: [], |
| | | buyList: [], |
| | | learnClassData: null, |
| | | bookDetail: null |
| | | }, |
| | | // 格式化笔记时间 |
| | | convertTimestamp(timestamp) { |
| | |
| | | } else { |
| | | this.resourceDetailsData() |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面初次渲染完成 |
| | | */ |
| | | onReady() { |
| | | |
| | | if (options.formPath == 'jsek_cloudLearning') this.getBookInfo(options.bookId) |
| | | }, |
| | | |
| | | /** |
| | |
| | | } |
| | | this.setPlayerList() |
| | | }, |
| | | |
| | | // 获取图书详情 |
| | | getBookInfo(id) { |
| | | const query = { |
| | | path: "*", |
| | | queryType: "*", |
| | | productId: id, |
| | | favoriteTypes: "FavoriteBookCity", |
| | | itemFields: { |
| | | "SysType=": "CmsFolder", |
| | | }, |
| | | coverSize: { |
| | | height: 1, |
| | | }, |
| | | fields: {}, |
| | | }; |
| | | app.MG.store.getProductDetail(query).then(async (res) => { |
| | | console.log('图书详情', res); |
| | | this.setData({ |
| | | bookDetail: res.datas, |
| | | buyIdList: res.datas.purchasedSaleMethodIdList, |
| | | learnClassData: res.datas.cmsDatas[0].datas.find(item => item.refCode == "jsek_cloudLearning") |
| | | }) |
| | | this.getResourceDataList(this.data.learnClassData) |
| | | }); |
| | | }, |
| | | // 教学资源 云学习 获取 |
| | | getResourceDataList(type) { |
| | | let query = { |
| | | path: '*', |
| | | queryType: '*', |
| | | productId: this.data.bookDetail.id, |
| | | cmsPath: type.productLinkPath, |
| | | cmsType: '*', |
| | | itemFields: { |
| | | SysType: 'CmsFolder', |
| | | }, |
| | | pading: { |
| | | start: 0, |
| | | size: 999 |
| | | }, |
| | | } |
| | | app.MG.store.getProductDetailNoChildren(query).then((res) => { |
| | | const buyList = res.datas.cmsDatas[0].datas.filter(item => item.saleMethod.length && this.data.buyIdList.includes(item.saleMethod.find(citem => citem.SaleType == 'Normal').Id)) |
| | | if (this.data.learnClassData && this.data.learnClassData.saleMethod.length) { |
| | | const learnSaleMethod = this.data.learnClassData.saleMethod.find(citem => citem.SaleType == 'Normal') |
| | | if (this.data.buyIdList.includes(learnSaleMethod.Id)) buyList.push(learnClassData) |
| | | } |
| | | this.setData({ |
| | | buyList |
| | | }) |
| | | console.log('云学习', buyList); |
| | | }) |
| | | }, |
| | | count(timeStr) { |
| | | const data = { |
| | | appRefCode: app.config.appRefCode, |
| | |
| | | } |
| | | app.MG.job.newJobWithApiNewEvent(data).then((res) => {}) |
| | | }, |
| | | /** |
| | | * 页面相关事件处理函数--监听用户下拉动作 |
| | | */ |
| | | onPullDownRefresh() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 页面上拉触底事件的处理函数 |
| | | */ |
| | | onReachBottom() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 用户点击右上角分享 |
| | | */ |
| | | onShareAppMessage() {}, |
| | | onShareTimeline() {}, |
| | | onTabsChange(event) { |
| | | console.log(event, 234) |
| | | let tabValue = event.detail.value |
| | |
| | | } |
| | | } |
| | | app.MG.store.getProductDetail(query).then(res => { |
| | | if (res.datas.purchasedSaleMethodIdList.includes(res.datas.defaultSaleMethodId)) { |
| | | this.setData({ |
| | | isBuy: true |
| | | isBuy: res.datas.purchasedSaleMethodIdList.includes(res.datas.defaultSaleMethodId) |
| | | }) |
| | | } else { |
| | | this.setData({ |
| | | isBuy: false |
| | | }) |
| | | } |
| | | res.datas.cmsDatas[0].datas.forEach((item) => { |
| | | if (this.data.source == 'qrcode') { |
| | | if (item.id == this.data.activeId) { |
| | |
| | | } |
| | | } else { |
| | | if (item.selectType === "video" || item.learnSelectType === "video") { |
| | | |
| | | if (this.data.storeInfo == 'jsek_digitalCourses') { |
| | | if (this.data.isBuy) { |
| | | if (item.sysType == 'CmsItem') { |
| | | this.data.threeLeveData.push(item) |
| | | } |
| | | if (item.sysType == 'CmsItem') this.data.threeLeveData.push(item) |
| | | // if (this.data.isBuy) { |
| | | // if (item.sysType == 'CmsItem') { |
| | | // this.data.threeLeveData.push(item) |
| | | // } |
| | | // } else { |
| | | // if (item.sysType == 'CmsItem' && item.freeFile) { |
| | | // this.data.threeLeveData.push(item) |
| | | // } |
| | | // } |
| | | } else { |
| | | if (item.sysType == 'CmsItem' && item.freeFile) { |
| | | this.data.threeLeveData.push(item) |
| | | } |
| | | } |
| | | if (this.data.buyList.length) { |
| | | if (this.data.buyList.some(citem => item.productLinkPath.includes(citem.productLinkPath))) this.data.threeLeveData.push(item) |
| | | } else { |
| | | if (res.datas.purchasedSaleMethodIdList.includes(item.defaultSaleMethodId) || item.freeFile) { |
| | | this.data.threeLeveData.push(item) |
| | | if (!item.saleMethod.length) this.data.threeLeveData.push(item) |
| | | } |
| | | } |
| | | this.setData({ |
| | |
| | | .then((res) => {}) |
| | | } |
| | | }, |
| | | |
| | | |
| | | getProductUserSubmitTopicGet() { |
| | | app.MG.ugc.getProductUserSubmitTopic({ |
| | |
| | | <view> |
| | | <!-- <view style="width: 100%; height: {{barHeight}}px; "></view> |
| | | <view class="nacigationBar" style="width: 100%; height: {{navBarHeight}}px;"> |
| | | <view> |
| | | <t-icon name="chevron-left" size="30" data-name="{{item}}" bind:click="goBack" /> |
| | | </view> |
| | | <view class="navbar-title">资源详情-视频</view> |
| | | </view> --> |
| | | <!-- 视频 --> |
| | | <view class="videoBox" wx:if="{{videoChange}}"> |
| | | <!-- autoplay='false' 是否自动播放 --> |
| | | <!-- <video binderror="videoErrorCallback" src="{{showData}}" play-btn-position='center' object-fit='fill' controls enable-play-gesture enable-auto-rotation></video> --> |
| | | <view wx:if="{{videoLoading}}" class="video-loading"> |
| | | <t-loading theme="circular" size="60rpx" class="wrapper" loading="{{videoLoading}}" /> |
| | | <t-loading |
| | | theme="circular" |
| | | size="60rpx" |
| | | class="wrapper" |
| | | loading="{{videoLoading}}" |
| | | /> |
| | | </view> |
| | | <!-- <video show-center-play-btn="{{false}}" src="{{showData}}" bindloadedmetadata="loadedmetadata" bindtimeupdate="timeUpdate"></video> --> |
| | | <t-video id="tvd" src="{{showDataVod}}" style="width:100%;" bindvideoloaded="loadedmetadata" bindtimeupdate="timeUpdate" wx:if="{{!videoLoading}}"> |
| | | <t-video |
| | | id="tvd" |
| | | src="{{showDataVod}}" |
| | | style="width: 100%" |
| | | bindvideoloaded="loadedmetadata" |
| | | bindtimeupdate="timeUpdate" |
| | | wx:if="{{!videoLoading}}" |
| | | > |
| | | </t-video> |
| | | </view> |
| | | |
| | |
| | | <!-- 标题 --> |
| | | <view class="titleBox">{{titleName}}</view> |
| | | <view class="contentBox"> |
| | | <t-tabs defaultValue="{{0}}" bind:change="onTabsChange" t-class="custom-tabs" t-class-content="custom-panel" split="{{false}}"> |
| | | <t-tabs |
| | | defaultValue="{{0}}" |
| | | bind:change="onTabsChange" |
| | | t-class="custom-tabs" |
| | | t-class-content="custom-panel" |
| | | split="{{false}}" |
| | | > |
| | | <!-- 资源列表 --> |
| | | <t-tab-panel label="资源列表" value="0" style="{{tabPanelstyle}}" style="width: 750rpx"> |
| | | <t-tab-panel |
| | | label="资源列表" |
| | | value="0" |
| | | style="{{tabPanelstyle}}" |
| | | style="width: 750rpx" |
| | | > |
| | | <view class="demo-section__content" wx:if="{{loading}}"> |
| | | <t-skeleton theme="paragraph" animation="gradient" loading="true"></t-skeleton> |
| | | <t-skeleton |
| | | theme="paragraph" |
| | | animation="gradient" |
| | | loading="true" |
| | | ></t-skeleton> |
| | | </view> |
| | | <view class="wrapper" wx:if="{{!loading}}"> |
| | | <view class="outsideDetailsName"> |
| | | <view class="titleBox">{{parentName}}</view> |
| | | <view class="detailsName" wx:for="{{threeLeveData}}" wx:key="index" wx:for-item="item" wx:for-index="index" bind:tap="onVideo" data-item="{{item}}" data-index="{{index}}"> |
| | | <view style="color: {{selectedId == index ? '#ff6c00' : '#000'}}">{{item.name}}</view> |
| | | <view |
| | | class="detailsName" |
| | | wx:for="{{threeLeveData}}" |
| | | wx:key="index" |
| | | wx:for-item="item" |
| | | wx:for-index="index" |
| | | bind:tap="onVideo" |
| | | data-item="{{item}}" |
| | | data-index="{{index}}" |
| | | > |
| | | <view style="color: {{selectedId == index ? '#ff6c00' : '#000'}}" |
| | | >{{item.name}}</view |
| | | > |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | <empty /> |
| | | </view> |
| | | <t-collapse value="{{activeValues}}" bind:change="handleChange"> |
| | | <t-collapse-panel value="{{item.id}}" expandIcon wx:for="{{noteList}}" wx:key="id"> |
| | | <t-collapse-panel |
| | | value="{{item.id}}" |
| | | expandIcon |
| | | wx:for="{{noteList}}" |
| | | wx:key="id" |
| | | > |
| | | <view slot="header" class="collapse-header"> |
| | | <t-image class="note-icon" src="/static/images/bookService/detail/note-icon.png"></t-image> |
| | | <t-image |
| | | class="note-icon" |
| | | src="/static/images/bookService/detail/note-icon.png" |
| | | ></t-image> |
| | | <view class="header-name">{{item.name}}</view> |
| | | </view> |
| | | <view> |
| | |
| | | <view class="note-bottom"> |
| | | <view class="note-time">{{item.createDate}}</view> |
| | | <view class="bottom-btn"> |
| | | <t-image src="/static/images/bookService/detail/compliceHover.png" class="complice" bind:tap="editNote" data-note="{{item}}"></t-image> |
| | | <t-image |
| | | src="/static/images/bookService/detail/compliceHover.png" |
| | | class="complice" |
| | | bind:tap="editNote" |
| | | data-note="{{item}}" |
| | | ></t-image> |
| | | <view></view> |
| | | <t-image src="/static/images/bookService/detail/deleteHover.png" class="delete" bind:tap="deleteNote" data-id="{{item.id}}"></t-image> |
| | | <t-image |
| | | src="/static/images/bookService/detail/deleteHover.png" |
| | | class="delete" |
| | | bind:tap="deleteNote" |
| | | data-id="{{item.id}}" |
| | | ></t-image> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | <!-- 记笔记 --> |
| | | <view class="takeNotes" data-key="showCloseBtn" bind:tap="showDialog"> |
| | | <view class="takeNotesLining"> |
| | | <image src="/static/images/resourceDetails/jibiji/icon@2x.png" mode="" /> |
| | | <image |
| | | src="/static/images/resourceDetails/jibiji/icon@2x.png" |
| | | mode="" |
| | | /> |
| | | 记笔记 |
| | | </view> |
| | | </view> |
| | |
| | | </view> |
| | | |
| | | <!-- 记笔记弹窗 --> |
| | | <t-popup visible="{{dialogKey}}" bind:visible-change="onVisibleChange" placement="center"> |
| | | <t-popup |
| | | visible="{{dialogKey}}" |
| | | bind:visible-change="onVisibleChange" |
| | | placement="center" |
| | | > |
| | | <view class="popup"> |
| | | <view slot="title"> |
| | | <view class="title-text" wx:if="{{!flag}}"> |
| | | <text class="note-title">{{submitTitle}}</text> |
| | | <t-image src="/static/images/bookService/detail/edit.png" class="edit-icon" bind:tap="changeTitle" data-value="{{true}}"></t-image> |
| | | <t-image |
| | | src="/static/images/bookService/detail/edit.png" |
| | | class="edit-icon" |
| | | bind:tap="changeTitle" |
| | | data-value="{{true}}" |
| | | ></t-image> |
| | | </view> |
| | | <view wx:else> |
| | | <t-input value="{{submitTitle}}" style="{{inputStyle}}" data-value="{{false}}" bind:enter="changeTitle" bind:blur="changeTitle" maxlength="{{50}}" bind:change="inputChange"></t-input> |
| | | <t-input |
| | | value="{{submitTitle}}" |
| | | style="{{inputStyle}}" |
| | | data-value="{{false}}" |
| | | bind:enter="changeTitle" |
| | | bind:blur="changeTitle" |
| | | maxlength="{{50}}" |
| | | bind:change="inputChange" |
| | | ></t-input> |
| | | </view> |
| | | </view> |
| | | <view slot="content"> |
| | | <view class="textarea-example"> |
| | | <text class="textarea-example__label">内容:</text> |
| | | <t-textarea value="{{textvalue}}" t-class="external-class" placeholder="请输入文字" bordered maxlength="500" disableDefaultPadding="{{true}}" indicator style="{{inputStyle}}" bind:change="textareaChange" /> |
| | | <t-textarea |
| | | value="{{textvalue}}" |
| | | t-class="external-class" |
| | | placeholder="请输入文字" |
| | | bordered |
| | | maxlength="500" |
| | | disableDefaultPadding="{{true}}" |
| | | indicator |
| | | style="{{inputStyle}}" |
| | | bind:change="textareaChange" |
| | | /> |
| | | </view> |
| | | <view class="submit-btn"> |
| | | <t-button theme="primary" size="large" block bind:tap="confirmSuggest">提交</t-button> |
| | | <t-button theme="primary" size="large" block bind:tap="confirmSuggest" |
| | | >提交</t-button |
| | | > |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <t-icon t-class="close-btn" name="close-circle" size="32" color="#fff" bind:tap="closeDialog" /> |
| | | <t-icon |
| | | t-class="close-btn" |
| | | name="close-circle" |
| | | size="32" |
| | | color="#fff" |
| | | bind:tap="closeDialog" |
| | | /> |
| | | </t-popup> |
| | | </view> |
| | |
| | | align-items: center; |
| | | } |
| | | |
| | | .testSee { |
| | | margin-left: 14rpx; |
| | | } |
| | | |
| | | .testSee, |
| | | .need-buy, |
| | | .shopCar { |
| | |
| | | </view> |
| | | <view class="viewCount"> {{item.viewCount }}次点击 </view> |
| | | <view class="author"> |
| | | <view> {{ item.courseLeader}} </view> |
| | | <view class="courseLeader" > {{ item.courseLeader}} </view> |
| | | <view> {{ item.classHours}}课时 </view> |
| | | </view> |
| | | <view class="money"> |
| | |
| | | color: #333333; |
| | | } |
| | | |
| | | .courseLeader { |
| | | width: 65%; |
| | | white-space: nowrap; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | } |
| | | |
| | | .money { |
| | | display: flex; |
| | | flex-direction: row; |
| | |
| | | baseRefresh: { |
| | | value: false |
| | | }, |
| | | loading: true |
| | | loading: true, |
| | | }, |
| | | onShow() { |
| | | this.setData({ |
| | |
| | | // }) |
| | | const item = e.currentTarget.dataset.book |
| | | console.log(item); |
| | | // 网页类型跳转到网址复制页,因为url传参不能传 带参数的网络地址,所以此处要把网络地址里的传参摘出来,放到url里 |
| | | let urlData = '' |
| | | const flags = item.jsek_link.indexOf("?") |
| | | if (flags > -1) { |
| | | urlData = item.jsek_link.slice(flags + 1, item.jsek_link.length) |
| | | } |
| | | let url = '/packageBookService/pages/bookServices/linkPage/index' |
| | | wx.navigateTo({ |
| | | url: '/pages/specialDiscussion/webView/index?link=' + item.jsek_link |
| | | }); |
| | | url: urlData ? url + `?path=${item.jsek_link.slice(0,flags)}` + '&' + urlData : url + `?path=${item.jsek_link}` |
| | | }) |
| | | // wx.navigateTo({ |
| | | // url: '/pages/specialDiscussion/webView/index?link=' + item.jsek_link |
| | | // }); |
| | | |
| | | |
| | | |
| | | }, |
| | | goCourseDetail(e) { |
| | | // return wx.showToast({ |
| | |
| | | }) |
| | | }) |
| | | }, |
| | | addCart(e) { |
| | | async addCart(e) { |
| | | const { |
| | | info |
| | | } = e.currentTarget.dataset; |
| | |
| | | agentCode: '电子书' |
| | | }] |
| | | } |
| | | const addRes = app.MG.store.addShoppingCart(query) |
| | | const addRes = await app.MG.store.addShoppingCart(query) |
| | | if (addRes) { |
| | | wx.showToast({ |
| | | title: "添加成功", |
| | |
| | | >¥{{item.price}}</text |
| | | > |
| | | <image |
| | | wx:if="{{item.price}}" |
| | | src="/static/images/home/home-cart.png" |
| | | mode="aspectFit" |
| | | class="addCartImg" |