2025-06-18 21:25:25 +08:00
|
|
|
import {
|
|
|
|
|
createRouter,
|
|
|
|
|
createWebHistory,
|
|
|
|
|
RouteRecordRaw,
|
|
|
|
|
createWebHashHistory,
|
|
|
|
|
} from "vue-router";
|
|
|
|
|
import { defineAsyncComponent } from "vue";
|
|
|
|
|
import store from "@/store";
|
2024-12-18 17:38:43 +08:00
|
|
|
import { useStore } from "vuex";
|
2024-09-13 14:36:38 +08:00
|
|
|
import { Https } from "@/tool/https";
|
2024-02-19 10:33:54 +08:00
|
|
|
import { getCookie, setCookie } from "@/tool/cookie";
|
2024-07-29 17:30:24 +08:00
|
|
|
const _import = (path: string) => () => import(`../views/${path}.vue`);
|
2025-06-19 10:07:11 +08:00
|
|
|
const _import_component = (path: string) => () => import(`../component/${path}.vue`);
|
|
|
|
|
const _import_custom = (path: string) => () => import(`../views/${path}.vue`);
|
|
|
|
|
// defineAsyncComponent(import(`../views/${path}`))
|
2023-01-06 16:00:15 +08:00
|
|
|
const routes: Array<RouteRecordRaw> = [
|
2025-06-18 21:25:25 +08:00
|
|
|
{
|
|
|
|
|
path: "/",
|
|
|
|
|
// redirect重定向
|
|
|
|
|
meta: { enter: "all" },
|
|
|
|
|
redirect: "/Square",
|
|
|
|
|
// redirect: "/upgrade"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: "/login",
|
|
|
|
|
name: "login",
|
|
|
|
|
meta: { enter: "all" },
|
|
|
|
|
component: _import("Login"),
|
|
|
|
|
// component: _import('LoginPage')
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: "/schoolLogin",
|
|
|
|
|
name: "schoolLogin",
|
|
|
|
|
meta: { enter: "all" },
|
|
|
|
|
component: _import("LoginPageSchool"),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: "/enterpriseLogin",
|
|
|
|
|
name: "enterpriseLogin",
|
|
|
|
|
meta: { enter: "all" },
|
|
|
|
|
component: _import("LoginPageEnterprise"),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: "/test",
|
|
|
|
|
name: "test1",
|
|
|
|
|
meta: { enter: "all" },
|
|
|
|
|
component: _import("test"),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: "/register",
|
|
|
|
|
name: "register",
|
|
|
|
|
meta: { enter: "all" },
|
|
|
|
|
component: _import("Register"),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: "/upgrade",
|
|
|
|
|
name: "upgrade",
|
|
|
|
|
meta: { enter: "all" },
|
|
|
|
|
component: _import("Upgrade"),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: "/home",
|
|
|
|
|
name: "home",
|
|
|
|
|
meta: { enter: "all" },
|
|
|
|
|
component: _import("HomeMain"),
|
|
|
|
|
children: [
|
|
|
|
|
// {
|
|
|
|
|
// path: "",
|
|
|
|
|
// name:'HomeChil',
|
|
|
|
|
// redirect: "/home/homePage"
|
|
|
|
|
// },
|
|
|
|
|
{
|
|
|
|
|
path: "tools",
|
|
|
|
|
name: "tools",
|
|
|
|
|
meta: { enter: "all" },
|
2025-06-19 10:07:11 +08:00
|
|
|
component: _import_custom("HomeView/Tools"),
|
2025-06-18 21:25:25 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: "homePage",
|
|
|
|
|
name: "homePage",
|
|
|
|
|
meta: { enter: "all" },
|
2025-06-19 10:07:11 +08:00
|
|
|
component: _import_custom("HomeView/HomeView"),
|
2025-06-18 21:25:25 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: "library",
|
|
|
|
|
name: "library",
|
|
|
|
|
meta: { enter: "all" },
|
2025-06-19 10:07:11 +08:00
|
|
|
component: _import_custom("HomeView/library"),
|
2025-06-18 21:25:25 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: "history",
|
|
|
|
|
name: "history",
|
|
|
|
|
meta: { enter: "all" },
|
2025-06-19 10:07:11 +08:00
|
|
|
component: _import_custom("HomeView/history"),
|
2025-06-18 21:25:25 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: "works",
|
|
|
|
|
name: "works",
|
|
|
|
|
meta: { enter: "all" },
|
2025-06-19 10:07:11 +08:00
|
|
|
component: _import_custom("HomeView/Works"),
|
2025-06-18 21:25:25 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: "events",
|
|
|
|
|
name: "events",
|
|
|
|
|
meta: { enter: "all" },
|
2025-06-19 10:07:11 +08:00
|
|
|
component: _import_custom("HomeView/Events"),
|
2025-06-18 21:25:25 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: "cloud",
|
|
|
|
|
name: "cloud",
|
|
|
|
|
meta: { enter: "all" },
|
2025-06-19 10:07:11 +08:00
|
|
|
component: _import_custom("HomeView/cloudGeneration"),
|
2025-06-18 21:25:25 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: "eventsDetail",
|
|
|
|
|
name: "eventsDetail",
|
|
|
|
|
meta: { enter: "all" },
|
2025-06-19 10:07:11 +08:00
|
|
|
component: _import_component("Events/eventsDetail"),
|
2025-06-18 21:25:25 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: "account",
|
|
|
|
|
name: "account",
|
|
|
|
|
meta: { enter: "all" },
|
2025-06-19 10:07:11 +08:00
|
|
|
component: _import_component("Account/account"),
|
2025-06-18 21:25:25 +08:00
|
|
|
children: [
|
|
|
|
|
{
|
|
|
|
|
path: "",
|
|
|
|
|
name: "accountChil",
|
|
|
|
|
meta: { enter: "all" },
|
|
|
|
|
redirect: "/home/account/frontPage",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: "frontPage",
|
|
|
|
|
name: "frontPage",
|
|
|
|
|
meta: { enter: "all" },
|
2025-06-19 10:07:11 +08:00
|
|
|
component: _import_component("Account/frontPage"),
|
2025-06-18 21:25:25 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: "accountMessage",
|
|
|
|
|
name: "accountMessage",
|
|
|
|
|
meta: { enter: "all" },
|
2025-06-19 10:07:11 +08:00
|
|
|
component: _import_component("Account/accountMessage"),
|
2025-06-18 21:25:25 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: "accountFollowFans",
|
|
|
|
|
name: "accountFollowFans",
|
|
|
|
|
meta: { enter: "all" },
|
2025-06-19 10:07:11 +08:00
|
|
|
component: _import_component("Account/accountFollowFans"),
|
2025-06-18 21:25:25 +08:00
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: "otherUsers",
|
|
|
|
|
name: "otherUsers",
|
|
|
|
|
meta: { enter: "all" },
|
2025-06-19 10:07:11 +08:00
|
|
|
component: _import_component("Account/otherUsers"),
|
2025-06-18 21:25:25 +08:00
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: "/Square",
|
|
|
|
|
name: "HomeRecommend",
|
|
|
|
|
meta: { enter: "all" },
|
|
|
|
|
component: _import("HomeRecommend"),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: "/administrator",
|
|
|
|
|
name: "administrator",
|
|
|
|
|
meta: { enter: 3 },
|
|
|
|
|
component: _import("Administrator"),
|
|
|
|
|
children: [
|
|
|
|
|
{
|
|
|
|
|
path: "allUser",
|
|
|
|
|
name: "allUser",
|
|
|
|
|
meta: { enter: 3 },
|
2025-06-19 10:07:11 +08:00
|
|
|
component: _import_component("Administrator/allUser"),
|
2025-06-18 21:25:25 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: "coupons",
|
|
|
|
|
name: "coupons",
|
|
|
|
|
meta: { enter: 3 },
|
2025-06-19 10:07:11 +08:00
|
|
|
component: _import_component("Administrator/coupons/index"),
|
2025-06-18 21:25:25 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: "testClickData",
|
|
|
|
|
name: "testClickData",
|
|
|
|
|
meta: { enter: 3 },
|
2025-06-19 10:07:11 +08:00
|
|
|
component: _import_component("Administrator/TestClickData"),
|
2025-06-18 21:25:25 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: "trialApproval",
|
|
|
|
|
name: "trialApproval",
|
|
|
|
|
meta: { enter: 3 },
|
2025-06-19 10:07:11 +08:00
|
|
|
component: _import_component("Administrator/trialApproval"),
|
2025-06-18 21:25:25 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: "questionnaire",
|
|
|
|
|
name: "questionnaire",
|
|
|
|
|
meta: { enter: 3 },
|
2025-06-19 10:07:11 +08:00
|
|
|
component: _import_component("Administrator/questionnaire"),
|
2025-06-18 21:25:25 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: "recentActiveChart",
|
|
|
|
|
name: "recentActiveChart",
|
|
|
|
|
meta: { enter: 3 },
|
2025-06-19 10:07:11 +08:00
|
|
|
component: _import_component("Administrator/recentActiveChart"),
|
2025-06-18 21:25:25 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: "recentActiveUser",
|
|
|
|
|
name: "recentActiveUser",
|
|
|
|
|
meta: { enter: 3 },
|
2025-06-19 10:07:11 +08:00
|
|
|
component: _import_component("Administrator/recentActiveUser"),
|
2025-06-18 21:25:25 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: "recentActiveUserChart",
|
|
|
|
|
name: "recentActiveUserChart",
|
|
|
|
|
meta: { enter: 3 },
|
2025-06-19 10:07:11 +08:00
|
|
|
component: _import_component("Administrator/recentActiveUserChart"),
|
2025-06-18 21:25:25 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: "recentNewUser",
|
|
|
|
|
name: "recentNewUser",
|
|
|
|
|
meta: { enter: 3 },
|
2025-06-19 10:07:11 +08:00
|
|
|
component: _import_component("Administrator/recentNewUser"),
|
2025-06-18 21:25:25 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: "recentNewUserChart",
|
|
|
|
|
name: "recentNewUserChart",
|
|
|
|
|
meta: { enter: 3 },
|
2025-06-19 10:07:11 +08:00
|
|
|
component: _import_component("Administrator/recentNewUserChart"),
|
2025-06-18 21:25:25 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: "trialUserCountry",
|
|
|
|
|
name: "trialUserCountry",
|
|
|
|
|
meta: { enter: 3 },
|
2025-06-19 10:07:11 +08:00
|
|
|
component: _import_component("Administrator/trialUserCountry"),
|
2025-06-18 21:25:25 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: "trialUserConversionRateChart",
|
|
|
|
|
name: "trialUserConversionRateChart",
|
|
|
|
|
meta: { enter: 3 },
|
|
|
|
|
component: _import_component(
|
2025-06-19 10:07:11 +08:00
|
|
|
"Administrator/trialUserConversionRateChart"
|
2025-06-18 21:25:25 +08:00
|
|
|
),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: "trialAllUser",
|
|
|
|
|
name: "trialAllUser",
|
|
|
|
|
meta: { enter: 3 },
|
2025-06-19 10:07:11 +08:00
|
|
|
component: _import_component("Administrator/trialAllUser"),
|
2025-06-18 21:25:25 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: "affiliateAudit",
|
|
|
|
|
name: "affiliateAudit",
|
|
|
|
|
meta: { enter: 3 },
|
|
|
|
|
component: _import_component(
|
2025-06-19 10:07:11 +08:00
|
|
|
"Administrator/affiliate/affiliateAudit"
|
2025-06-18 21:25:25 +08:00
|
|
|
),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: "TransactionTable",
|
|
|
|
|
name: "TransactionTable",
|
|
|
|
|
meta: { enter: 3 },
|
|
|
|
|
component: _import_component(
|
2025-06-19 10:07:11 +08:00
|
|
|
"Administrator/Transaction/TransactionTable"
|
2025-06-18 21:25:25 +08:00
|
|
|
),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: "organization",
|
|
|
|
|
name: "organization",
|
|
|
|
|
meta: { enter: 3 },
|
|
|
|
|
component: _import_component(
|
2025-06-19 10:07:11 +08:00
|
|
|
"Administrator/organization/organization"
|
2025-06-18 21:25:25 +08:00
|
|
|
),
|
|
|
|
|
},
|
|
|
|
|
//企业版教育管理员页面
|
|
|
|
|
{
|
|
|
|
|
path: "allUserSE",
|
|
|
|
|
name: "allUserSE",
|
|
|
|
|
meta: { enter: 3 },
|
2025-06-19 10:07:11 +08:00
|
|
|
component: _import_component("Administrator/SE/allUser/index"),
|
2025-06-18 21:25:25 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: "testClickDataSE",
|
|
|
|
|
name: "testClickDataSE",
|
|
|
|
|
meta: { enter: 3 },
|
|
|
|
|
component: _import_component(
|
2025-06-19 10:07:11 +08:00
|
|
|
"Administrator/SE/designDetailList/index"
|
2025-06-18 21:25:25 +08:00
|
|
|
),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: "generateFrequencySE",
|
|
|
|
|
name: "generateFrequencySE",
|
|
|
|
|
meta: { enter: 3 },
|
|
|
|
|
component: _import_component(
|
2025-06-19 10:07:11 +08:00
|
|
|
"Administrator/SE/getGenerateFrequency/index"
|
2025-06-18 21:25:25 +08:00
|
|
|
),
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: "/paySucceed",
|
|
|
|
|
name: "paySucceed",
|
|
|
|
|
meta: {
|
|
|
|
|
enter: "all",
|
|
|
|
|
},
|
|
|
|
|
component: _import("paySucceed"),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: "/affiliate",
|
|
|
|
|
name: "affiliate",
|
|
|
|
|
meta: {
|
|
|
|
|
enter: 2,
|
|
|
|
|
},
|
|
|
|
|
component: _import("affiliate/affiliatePage"),
|
|
|
|
|
children: [
|
|
|
|
|
{
|
|
|
|
|
path: "/affiliate",
|
|
|
|
|
name: "affiliateHome",
|
|
|
|
|
meta: {
|
|
|
|
|
enter: 2,
|
|
|
|
|
},
|
|
|
|
|
component: _import_component("affiliate/home"),
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: "/affiliateRegister",
|
|
|
|
|
name: "affiliateRegister",
|
|
|
|
|
meta: {
|
|
|
|
|
enter: "all",
|
|
|
|
|
},
|
|
|
|
|
component: _import("affiliate/affiliateRegister"),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: "/setIdentification",
|
|
|
|
|
name: "setIdentification",
|
|
|
|
|
meta: {
|
|
|
|
|
enter: "all",
|
|
|
|
|
},
|
|
|
|
|
component: _import("setIdentification"),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: "/feedbackSurvey",
|
|
|
|
|
name: "feedbackSurvey",
|
|
|
|
|
meta: {
|
|
|
|
|
enter: "all",
|
|
|
|
|
},
|
|
|
|
|
component: _import("feedbackSurvey"),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: "/feedbackSurveyCN",
|
|
|
|
|
name: "feedbackSurveyCN",
|
|
|
|
|
meta: {
|
|
|
|
|
enter: "all",
|
|
|
|
|
},
|
|
|
|
|
component: _import("feedbackSurveyCN"),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: "/404",
|
|
|
|
|
name: "404",
|
|
|
|
|
meta: {
|
|
|
|
|
enter: "all",
|
|
|
|
|
},
|
|
|
|
|
component: _import("404"),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: "/:catchAll(.*)",
|
|
|
|
|
redirect: "/404",
|
|
|
|
|
},
|
|
|
|
|
];
|
2023-01-06 16:00:15 +08:00
|
|
|
|
|
|
|
|
const router = createRouter({
|
2025-06-18 21:25:25 +08:00
|
|
|
history: createWebHistory(import.meta.env.BASE_URL),
|
|
|
|
|
// history: createWebHashHistory(),
|
|
|
|
|
routes,
|
|
|
|
|
});
|
2024-06-17 09:39:01 +08:00
|
|
|
// 刷新保存数据-
|
2025-06-18 21:25:25 +08:00
|
|
|
let state: any = store.state;
|
2024-06-17 09:39:01 +08:00
|
|
|
window.addEventListener("beforeunload", (e) => {
|
2025-06-18 21:25:25 +08:00
|
|
|
localStorage.setItem(
|
|
|
|
|
"vuex_setUserDetail",
|
|
|
|
|
JSON.stringify(state.UserHabit.userDetail)
|
|
|
|
|
);
|
2024-06-17 09:39:01 +08:00
|
|
|
});
|
2025-06-18 21:25:25 +08:00
|
|
|
var vuex_setUserDetail: any = localStorage.getItem("vuex_setUserDetail");
|
2024-12-18 17:38:43 +08:00
|
|
|
if (vuex_setUserDetail) {
|
2025-06-18 21:25:25 +08:00
|
|
|
if (JSON.parse(vuex_setUserDetail).email != "-------------") {
|
|
|
|
|
store.commit("setUserDetail", JSON.parse(vuex_setUserDetail));
|
|
|
|
|
}
|
|
|
|
|
// localStorage.removeItem("vuex_setUserDetail");
|
2024-06-17 09:39:01 +08:00
|
|
|
}
|
|
|
|
|
|
2025-06-18 21:25:25 +08:00
|
|
|
let setMurmur = (id: any) => {
|
|
|
|
|
let murmurStr: any = localStorage.getItem("murmurStr");
|
|
|
|
|
// let isSxis = false
|
|
|
|
|
let data = {
|
|
|
|
|
browserIdentifiers: murmurStr,
|
|
|
|
|
id: id,
|
|
|
|
|
};
|
|
|
|
|
if (data.id) {
|
|
|
|
|
Https.axiosPost(Https.httpUrls.noLoginRequired, data)
|
|
|
|
|
.then((rv) => {
|
|
|
|
|
let isTest = rv.systemUser == 3 ? true : false;
|
|
|
|
|
let isBeginner = rv.isBeginner == 1 ? true : false;
|
|
|
|
|
setCookie("isMurmur", true);
|
|
|
|
|
setCookie("token", rv.token);
|
|
|
|
|
setCookie("isTest", isTest);
|
|
|
|
|
setCookie("isBeginner", isBeginner);
|
|
|
|
|
setCookie("isBeginnerNum", 0); //从第一步开始,机器人开始的话就是从第二部开始
|
|
|
|
|
setCookie("userInfo", JSON.stringify(rv));
|
|
|
|
|
let userid = {
|
|
|
|
|
ueserId: rv.userId,
|
|
|
|
|
systemUser: rv.systemUser,
|
|
|
|
|
};
|
|
|
|
|
store.commit("upUserDetail", userid);
|
|
|
|
|
sessionStorage.setItem("isTimeOne", JSON.stringify(false)); //是否需要公告 提示 弹窗
|
|
|
|
|
let randomNum: any =
|
|
|
|
|
Math.floor(Math.random() * 9000000000000000) + 1000000000000000;
|
|
|
|
|
sessionStorage.setItem("sessionId", randomNum);
|
|
|
|
|
router.push("/home");
|
|
|
|
|
})
|
|
|
|
|
.catch((res) => {
|
|
|
|
|
// router.push('/Square')
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
const setViewsIncrease = (value: any) => {
|
|
|
|
|
sessionStorage.setItem("affiliateRef", value);
|
|
|
|
|
let data = {
|
|
|
|
|
id: value,
|
|
|
|
|
};
|
|
|
|
|
Https.axiosGet(Https.httpUrls.viewsIncrease, { params: data }).then(
|
|
|
|
|
(rv) => {}
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
let upgradeList = ["/feedbackSurvey", "/feedbackSurveyCN", "emailVerify"]; //指定页面系统维护也可以访问
|
|
|
|
|
router.beforeEach((to: any, from, next) => {
|
|
|
|
|
// 系统维护
|
|
|
|
|
// const toName = to.name === 'upgrade';
|
|
|
|
|
// if(upgradeList.indexOf(to.path) > -1){
|
|
|
|
|
// next();
|
|
|
|
|
// }else{
|
|
|
|
|
// if (toName) {
|
|
|
|
|
// next();
|
|
|
|
|
// } else {
|
|
|
|
|
// next({ name: 'upgrade' });
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// return
|
|
|
|
|
// 机房用户
|
|
|
|
|
let herfData = window.location.search.substring(1);
|
|
|
|
|
if (herfData.split("=")[0] == "noLogin" && to.name != "homePage") {
|
|
|
|
|
setMurmur(herfData.split("=")[1]);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
let affiliateRef = sessionStorage.getItem("affiliateRef");
|
|
|
|
|
if (to.query.order) sessionStorage.setItem("orderId", to.query.order); //记录是否点击跳转订单链接
|
|
|
|
|
if (to.query.ref && affiliateRef != to.query.ref)
|
|
|
|
|
setViewsIncrease(to.query.ref);
|
2024-02-19 10:33:54 +08:00
|
|
|
|
2025-06-18 21:25:25 +08:00
|
|
|
if (to.meta.enter == "all") {
|
|
|
|
|
next();
|
|
|
|
|
} else if (
|
|
|
|
|
state.UserHabit.userDetail.systemList.indexOf(to.meta.enter) > -1
|
|
|
|
|
) {
|
|
|
|
|
next();
|
|
|
|
|
} else {
|
|
|
|
|
next("/404");
|
|
|
|
|
}
|
|
|
|
|
// if(systemUser == 0){//游客用户只能进入这两个页面
|
2024-01-15 17:05:55 +08:00
|
|
|
});
|
2024-09-13 14:36:38 +08:00
|
|
|
|
2025-06-18 21:25:25 +08:00
|
|
|
export default router;
|