cyl/master-0819
wangxia 3 months ago
parent 9313ba4182
commit 185651ef47

@ -47,7 +47,6 @@ export default {
that.G.watchUserPage(args.url); that.G.watchUserPage(args.url);
}, },
}); });
}, },
onShow: function (options) { onShow: function (options) {
let that = this; let that = this;
@ -79,14 +78,10 @@ export default {
this.G.checkToken(); this.G.checkToken();
} }
if (!that.globalData.timer) { if (!that.globalData.timer) {
if (uni.getStorageSync("apply-token")) { that.checkNum();
that.checkNum();
}
that.globalData.timer = setInterval(() => { that.globalData.timer = setInterval(() => {
console.log("inner++++++++++++++++++++ +++++++++++++++++++++++++++"); console.log("inner+++++++++++++++++++++++++++++++++++++++++++++++");
if (uni.getStorageSync("apply-token")) { that.checkNum();
that.checkNum();
}
}, 30 * 1000); }, 30 * 1000);
} }
@ -109,7 +104,6 @@ export default {
} }
}, },
methods: { methods: {
initWyyx() { initWyyx() {
let that = this; let that = this;

@ -48,7 +48,7 @@ let data = {
} }
// #endif // #endif
params = { params = {
'requestComeFrom':'assistant_miniapp', 'requestComeFrom': 'assistant_miniapp',
// #ifdef APP-PLUS // #ifdef APP-PLUS
'g-open-env': 'APP-PLUS', 'g-open-env': 'APP-PLUS',
appId: uuid_new, appId: uuid_new,
@ -116,7 +116,7 @@ let data = {
// console.log('测试报错123123123123123123',res); // console.log('测试报错123123123123123123',res);
// console.log('测试报错123123123123123123$url',$url); // console.log('测试报错123123123123123123$url',$url);
let resData = res.data; let resData = res.data;
if (resData.status == 200) {// 正常 if (resData.status == 200) {// 正常
callback(resData.data, resData.msg); callback(resData.data, resData.msg);
} else if (resData.status == 9999) {// 登录过期或者身份变动等需要登录的场景 } else if (resData.status == 9999) {// 登录过期或者身份变动等需要登录的场景
@ -138,14 +138,14 @@ let data = {
// } else { // } else {
uni.showToast({ uni.showToast({
title: resData.msg, title: resData.msg,
// title:'系统异常,请稍后', // title:'系统异常,请稍后',
icon: "none" icon: "none"
}); });
failback(resData.msg); failback(resData.msg);
// } // }
} else if (resData.status == 2002) { } else if (resData.status == 2002) {
uni.showToast({ uni.showToast({
title:'已切换团队,需要重新登录', title: '已切换团队,需要重新登录',
icon: "none" icon: "none"
}); });
setTimeout(() => { setTimeout(() => {
@ -154,23 +154,23 @@ let data = {
}); });
}, 1500); }, 1500);
} else {// 其他异常 } else {// 其他异常
if($url == '/yishoudan/user/apply/order/V2/details'){ if ($url == '/yishoudan/user/apply/order/V2/details') {
}else{ } else {
uni.showToast({ uni.showToast({
title: resData.msg, title: resData.msg,
icon: "none" icon: "none"
}); });
} }
failback(resData.msg); failback(resData.msg);
} }
}, },
fail (error) { fail (error) {
uni.showToast({ uni.showToast({
// title: error.errMsg, // title: error.errMsg,
title:'系统异常,请稍后', title: '系统异常,请稍后',
icon: "none" icon: "none"
}) })
failback(error); failback(error);
@ -211,6 +211,17 @@ let data = {
}; };
} }
}, },
//监听用户的页面点击
watchUserPage (path) {
let that = this;
try {
if (uni.getStorageSync("apply-userinfo")) {
that.Post("/common/user/browsing/history/addRecord", { browsingUrl: path }, (res) => { });
}
} catch (error) {
console.log("error", error);
}
},
}; };
export default data; export default data;
Loading…
Cancel
Save