优化返回页面
This commit is contained in:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user