|
@@ -6,20 +6,22 @@ import {
|
|
|
} from './utils/language';
|
|
|
App({
|
|
|
onLaunch(options) {
|
|
|
+ console.log("options.query", options.query)
|
|
|
//小程序跳转进入
|
|
|
if (options.query.userMsg) {
|
|
|
let userMsg = JSON.parse(options.query.userMsg)
|
|
|
wx.removeStorageSync('userMsg');
|
|
|
+ wx.setStorageSync('userMsg', userMsg);
|
|
|
+ console.log("userMsg", wx.getStorageSync('userMsg'))
|
|
|
+ wx.setStorageSync('userrole', userMsg.usertype == 1 ? '业务员' : '经销商');
|
|
|
wx.removeStorageSync('auth');
|
|
|
wx.removeStorageSync('userauth');
|
|
|
+ wx.setStorageSync('auth', JSON.parse(options.query.auth));
|
|
|
wx.removeStorageSync('userrole');
|
|
|
wx.removeStorageSync('templetList');
|
|
|
- wx.setStorageSync('userMsg', userMsg);
|
|
|
- wx.setStorageSync('userrole', userMsg.usertype == 1 ? '业务员' : '经销商');
|
|
|
- wx.setStorageSync('auth', JSON.parse(options.query.auth));
|
|
|
+ wx.removeStorageSync('siteP');
|
|
|
wx.setStorageSync('siteP', JSON.parse(options.query.site));
|
|
|
wx.setStorageSync('templetList', JSON.parse(options.query.templetList));
|
|
|
- console.log("options.query.templetList", options.query.templetList)
|
|
|
wx.removeStorageSync('languagecode');
|
|
|
wx.setStorageSync('languagecode', options.query.languagecode);
|
|
|
//获取用户权限
|