优化返回页面

This commit is contained in:
pengxiaolong
2025-05-22 22:05:55 +08:00
parent 6ca66f45d4
commit c55be10783
59 changed files with 3428 additions and 44 deletions

View File

@@ -11,7 +11,8 @@ const _sfc_main = {
name: "",
id: "",
info: {},
userSig: ""
userSig: "",
lastPage: ""
};
},
onLoad(option) {
@@ -27,6 +28,15 @@ const _sfc_main = {
this.userSig = res.data;
}
});
common_vendor.index.getStorage({
key: "lastPage",
success: (res) => {
this.lastPage = "/" + res.data;
},
fail: () => {
this.lastPage = "/pages/Home/Home";
}
});
},
methods: {
// 输入昵称
@@ -54,7 +64,7 @@ const _sfc_main = {
}).then((res) => {
this.userinfo = res;
}).catch((err) => {
common_vendor.index.__f__("log", "at pages/UserInformation/UserInformation.vue:76", err);
common_vendor.index.__f__("log", "at pages/UserInformation/UserInformation.vue:86", err);
});
if (this.userinfo) {
const res = await components_request.request({
@@ -77,8 +87,7 @@ const _sfc_main = {
common_vendor.index.setStorageSync("userinfo", res.data.info);
common_vendor.index.hideLoading();
common_vendor.index.reLaunch({
url: this.$global.lastPage || "/pages/Home/Home"
// 默认页
url: this.lastPage
});
} else {
common_vendor.index.showToast({