修复bug以及优化

This commit is contained in:
2026-06-02 16:23:56 +08:00
parent 5cc680f26d
commit a82c8da013
17 changed files with 529 additions and 110 deletions

View File

@@ -73,10 +73,9 @@
const currentType = this.loginType;
await this.doLogin({
loginCode: loginRes.code,
encryptedData: e.detail.encryptedData,
iv: e.detail.iv,
loginType: currentType
phoneGetCode: e.detail.code,
loginCode: loginRes.code,
loginType: this.loginType
});
} catch (err) {
@@ -85,7 +84,10 @@
},
async doLogin(data) {
uni.showLoading({ title: "登录中...", mask: true });
uni.showLoading({
title: "登录中...",
mask: true
});
try {
const authRes = await this.$u.post("/login/weChatLogin", data);
@@ -128,8 +130,16 @@
"USERTYPE": loginType
}).then(obj => {
if (obj?.flag) {
uni.setStorageSync('userInfo', obj.data);
this.$u.vuex('vuex_userInfo', obj.data);
console.log("获取用户信息")
const userInfoData = {
userType: this.loginType,
oaAuth: obj.data.oaAuth,
cusNo: obj.data.cusNo,
userName: obj.data.userName,
openId: obj.data.openId,
subscribe: obj.data.subscribeMsg
}
uni.setStorageSync('userInfo',userInfoData )
}
resolve();
}).catch(() => {
@@ -139,14 +149,18 @@
},
goBack() {
uni.navigateBack({ delta: 1 });
uni.navigateBack({
delta: 1
});
},
goPrivacy(type) {
const url = type === "user"
? "/pages-biz/privacy/userAgreement"
: "/pages-biz/privacy/privacyPolicy";
uni.navigateTo({ url });
const url = type === "user" ?
"/pages-biz/privacy/userAgreement" :
"/pages-biz/privacy/privacyPolicy";
uni.navigateTo({
url
});
}
}
};