页面监听

cyl/master-0819
wangxia 3 months ago
parent 09fb16242a
commit e39204acff

@ -16,6 +16,38 @@ export default {
onLaunch() {
let that = this;
uni.removeStorageSync("selectedCity");
//
// uni.onBeforeAppRoute((res) => {
// console.log("setNavStyle", res);
// try {
// that.G.Post("/common/user/browsing/history/addRecord", { browsingUrl: res.path }, (res) => {});
// } catch (error) {
// console.log("error", error);
// }
// });
//
uni.addInterceptor("navigateTo", {
//
invoke(args) {
console.log("navigateTo 跳转前", args);
that.G.watchUserPage(args.url);
},
});
uni.addInterceptor("reLaunch", {
//
invoke(args) {
console.log("reLaunch 跳转前", args);
that.G.watchUserPage(args.url);
},
});
uni.addInterceptor("redirectTo", {
//
invoke(args) {
console.log("redirectTo 跳转前", args);
that.G.watchUserPage(args.url);
},
});
},
onShow: function (options) {
let that = this;
@ -77,6 +109,7 @@ export default {
}
},
methods: {
initWyyx() {
let that = this;

@ -350,6 +350,7 @@ export default {
this.agencyInfo = uni.getStorageSync("agencyInfo");
this.userInfo = uni.getStorageSync("apply-userinfo");
that.loadSelectedCityFromCache();
that.G.watchUserPage("pages/home/index");
}
},

@ -352,6 +352,7 @@ export default {
this.getCompanyInfo();
}
});
that.G.watchUserPage("pages/person/index");
// that.userInfo = uni.getStorageSync("apply-userinfo");
} else {
that.waitNum_ups = 0;

@ -202,6 +202,7 @@ export default {
this.getList();
}
this.getGZHInfo();
that.G.watchUserPage("pages/workBench/index");
},
onReachBottom() {
let that = this;

@ -160,6 +160,8 @@ let data = {
/*
*/
setNavStyle ($form = 'default') {
console.log('into setNavStyle');
if ($form == 'home') {
uni.setNavigationBarColor({
backgroundColor: "#fff",
@ -1572,6 +1574,7 @@ let data = {
}
return str;
},
}
export default data;

Loading…
Cancel
Save