Commit 9aed9e09 authored by 郭志伟's avatar 郭志伟

fix: 调整路由

parent dcbd0939
......@@ -36,6 +36,12 @@ const router = new VueRouter({
setChannelId();
router.beforeEach((to, from, next) => {
const urlParams = parseSearch(window.location.href);
if (to.path === "/goods/detail") {
const goods = goodsList.find(v => v.id === to.query.id);
if (goods.hidden) {
router.replace("/goods");
}
}
setTitle(to.meta.title, to.path, to.query);
if (isXyqb) getAuthInfo(urlParams.vccToken || urlParams.token);
if (isWeixinBrower) {
......
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