上传头像

This commit is contained in:
pengxiaolong
2025-05-20 19:09:04 +08:00
parent 6107739077
commit 829199a197
34 changed files with 4902 additions and 233 deletions

View File

@@ -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", // 默认页