From 89d33476c7ab9bf7a4fbad399685652eabd478de Mon Sep 17 00:00:00 2001 From: litian <C21AF165> Date: 星期六, 07 九月 2024 11:17:15 +0800 Subject: [PATCH] token --- packageBookService/pages/bookServices/examination/examination.js | 15 ++++++++++++++- 1 files changed, 14 insertions(+), 1 deletions(-) diff --git a/packageBookService/pages/bookServices/examination/examination.js b/packageBookService/pages/bookServices/examination/examination.js index 19bcdfe..1fcfa73 100644 --- a/packageBookService/pages/bookServices/examination/examination.js +++ b/packageBookService/pages/bookServices/examination/examination.js @@ -1,6 +1,9 @@ import { getPublicImage } from "../../../../assets/js/middleGround/tool"; +import { + loginInfo +} from '../../../../assets/js/login'; const app = getApp(); Page({ /** @@ -82,7 +85,17 @@ mockid: options.mockid, }); } - this.init(); + const token = wx.getStorageSync(app.config.tokenKey) + if (!token) { + loginInfo(app, (data) => { + if (data) { + this.init(); + } else { + this.init(); + } + }) + } + }, /** -- Gitblit v1.9.1