Commit 1b0fd434 authored by 郭志伟's avatar 郭志伟

fix: channelId处理

parent f5763cb1
......@@ -33,11 +33,10 @@ const router = new VueRouter({
return { x: 0, y: 0 };
}
});
setChannelId();
router.beforeEach((to, from, next) => {
const urlParams = parseSearch(window.location.href);
setTitle(to.meta.title, to.path, to.query);
setChannelId(urlParams);
if (isXyqb) getAuthInfo(urlParams.vccToken || urlParams.token);
if (isWeixinBrower) {
getWxOpenId(urlParams.code);
......@@ -100,7 +99,8 @@ function setTitle(title, path, query) {
}
}
function setChannelId(params) {
function setChannelId() {
const params = parseSearch(window.location.href);
if (params.channelId) {
localStorage.set("channelId", params.channelId);
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment