| | |
| | | type: Array, |
| | | value: [], |
| | | }, |
| | | isBuy: { |
| | | type: Boolean, |
| | | value: false, |
| | | }, |
| | | }, |
| | | data: { |
| | | sonPurchaseSaleMethodId: "", |
| | |
| | | shoppingCart: true, |
| | | stop: false, |
| | | cart: true, |
| | | canExecute: true |
| | | canExecute: true, |
| | | isBuy: false, |
| | | }, |
| | | ready() {}, |
| | | |
| | | onLoad() { |
| | | this.setData({ |
| | | sonPurchaseSaleMethodId: [], |
| | | isBuy: this.properties.isBuy |
| | | }); |
| | | }, |
| | | methods: { |
| | |
| | | // 跳转音视频播放器 |
| | | goPlayer(e) { |
| | | // 检查登录状态 |
| | | console.log(123) |
| | | const token = wx.getStorageSync(app.config.tokenKey); |
| | | if (token) { |
| | | |
| | | const item = e.currentTarget.dataset.item; |
| | | const parent = e.currentTarget.dataset.parent; |
| | | console.log('item', item); |
| | | const isTry = e.currentTarget.dataset.istry; |
| | | const parentProductLinkPath = parent ? |
| | | parent.productLinkPath : |
| | | wx.getStorageSync("teachResourcesPath"); |
| | | const parentName = parent ? parent.name : "教学资源"; |
| | | let url; |
| | | if (!isTry && !this.data.isBuy) { |
| | | return wx.showToast({ |
| | | icon: 'error', |
| | | title: '请先购买该课程', |
| | | }) |
| | | } |
| | | if (item.selectType == 'zip') { |
| | | if (this.properties.applyState == 'Normal') { |
| | | return wx.showToast({ |