修改了已知问题

This commit is contained in:
Ling53666
2025-05-16 09:58:51 +08:00
parent 7c371623eb
commit 74e97e9052
5 changed files with 116 additions and 32 deletions

View File

@ -155,12 +155,12 @@ submit(){
} catch (e) {
console.error("存储失败", e);
}
setTimeout(() => {
that.setmessage();
that.setmessage(() => {
wx.switchTab({
url: '/pages/jiedan/jiedan',
});
}, 2000);
});
}else{
wx.showToast({
title: res.data.message||res.data.error,
@ -224,7 +224,7 @@ getcode(){
},
// 验证码登录提交
submityanzhengma(){
const _this = this;
const that = this;
const code = this.data.yanzhengcode
if (!/^\d{6}$/.test(code)) {
wx.showToast({
@ -267,12 +267,12 @@ submityanzhengma(){
} catch (e) {
console.error("存储失败", e);
}
setTimeout(() => {
_this.setmessage();
that.setmessage(() => {
wx.switchTab({
url: '/pages/jiedan/jiedan',
});
}, 2000);
});
}else{
wx.showToast({
title: res.data.message||res.data.error,
@ -286,7 +286,7 @@ submityanzhengma(){
}
});
},
setmessage() {
setmessage(callback) {
console.log("diaoyongle ");
const that = this;
wx.getStorage({
@ -315,6 +315,7 @@ setmessage() {
userAvatar: res.data.data.userAvatar
});
console.log("信息存储成功");
if (callback) callback();
} catch (e) {
console.error("信息存储失败", e);
}