页面监听

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

@ -16,6 +16,38 @@ export default {
onLaunch() { onLaunch() {
let that = this; let that = this;
uni.removeStorageSync("selectedCity"); 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) { onShow: function (options) {
let that = this; let that = this;
@ -77,6 +109,7 @@ export default {
} }
}, },
methods: { methods: {
initWyyx() { initWyyx() {
let that = this; let that = this;

@ -350,6 +350,7 @@ export default {
this.agencyInfo = uni.getStorageSync("agencyInfo"); this.agencyInfo = uni.getStorageSync("agencyInfo");
this.userInfo = uni.getStorageSync("apply-userinfo"); this.userInfo = uni.getStorageSync("apply-userinfo");
that.loadSelectedCityFromCache(); that.loadSelectedCityFromCache();
that.G.watchUserPage("pages/home/index");
} }
}, },
@ -440,7 +441,7 @@ export default {
// res.recordList = []; // res.recordList = [];
// if (res.recordCount == 0) { // if (res.recordCount == 0) {
that.loading = false; that.loading = false;
// } else { // } else {
// that.loading = true; // that.loading = true;
// } // }

@ -352,6 +352,7 @@ export default {
this.getCompanyInfo(); this.getCompanyInfo();
} }
}); });
that.G.watchUserPage("pages/person/index");
// that.userInfo = uni.getStorageSync("apply-userinfo"); // that.userInfo = uni.getStorageSync("apply-userinfo");
} else { } else {
that.waitNum_ups = 0; that.waitNum_ups = 0;
@ -375,7 +376,7 @@ export default {
getNewApplyNum() { getNewApplyNum() {
let that = this; let that = this;
this.G.Get(this.api.order_getNewApplyNumNotViewed, {}, (res) => { this.G.Get(this.api.order_getNewApplyNumNotViewed, {}, (res) => {
console.log(res, "getNewApplyNum"); console.log(res, "getNewApplyNum");
that.applyNum = res; that.applyNum = res;
}); });
}, },

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

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

Loading…
Cancel
Save