上传头像
This commit is contained in:
@@ -19,6 +19,7 @@ export default {
|
||||
return {
|
||||
userInfo: {},
|
||||
info: {},
|
||||
userSig: "",
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
@@ -44,27 +45,26 @@ export default {
|
||||
},
|
||||
userInfo: false,
|
||||
});
|
||||
console.log("登录结果:", res);
|
||||
this.info = res;
|
||||
if (this.info.code === 200) {
|
||||
if (this.info.data.newAccount) {
|
||||
const sdkAppID = Number(this.info.data.chatInfo.appId);
|
||||
const sdkAppID = Number(this.info.data.chatInfo.appId);
|
||||
const userID ="administrator";
|
||||
const {userSig} = genTestUserSig({
|
||||
this.userSig = genTestUserSig({
|
||||
SDKAPPID : sdkAppID,
|
||||
SECRETKEY:this.info.data.chatInfo.appKey,
|
||||
userID: userID,
|
||||
})
|
||||
uni.setStorageSync("chatInfo", this.info.data.chatInfo)
|
||||
uni.setStorageSync("userSig", userSig)
|
||||
uni.setStorageSync("userSig", this.userSig)
|
||||
uni.setStorageSync("userinfo", this.info.data.info);
|
||||
if (this.info.code === 200) {
|
||||
if (this.info.data.newAccount) {
|
||||
uni.reLaunch({
|
||||
url: "/pages/UserInformation/UserInformation",
|
||||
});
|
||||
} else {
|
||||
uni.setStorageSync("userinfo", this.info.data.info);
|
||||
uni.hideLoading();
|
||||
TUIlogin(this.info.data.chatInfo.appId, this.info.data.info.userChatId, userSig)
|
||||
TUIlogin(this.info.data.chatInfo.appId, this.info.data.info.id,this.userSig.userSig)
|
||||
//跳转原来页面否则首页
|
||||
uni.reLaunch({
|
||||
url: this.$global.lastPage || "/pages/Home/Home", // 默认页
|
||||
|
||||
Reference in New Issue
Block a user