优化返回页面
This commit is contained in:
@@ -20,6 +20,7 @@ export default {
|
||||
userInfo: {},
|
||||
info: {},
|
||||
userSig: "",
|
||||
lastPage: "",
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
@@ -29,7 +30,18 @@ export default {
|
||||
this.userInfo = res.userInfo;
|
||||
},
|
||||
});
|
||||
uni.getStorage({
|
||||
key: "lastPage",
|
||||
success: (res) => {
|
||||
this.lastPage = "/"+res.data;
|
||||
console.log(this.lastPage);
|
||||
},
|
||||
fail: () => {
|
||||
this.lastPage = "/pages/Home/Home";
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
methods: {
|
||||
// 获取手机号
|
||||
async getPhoneNumber(e) {
|
||||
@@ -66,8 +78,9 @@ export default {
|
||||
uni.hideLoading();
|
||||
TUIlogin(this.info.data.chatInfo.appId, this.info.data.info.id,this.userSig.userSig)
|
||||
//跳转原来页面否则首页
|
||||
console.log("跳的地址", this.lastPage);
|
||||
uni.reLaunch({
|
||||
url: this.$global.lastPage || "/pages/Home/Home", // 默认页
|
||||
url: this.lastPage,
|
||||
});
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user