| | |
| | | // pages/resourceDetails/document/index.js |
| | | import Toast from 'tdesign-miniprogram/toast/index'; |
| | | const app = getApp() |
| | | import { |
| | | loginInfo |
| | | } from '../../../../assets/js/login'; |
| | | Page({ |
| | | |
| | | /** |
| | |
| | | navBarHeight: '', |
| | | barHeight: '', |
| | | activeId: '', |
| | | storeInfo: '', |
| | | bookId: '', |
| | | bookName: '', |
| | | cmsId: '', |
| | |
| | | activeId: options.activeId, |
| | | bookId: options.bookId, |
| | | bookName: options.bookName, |
| | | storeInfo: options.storeInfo, |
| | | cmsId: options.cmsId, |
| | | parentName: options.parentName, |
| | | parentProductLinkPath: options.parentProductLinkPath, |
| | |
| | | applyState: options.applyState, |
| | | deadline: options.deadline |
| | | }) |
| | | this.resourceDetailsData() |
| | | const token = wx.getStorageSync(app.config.tokenKey) |
| | | if (!token) { |
| | | loginInfo(app, (data) => { |
| | | if (data) { |
| | | this.resourceDetailsData() |
| | | } else { |
| | | this.resourceDetailsData() |
| | | } |
| | | }) |
| | | } else { |
| | | this.resourceDetailsData() |
| | | } |
| | | |
| | | }, |
| | | |
| | | /** |
| | |
| | | size: 999 |
| | | } |
| | | } |
| | | if (this.data.storeInfo) { |
| | | query.storeInfo = this.data.storeInfo |
| | | } |
| | | app.MG.store.getProductDetail(query).then((res) => { |
| | | console.log(res); |
| | | res.datas.cmsDatas[0].datas.forEach((item) => { |