| | |
| | | const app = getApp(); |
| | | import { |
| | | loginInfo |
| | | } from '../../../../../assets/js/login'; |
| | | Component({ |
| | | properties: { |
| | | treeList: { |
| | |
| | | openIds: e.detail.value, |
| | | }); |
| | | }, |
| | | async goTest(e) { |
| | | console.log(e, 666) |
| | | goTest(e) { |
| | | const gotoPageFun = async () => { |
| | | const value = e.currentTarget.dataset.item; |
| | | const parent = e.currentTarget.dataset.parent; |
| | | const isTry = e.currentTarget.dataset.istry; |
| | | const token = wx.getStorageSync("jsek-token"); |
| | | if (!token) { |
| | | return wx.getUserProfile({ |
| | | desc: "用户登录", |
| | | success: (res) => { |
| | | console.log(res); |
| | | }, |
| | | }); |
| | | } |
| | | if (!isTry && !this.data.isBuy) { |
| | | return wx.showToast({ |
| | | icon: 'error', |
| | |
| | | value.name |
| | | }&answerType=${"option"}&storeInfo=${app.config.digitalCourses}`, |
| | | }); |
| | | } |
| | | const token = wx.getStorageSync(app.config.tokenKey) |
| | | if (!token) { |
| | | loginInfo(app, () => {}) |
| | | } else { |
| | | gotoPageFun() |
| | | } |
| | | |
| | | }, |
| | | }, |
| | | }); |