优化页面
This commit is contained in:
@@ -21,6 +21,7 @@ export default {
|
||||
info: {},
|
||||
userSig: "",
|
||||
lastPage: "",
|
||||
myuserSig: "",
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
@@ -58,6 +59,7 @@ export default {
|
||||
userInfo: false,
|
||||
});
|
||||
this.info = res;
|
||||
console.log("登录信息", this.info);
|
||||
const sdkAppID = Number(this.info.data.chatInfo.appId);
|
||||
const userID ="administrator";
|
||||
this.userSig = genTestUserSig({
|
||||
@@ -65,6 +67,13 @@ export default {
|
||||
SECRETKEY:this.info.data.chatInfo.appKey,
|
||||
userID: userID,
|
||||
})
|
||||
this.myuserSig = genTestUserSig({
|
||||
SDKAPPID : sdkAppID,
|
||||
SECRETKEY:this.info.data.chatInfo.appKey,
|
||||
userID: String(res.data.info.id),
|
||||
})
|
||||
console.log("userSig",this.myuserSig.userSig);
|
||||
uni.setStorageSync("myuserSig", this.myuserSig)
|
||||
uni.setStorageSync("chatInfo", this.info.data.chatInfo)
|
||||
uni.setStorageSync("userSig", this.userSig)
|
||||
uni.setStorageSync("userinfo", this.info.data.info);
|
||||
@@ -73,10 +82,12 @@ export default {
|
||||
uni.reLaunch({
|
||||
url: "/pages/UserInformation/UserInformation",
|
||||
});
|
||||
TUIlogin(this.info.data.chatInfo.appId, this.info.data.info.id,this.myuserSig.userSig)
|
||||
uni.hideLoading();
|
||||
} else {
|
||||
uni.setStorageSync("userinfo", this.info.data.info);
|
||||
TUIlogin(this.info.data.chatInfo.appId, this.info.data.info.id,this.myuserSig.userSig)
|
||||
uni.hideLoading();
|
||||
TUIlogin(this.info.data.chatInfo.appId, this.info.data.info.id,this.userSig.userSig)
|
||||
//跳转原来页面否则首页
|
||||
console.log("跳的地址", this.lastPage);
|
||||
uni.reLaunch({
|
||||
|
||||
Reference in New Issue
Block a user