From 50bdb66e0539abd94880f331549c0cef81065caa Mon Sep 17 00:00:00 2001 From: litian <C21AF165> Date: 星期五, 06 九月 2024 14:33:31 +0800 Subject: [PATCH] login --- packageDomain/pages/resourceDetails/document/index.js | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/packageDomain/pages/resourceDetails/document/index.js b/packageDomain/pages/resourceDetails/document/index.js index 0ca3e50..dd3cd03 100644 --- a/packageDomain/pages/resourceDetails/document/index.js +++ b/packageDomain/pages/resourceDetails/document/index.js @@ -1,6 +1,9 @@ // pages/resourceDetails/document/index.js import Toast from 'tdesign-miniprogram/toast/index'; const app = getApp() +import { + loginInfo +} from '../../../../assets/js/login'; Page({ /** @@ -16,6 +19,7 @@ navBarHeight: '', barHeight: '', activeId: '', + storeInfo: '', bookId: '', bookName: '', cmsId: '', @@ -55,6 +59,7 @@ activeId: options.activeId, bookId: options.bookId, bookName: options.bookName, + storeInfo: options.storeInfo, cmsId: options.cmsId, parentName: options.parentName, parentProductLinkPath: options.parentProductLinkPath, @@ -62,6 +67,12 @@ applyState: options.applyState, deadline: options.deadline }) + const token = wx.getStorageSync(app.config.tokenKey) + if (!token) { + loginInfo(app, (data) => { + if (data) {} else {} + }) + } this.resourceDetailsData() }, @@ -174,6 +185,9 @@ 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) => { -- Gitblit v1.9.1