| | |
| | | onLoad(options) { |
| | | // 在此进行是否购买的查询 |
| | | const questionId = options.listId; |
| | | const bookId = options.bookId |
| | | const bookName = options.bookName |
| | | const formPath = options.formPath |
| | | const query = { |
| | | "cmsItemId": Number(questionId) |
| | | }; |
| | | |
| | | app.MG.file.checkCmsItem(query) |
| | | .then((res) => { |
| | | const isBuys = res; |
| | |
| | | wx.showModal({ |
| | | icon: 'error', |
| | | title: '温馨提示', |
| | | content: '请购买题库,即将返回首页', |
| | | content: '请购买题库,即将返回购买页', |
| | | confirmText: '确定', |
| | | showCancel: false, // 关闭取消按钮 |
| | | success: function (res) { |
| | | if (res.confirm) { |
| | | wx.switchTab({ |
| | | url: '/pages/home/home', // 替换为你的首页路径 |
| | | }); |
| | | wx.navigateTo({ |
| | | url: '/packageBookService/pages/bookServices/detail/index?id=' + bookId + '&name=' + bookName + '&tabValue=' + formPath, |
| | | }) |
| | | } |
| | | } |
| | | }); |