修改公众号无法关联用户的问题

This commit is contained in:
Gaoxs
2020-09-25 18:16:13 +08:00
parent c60e5fb5fd
commit 549ae41097
4 changed files with 15 additions and 28 deletions

View File

@ -25,7 +25,8 @@
login,
handleQrCode,
getCurrentPageUrl,
handleUrlParam
handleUrlParam,
getCurrentPageUrlWithArgs
} from "@/utils";
export default {
@ -37,17 +38,12 @@
var url = handleQrCode();
if (!url) {
url = handleUrlParam(getCurrentPageUrl())
url = handleUrlParam(getCurrentPageUrlWithArgs())
}
// 判断是否是分销
if (url) {
var spread = cookie.get("spread");
let urlSpread = parseInt(url.spread);
if (!Number.isNaN(urlSpread) && spread !== urlSpread) {
cookie.set("spread", urlSpread || 0);
} else if (spread === 0 || typeof spread !== "number") {
cookie.set("spread", urlSpread || 0);
}
cookie.set("spread", urlSpread || 0);
}
// if (this.$deviceType == "app" || this.$deviceType == "weixinh5") {
// this.$yrouter.switchTab({
@ -81,8 +77,8 @@
});
cookie.remove('redirect');
} else {
this.$yrouter.replace({
path: '/pages/home/index',
this.$yrouter.switchTab({
path: "/pages/home/index"
});
}
}