|
|
@@ -6,12 +6,14 @@ App({
|
|
|
onLaunch(options) {
|
|
|
//小程序跳转进入
|
|
|
if (options.query.userMsg) {
|
|
|
- wx.removeStorageSync('userMsg')
|
|
|
- wx.removeStorageSync('auth')
|
|
|
+ let userMsg = JSON.parse(options.query.userMsg)
|
|
|
+ wx.removeStorageSync('userMsg');
|
|
|
+ wx.removeStorageSync('auth');
|
|
|
wx.removeStorageSync('userauth');
|
|
|
- wx.setStorageSync('userMsg', JSON.parse(options.query.userMsg))
|
|
|
- wx.setStorageSync('userrole', options.query.userMsg.usertype == 1 ? '业务员' : '经销商');
|
|
|
- wx.setStorageSync('auth', JSON.parse(options.query.auth))
|
|
|
+ wx.removeStorageSync('userrole');
|
|
|
+ wx.setStorageSync('userMsg', userMsg);
|
|
|
+ wx.setStorageSync('userrole', userMsg.usertype == 1 ? '业务员' : '经销商');
|
|
|
+ wx.setStorageSync('auth', JSON.parse(options.query.auth));
|
|
|
wx.setStorageSync('siteP', JSON.parse(options.query.site));
|
|
|
//获取用户权限
|
|
|
this.globalData.http.basic({
|