优化返回页面
This commit is contained in:
@@ -28,6 +28,7 @@ export default {
|
||||
id: "",
|
||||
info: {},
|
||||
userSig: "",
|
||||
lastPage: "",
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
@@ -43,6 +44,15 @@ export default {
|
||||
this.userSig = res.data;
|
||||
},
|
||||
});
|
||||
uni.getStorage({
|
||||
key: "lastPage",
|
||||
success: (res) => {
|
||||
this.lastPage = "/"+res.data;
|
||||
},
|
||||
fail: () => {
|
||||
this.lastPage = "/pages/Home/Home";
|
||||
},
|
||||
})
|
||||
// const { info } = option;
|
||||
// this.id = JSON.parse(info).id
|
||||
},
|
||||
@@ -99,7 +109,7 @@ export default {
|
||||
|
||||
//```````````````````````````````````````````````````````````````````````登录成功后跳转回原页面 或 首页
|
||||
uni.reLaunch({
|
||||
url: this.$global.lastPage || "/pages/Home/Home", // 默认页
|
||||
url: this.lastPage,
|
||||
});
|
||||
//````````````````````````````````````````````````````````````````````
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user