From c08661bcfb838c491a833a9e14fc442af7223227 Mon Sep 17 00:00:00 2001 From: xpz2018 <107107461@qq.com> Date: Fri, 6 Aug 2021 14:07:03 +0800 Subject: [PATCH] no message --- pages/login/index.js | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/pages/login/index.js b/pages/login/index.js index 856f5ae..dbe21f3 100644 --- a/pages/login/index.js +++ b/pages/login/index.js @@ -25,7 +25,7 @@ Page({ loging: false, regist: false, metaData: null, - url: null, + path: null, code: null // code: '?mark=ztb_saas&QrCodeRecordId=597399780326510592' }, @@ -40,9 +40,9 @@ Page({ //分享进入 this.data.code = '?mark=ztb_saas&QrCodeRecordId=' + options.qrcode } else if (options.url) { - this.data.url = options.url + this.data.path = options.url if (options.key && options.value) { - this.data.url += '?' + options.key + '=' + options.value + this.data.path += '?' + options.key + '=' + options.value } } app.globalData.token = app.globalData.token || storage.get('Authorization') @@ -91,18 +91,18 @@ Page({ storage.put('X-FACTORY-ID' + app.userInfo.userId, factoryId) } } - if(factoryId){ - app.userInfo.factoryId = factoryId - headerFactoryId(app.userInfo.factoryId) - if(this.data.url) { - wx.redirectTo({ url: '/pages/index/index?url=' + this.data.url }) - } else { - wx.redirectTo({ url: '/pages/index/index' }) - } - } else { + if(!factoryId){ this.setData({ loging: false}) Dialog.alert({ title: '温馨提示', message: '还没有您所属的打包站信息,请联系相关客服人员' }).then(() => { }) + return + } + app.userInfo.factoryId = factoryId + headerFactoryId(app.userInfo.factoryId) + if(this.data.path) { + wx.redirectTo({ url: '/pages/index/index?url=' + this.data.path }) + } else { + wx.redirectTo({ url: '/pages/index/index' }) } }, contactMeta: function(metaData){