Commit 4646ffc7 by 梁建民

bug

parent a2b38e5f
......@@ -10,14 +10,14 @@ import {
} from './utils/api.js';
App({
globalData: {
auth: wx.getStorageSync('auth'),//是否授权
auth: wx.getStorageSync('auth'), //是否授权
token: wx.getStorageSync('access_token'),
isIPX: false, //是否为iphone X
customerNum: "001",//客服
customerName: "芯掌柜客服",//客服名称
customerNum: "001", //客服
customerName: "芯掌柜客服", //客服名称
isRelogin: true, //登入环信失败后是否重新登入,只允许重新登入一次
bus: bus,//页面之间的监听
imBoolean: false,//是否是被异地登入的状态
bus: bus, //页面之间的监听
imBoolean: false, //是否是被异地登入的状态
},
getImUser: chat.getImUser,
conn: chat.conn,
......@@ -42,14 +42,22 @@ App({
member.push(id);
wx.setStorageSync("member", member)
},
onLaunch() {
wx.removeStorageSync('is_ShowModal')//由于小程序的show切后台时会执行,导致异地登入弹窗会重复弹起,所以设置一个缓存进行转换
onLaunch(e) {
wx.removeStorageSync('is_ShowModal') //由于小程序的show切后台时会执行,导致异地登入弹窗会重复弹起,所以设置一个缓存进行转换
this.versionUpdate();
//判断是从app拉起
if (e.query.token) {
return false;
}
//验证是否授权
if (this.globalData.auth) {
//是否登录
if (judgeToken()) {
} else {
wx.reLaunch({
url: '/pages/person/login/index'
......@@ -65,7 +73,7 @@ App({
if (judgeToken()) {
WebIM.conn.close();//断开im重新登入
WebIM.conn.close(); //断开im重新登入
this.getImUser();
}
......
......@@ -23,14 +23,13 @@ Page({
onLoad: function (options) {
let token = options.token;
let user_id = options.user_id;
this.setData({
token: token,
user_id: user_id
});
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
......
......@@ -361,6 +361,13 @@
"pathName": "pages/person/welfare/index",
"query": "token= eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vYXV0aGFwaS5pY3NhbGVzLmNvbS92MS9nZXR3eFVzZXJJbmZvIiwiaWF0IjoxNTcwODQzMDU0LCJleHAiOjE1NzA4NTM4NTQsIm5iZiI6MTU3MDg0MzA1NCwianRpIjoiWXMwdVRTalhnTVF6OWVRTSIsInN1YiI6MjAsInBydiI6Ijg3ZTBhZjFlZjlmZDE1ODEyZmRlYzk3MTUzYTE0ZTBiMDQ3NTQ2YWEifQ.ClJB0cBhwPar5LK_2TczezcX27n4enis4n_JtFS4wLc",
"scene": null
},
{
"id": -1,
"name": "pages/person/welfare/index",
"pathName": "pages/person/welfare/index",
"query": "user_id=123&token= eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vYXV0aGFwaS5pY3NhbGVzLmNvbS92MS9nZXR3eFVzZXJJbmZvIiwiaWF0IjoxNTcwODQzMDU0LCJleHAiOjE1NzA4NTM4NTQsIm5iZiI6MTU3MDg0MzA1NCwianRpIjoiWXMwdVRTalhnTVF6OWVRTSIsInN1YiI6MjAsInBydiI6Ijg3ZTBhZjFlZjlmZDE1ODEyZmRlYzk3MTUzYTE0ZTBiMDQ3NTQ2YWEifQ.ClJB0cBhwPar5LK_2TczezcX27n4enis4n_JtFS4wLc",
"scene": null
}
]
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment