优化无痛刷新token 修改分销扫码bug

This commit is contained in:
lemon橪
2021-10-22 18:03:41 +08:00
parent 44648e9971
commit 5f6c1adf91
4 changed files with 77 additions and 132 deletions

View File

@@ -108,7 +108,7 @@ export default {
* 实例化首页数据楼层
*/
init() {
this.pageData = ""
this.pageData = "";
getFloorData().then((res) => {
if (res.data.success) {
this.pageData = JSON.parse(res.data.result.pageData);
@@ -128,19 +128,28 @@ export default {
uni.scanCode({
success: function (res) {
let path = encodeURIComponent(res.result);
config.scanAuthNavigation.forEach((src) => {
if (res.result.indexOf(src) != -1) {
uni.navigateTo({
url: `/${res.result.substring(src.length)}`,
});
} else {
setTimeout(() => {
// WX_CODE 为小程序码
if (res.scanType == "WX_CODE") {
console.log(res)
uni.navigateTo({
url: `/${res.path}`,
});
} else {
config.scanAuthNavigation.forEach((src) => {
if (res.result.indexOf(src) != -1) {
uni.navigateTo({
url: "/pages/tabbar/home/web-view?src=" + path,
url: `/${res.result.substring(src.length)}`,
});
}, 100);
}
});
} else {
setTimeout(() => {
uni.navigateTo({
url: "/pages/tabbar/home/web-view?src=" + path,
});
}, 100);
}
});
}
},
});
},