refactor: update package.json and improve ESLint configuration
- Removed outdated Vue CLI plugins and added new ESLint rules and plugins for better TypeScript support. - Enhanced ESLint configuration with parser options and overrides for Vue files. feat: refactor router configuration for improved readability - Reformatted router configuration for better structure and clarity. - Ensured consistent use of async component imports and updated route definitions. chore: update TypeScript configuration for better compatibility - Adjusted tsconfig.json to target ES2020 and include necessary libraries. - Added a new tsconfig.node.json for Node.js specific configurations. fix: update Vite configuration for proper asset handling - Modified vite.config.js to specify input for Rollup, ensuring correct asset management.
This commit is contained in:
132
.eslintrc.js
132
.eslintrc.js
@@ -1,72 +1,66 @@
|
||||
module.exports = {
|
||||
root: true, // 停止在父级目录中寻找
|
||||
env: {
|
||||
es6: true, // 启用 ES6 语法支持以及新的 ES6 全局变量或类型
|
||||
node: true, // Node.js 全局变量和 Node.js 作用域
|
||||
},
|
||||
extends: ['plugin:vue/essential'],
|
||||
rules: {
|
||||
'no-alert': 0, // 禁止使用alert confirm prompt
|
||||
'no-console': 0, // 禁止使用console
|
||||
'no-debugger': 0, // 禁止使用debugger
|
||||
'prefer-const': 0, // 建议使用 const 关闭
|
||||
'no-dupe-keys': 2, // 在创建对象字面量时不允许键重复 {a:1,a:1}
|
||||
'no-dupe-args': 2, // 函数参数不能重复
|
||||
'no-duplicate-imports': [
|
||||
1,
|
||||
{
|
||||
includeExports: true
|
||||
}
|
||||
], // 不允许重复导入
|
||||
|
||||
'no-duplicate-case': 2, // switch中的case标签不能重复
|
||||
'padded-blocks': 0, // 块语句内行首行尾是否要空行
|
||||
'space-after-keywords': [0, 'always'], // 关键字后面是否要空一格
|
||||
'space-before-blocks': [0, 'always'], // 不以新行开始的块{前面要不要有空格
|
||||
'space-before-function-paren': [0, 'always'], // 函数定义时括号前面要不要有空格
|
||||
'space-in-parens': [0, 'never'], // 小括号里面要不要有空格
|
||||
'space-infix-ops': 0, // 中缀操作符周围要不要有空格
|
||||
eqeqeq: 0, // 必须使用全等
|
||||
'no-var': 0, // 禁用var,用let和const代替
|
||||
'no-inline-comments': 0, // 禁止行内备注
|
||||
indent: 0,
|
||||
'vue/script-indent': 0,
|
||||
'vue/require-prop-type-constructor': 0,
|
||||
'vue/no-use-v-if-with-v-for': 0,
|
||||
'no-trailing-spaces': 0, // 一行结束后面不要有空格
|
||||
'no-multiple-empty-lines': 0, // [1, {"max": 2}],空行最多不能超过2行
|
||||
'no-extra-boolean-cast': 0, // 禁止不必要的bool转换
|
||||
'valid-jsdoc': 0,
|
||||
'one-var': 0, // 连续声明
|
||||
semi: 0, // 语句强制分号结尾
|
||||
'semi-spacing': [0, { before: false, after: true }], // 分号前后空格
|
||||
'no-new': 0, // 禁止在使用new构造一个实例后不赋值
|
||||
'no-extra-semi': 0, // 禁止多余的冒号
|
||||
'keyword-spacing': 0,
|
||||
'arrow-parens': 0, // 箭头函数用小括号括起来 - 关闭
|
||||
'generator-star-spacing': 0, // 生成器函数*的前后空格
|
||||
'no-mixed-operators': 0,
|
||||
'eol-last': 0, // 文件以单一的换行符结束 - 关闭
|
||||
'object-curly-spacing': 0, // 大括号内是否允许不必要的空格
|
||||
'no-callback-literal': 0,
|
||||
'multiline-ternary': 0,
|
||||
'no-self-assign':'off',
|
||||
'vue/multi-word-component-names': "off",
|
||||
"vue/no-v-model-argument": "off",
|
||||
},
|
||||
plugins:[
|
||||
'vue'
|
||||
],
|
||||
parserOptions: {
|
||||
parser: 'babel-eslint',
|
||||
"requireConfigFile": false,
|
||||
},
|
||||
overrides: [
|
||||
root: true,
|
||||
env: {
|
||||
se6: true,
|
||||
node: true,
|
||||
},
|
||||
extends: ["plugin:vue/essential"],
|
||||
rules: {
|
||||
"no-alert": 0, // 禁止使用alert confirm prompt
|
||||
"no-console": 0, // 禁止使用console
|
||||
"no-debugger": 0, // 禁止使用debugger
|
||||
"prefer-const": 0, // 建议使用 const 关闭
|
||||
"no-dupe-keys": 2, // 在创建对象字面量时不允许键重复 {a:1,a:1}
|
||||
"no-dupe-args": 2, // 函数参数不能重复
|
||||
"no-duplicate-imports": [
|
||||
1,
|
||||
{
|
||||
files: ['**/__tests__/*.{j,t}s?(x)', '**/tests/unit/**/*.spec.{j,t}s?(x)'],
|
||||
env: {
|
||||
jest: true
|
||||
}
|
||||
includeExports: true,
|
||||
},
|
||||
], // 不允许重复导入
|
||||
|
||||
"no-duplicate-case": 2, // switch中的case标签不能重复
|
||||
"padded-blocks": 0, // 块语句内行首行尾是否要空行
|
||||
"space-after-keywords": [0, "always"], // 关键字后面是否要空一格
|
||||
"space-before-blocks": [0, "always"], // 不以新行开始的块{前面要不要有空格
|
||||
"space-before-function-paren": [0, "always"], // 函数定义时括号前面要不要有空格
|
||||
"space-in-parens": [0, "never"], // 小括号里面要不要有空格
|
||||
"space-infix-ops": 0, // 中缀操作符周围要不要有空格
|
||||
eqeqeq: 0, // 必须使用全等
|
||||
"no-var": 0, // 禁用var,用let和const代替
|
||||
"no-inline-comments": 0, // 禁止行内备注
|
||||
indent: 0,
|
||||
"vue/script-indent": 0,
|
||||
"vue/require-prop-type-constructor": 0,
|
||||
"vue/no-use-v-if-with-v-for": 0,
|
||||
"no-trailing-spaces": 0, // 一行结束后面不要有空格
|
||||
"no-multiple-empty-lines": 0, // [1, {"max": 2}],空行最多不能超过2行
|
||||
"no-extra-boolean-cast": 0, // 禁止不必要的bool转换
|
||||
"valid-jsdoc": 0,
|
||||
"one-var": 0, // 连续声明
|
||||
semi: 0, // 语句强制分号结尾
|
||||
"semi-spacing": [0, { before: false, after: true }], // 分号前后空格
|
||||
"no-new": 0, // 禁止在使用new构造一个实例后不赋值
|
||||
"no-extra-semi": 0, // 禁止多余的冒号
|
||||
"keyword-spacing": 0,
|
||||
"arrow-parens": 0, // 箭头函数用小括号括起来 - 关闭
|
||||
"generator-star-spacing": 0, // 生成器函数*的前后空格
|
||||
"no-mixed-operators": 0,
|
||||
"eol-last": 0, // 文件以单一的换行符结束 - 关闭
|
||||
"object-curly-spacing": 0, // 大括号内是否允许不必要的空格
|
||||
"no-callback-literal": 0,
|
||||
"multiline-ternary": 0,
|
||||
"no-self-assign": "off",
|
||||
"vue/multi-word-component-names": "off",
|
||||
"vue/no-v-model-argument": "off",
|
||||
},
|
||||
plugins:['vue'],
|
||||
overrides: [
|
||||
{
|
||||
files: ['**/__tests__/*.{j,t}s?(x)', '**/tests/unit/**/*.spec.{j,t}s?(x)'],
|
||||
env: {
|
||||
jest: true
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
||||
]s
|
||||
};
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
module.exports = {
|
||||
presets: [
|
||||
'@vue/cli-plugin-babel/preset'
|
||||
]
|
||||
}
|
||||
8733
package-lock.json
generated
8733
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
40
package.json
40
package.json
@@ -48,42 +48,56 @@
|
||||
"@typescript-eslint/eslint-plugin": "^5.4.0",
|
||||
"@typescript-eslint/parser": "^5.4.0",
|
||||
"@vitejs/plugin-vue": "^5.2.4",
|
||||
"@vue/cli-plugin-babel": "~5.0.0",
|
||||
"@vue/cli-plugin-eslint": "~5.0.0",
|
||||
"@vue/cli-plugin-router": "~5.0.0",
|
||||
"@vue/cli-plugin-typescript": "~5.0.0",
|
||||
"@vue/cli-plugin-vuex": "~5.0.0",
|
||||
"@vue/cli-service": "~5.0.0",
|
||||
"@vue/eslint-config-typescript": "^9.1.0",
|
||||
"babel-eslint": "^10.1.0",
|
||||
"eslint": "^7.32.0",
|
||||
"eslint-plugin-vue": "^8.0.3",
|
||||
"less": "^4.1.3",
|
||||
"less-loader": "^11.0.0",
|
||||
"style-resources-loader": "^1.5.0",
|
||||
"typescript": "~4.5.5",
|
||||
"unplugin-auto-import": "^19.3.0",
|
||||
"unplugin-element-plus": "^0.8.0",
|
||||
"unplugin-vue-components": "^28.7.0",
|
||||
"vite": "^6.3.5",
|
||||
"vite-plugin-svg-icons": "^2.0.1",
|
||||
"vue-cli-plugin-style-resources-loader": "^0.1.5",
|
||||
"vue-lazyload": "^3.0.0-rc.2"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"root": true,
|
||||
"env": {
|
||||
"node": true
|
||||
"node": true,
|
||||
"browser": true,
|
||||
"es2021": true
|
||||
},
|
||||
"extends": [
|
||||
"plugin:vue/vue3-essential",
|
||||
"eslint:recommended",
|
||||
"@vue/typescript/recommended"
|
||||
],
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 2020
|
||||
"ecmaVersion": 2020,
|
||||
"sourceType": "module"
|
||||
},
|
||||
"rules": {}
|
||||
"plugins": [
|
||||
"@typescript-eslint",
|
||||
"vue"
|
||||
],
|
||||
"rules": {
|
||||
"@typescript-eslint/no-explicit-any": "off",
|
||||
"@typescript-eslint/no-unused-vars": "off",
|
||||
"vue/multi-word-component-names": "off"
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"files": [
|
||||
"*.vue"
|
||||
],
|
||||
"parser": "vue-eslint-parser",
|
||||
"parserOptions": {
|
||||
"parser": "@typescript-eslint/parser"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"browserslist": [
|
||||
"> 1%",
|
||||
@@ -91,4 +105,4 @@
|
||||
"not dead",
|
||||
"not ie 11"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,433 +1,475 @@
|
||||
import { createRouter, createWebHistory, RouteRecordRaw, createWebHashHistory } from 'vue-router'
|
||||
import { defineAsyncComponent } from 'vue'
|
||||
import store from "@/store"
|
||||
import {
|
||||
createRouter,
|
||||
createWebHistory,
|
||||
RouteRecordRaw,
|
||||
createWebHashHistory,
|
||||
} from "vue-router";
|
||||
import { defineAsyncComponent } from "vue";
|
||||
import store from "@/store";
|
||||
import { useStore } from "vuex";
|
||||
import { Https } from "@/tool/https";
|
||||
import { getCookie, setCookie } from "@/tool/cookie";
|
||||
const _import = (path: string) => () => import(`../views/${path}.vue`);
|
||||
const _import_component = (path : string) => () => import(`../component/${path}`);
|
||||
const _import_custom = (path : string) => () => import(`../views/${path}`);
|
||||
const _import_component = (path: string) => () =>
|
||||
import(`../component/${path}`);
|
||||
const _import_custom = (path: string) => () => import(`../views/${path}`);
|
||||
// defineAsyncComponent(import(`../views/${path}.vue`))
|
||||
const routes: Array<RouteRecordRaw> = [
|
||||
{
|
||||
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',},
|
||||
component: _import_custom('HomeView/Tools.vue'),
|
||||
},{
|
||||
path:'homePage',
|
||||
name:'homePage',
|
||||
meta:{enter:'all',},
|
||||
component: _import_custom('HomeView/HomeView.vue'),
|
||||
},{
|
||||
path:'library',
|
||||
name:'library',
|
||||
meta:{enter:'all',},
|
||||
component: _import_custom('HomeView/library.vue'),
|
||||
},{
|
||||
path:'history',
|
||||
name:'history',
|
||||
meta:{enter:'all',},
|
||||
component: _import_custom('HomeView/history.vue'),
|
||||
},{
|
||||
path:'works',
|
||||
name:'works',
|
||||
meta:{enter:'all',},
|
||||
component: _import_custom('HomeView/Works.vue'),
|
||||
},{
|
||||
path:'events',
|
||||
name:'events',
|
||||
meta:{enter:'all',},
|
||||
component: _import_custom('HomeView/Events.vue'),
|
||||
},{
|
||||
path:'cloud',
|
||||
name:'cloud',
|
||||
meta:{enter:'all',},
|
||||
component: _import_custom('HomeView/cloudGeneration.vue'),
|
||||
},{
|
||||
path:'eventsDetail',
|
||||
name:'eventsDetail',
|
||||
meta:{enter:'all',},
|
||||
component: _import_component('Events/eventsDetail.vue'),
|
||||
},{
|
||||
path:'account',
|
||||
name:'account',
|
||||
meta:{enter:'all',},
|
||||
component: _import_component('Account/account.vue'),
|
||||
children:[
|
||||
{
|
||||
path: "",
|
||||
name:'accountChil',
|
||||
meta:{enter:'all',},
|
||||
redirect: "/home/account/frontPage"
|
||||
},
|
||||
{
|
||||
path:'frontPage',
|
||||
name:'frontPage',
|
||||
meta:{enter:'all',},
|
||||
component: _import_component('Account/frontPage.vue'),
|
||||
},
|
||||
{
|
||||
path:'accountMessage',
|
||||
name:'accountMessage',
|
||||
meta:{enter:'all',},
|
||||
component: _import_component('Account/accountMessage.vue'),
|
||||
},
|
||||
{
|
||||
path:'accountFollowFans',
|
||||
name:'accountFollowFans',
|
||||
meta:{enter:'all',},
|
||||
component: _import_component('Account/accountFollowFans.vue'),
|
||||
}
|
||||
]
|
||||
},{
|
||||
path:'otherUsers',
|
||||
name:'otherUsers',
|
||||
meta:{enter:'all',},
|
||||
component: _import_component('Account/otherUsers.vue'),
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
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,},
|
||||
component: _import_component('Administrator/allUser.vue'),
|
||||
},
|
||||
{
|
||||
path:'coupons',
|
||||
name:'coupons',
|
||||
meta:{enter:3,},
|
||||
component: _import_component('Administrator/coupons/index.vue'),
|
||||
},
|
||||
{
|
||||
path:'testClickData',
|
||||
name:'testClickData',
|
||||
meta:{enter:3,},
|
||||
component: _import_component('Administrator/TestClickData.vue'),
|
||||
},
|
||||
{
|
||||
path:'trialApproval',
|
||||
name:'trialApproval',
|
||||
meta:{enter:3,},
|
||||
component: _import_component('Administrator/trialApproval.vue'),
|
||||
},{
|
||||
path:'questionnaire',
|
||||
name:'questionnaire',
|
||||
meta:{enter:3,},
|
||||
component: _import_component('Administrator/questionnaire.vue'),
|
||||
},{
|
||||
path:'recentActiveChart',
|
||||
name:'recentActiveChart',
|
||||
meta:{enter:3,},
|
||||
component: _import_component('Administrator/recentActiveChart.vue'),
|
||||
},{
|
||||
path:'recentActiveUser',
|
||||
name:'recentActiveUser',
|
||||
meta:{enter:3,},
|
||||
component: _import_component('Administrator/recentActiveUser.vue'),
|
||||
},{
|
||||
path:'recentActiveUserChart',
|
||||
name:'recentActiveUserChart',
|
||||
meta:{enter:3,},
|
||||
component: _import_component('Administrator/recentActiveUserChart.vue'),
|
||||
},{
|
||||
path:'recentNewUser',
|
||||
name:'recentNewUser',
|
||||
meta:{enter:3,},
|
||||
component: _import_component('Administrator/recentNewUser.vue'),
|
||||
},{
|
||||
path:'recentNewUserChart',
|
||||
name:'recentNewUserChart',
|
||||
meta:{enter:3,},
|
||||
component: _import_component('Administrator/recentNewUserChart.vue'),
|
||||
},{
|
||||
path:'trialUserCountry',
|
||||
name:'trialUserCountry',
|
||||
meta:{enter:3,},
|
||||
component: _import_component('Administrator/trialUserCountry.vue'),
|
||||
},{
|
||||
path:'trialUserConversionRateChart',
|
||||
name:'trialUserConversionRateChart',
|
||||
meta:{enter:3,},
|
||||
component: _import_component('Administrator/trialUserConversionRateChart.vue'),
|
||||
},{
|
||||
path:'trialAllUser',
|
||||
name:'trialAllUser',
|
||||
meta:{enter:3,},
|
||||
component: _import_component('Administrator/trialAllUser.vue'),
|
||||
},{
|
||||
path:'affiliateAudit',
|
||||
name:'affiliateAudit',
|
||||
meta:{enter:3,},
|
||||
component: _import_component('Administrator/affiliate/affiliateAudit.vue'),
|
||||
},{
|
||||
path:'TransactionTable',
|
||||
name:'TransactionTable',
|
||||
meta:{enter:3,},
|
||||
component: _import_component('Administrator/Transaction/TransactionTable.vue'),
|
||||
},{
|
||||
path:'organization',
|
||||
name:'organization',
|
||||
meta:{enter:3,},
|
||||
component: _import_component('Administrator/organization/organization.vue'),
|
||||
},
|
||||
//企业版教育管理员页面
|
||||
{
|
||||
path:'allUserSE',
|
||||
name:'allUserSE',
|
||||
meta:{enter:3,},
|
||||
component: _import_component('Administrator/SE/allUser/index.vue'),
|
||||
},
|
||||
{
|
||||
path:'testClickDataSE',
|
||||
name:'testClickDataSE',
|
||||
meta:{enter:3,},
|
||||
component: _import_component('Administrator/SE/designDetailList/index.vue'),
|
||||
},
|
||||
{
|
||||
path:'generateFrequencySE',
|
||||
name:'generateFrequencySE',
|
||||
meta:{enter:3,},
|
||||
component: _import_component('Administrator/SE/getGenerateFrequency/index.vue'),
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
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",
|
||||
},
|
||||
|
||||
]
|
||||
{
|
||||
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" },
|
||||
component: _import_custom("HomeView/Tools.vue"),
|
||||
},
|
||||
{
|
||||
path: "homePage",
|
||||
name: "homePage",
|
||||
meta: { enter: "all" },
|
||||
component: _import_custom("HomeView/HomeView.vue"),
|
||||
},
|
||||
{
|
||||
path: "library",
|
||||
name: "library",
|
||||
meta: { enter: "all" },
|
||||
component: _import_custom("HomeView/library.vue"),
|
||||
},
|
||||
{
|
||||
path: "history",
|
||||
name: "history",
|
||||
meta: { enter: "all" },
|
||||
component: _import_custom("HomeView/history.vue"),
|
||||
},
|
||||
{
|
||||
path: "works",
|
||||
name: "works",
|
||||
meta: { enter: "all" },
|
||||
component: _import_custom("HomeView/Works.vue"),
|
||||
},
|
||||
{
|
||||
path: "events",
|
||||
name: "events",
|
||||
meta: { enter: "all" },
|
||||
component: _import_custom("HomeView/Events.vue"),
|
||||
},
|
||||
{
|
||||
path: "cloud",
|
||||
name: "cloud",
|
||||
meta: { enter: "all" },
|
||||
component: _import_custom("HomeView/cloudGeneration.vue"),
|
||||
},
|
||||
{
|
||||
path: "eventsDetail",
|
||||
name: "eventsDetail",
|
||||
meta: { enter: "all" },
|
||||
component: _import_component("Events/eventsDetail.vue"),
|
||||
},
|
||||
{
|
||||
path: "account",
|
||||
name: "account",
|
||||
meta: { enter: "all" },
|
||||
component: _import_component("Account/account.vue"),
|
||||
children: [
|
||||
{
|
||||
path: "",
|
||||
name: "accountChil",
|
||||
meta: { enter: "all" },
|
||||
redirect: "/home/account/frontPage",
|
||||
},
|
||||
{
|
||||
path: "frontPage",
|
||||
name: "frontPage",
|
||||
meta: { enter: "all" },
|
||||
component: _import_component("Account/frontPage.vue"),
|
||||
},
|
||||
{
|
||||
path: "accountMessage",
|
||||
name: "accountMessage",
|
||||
meta: { enter: "all" },
|
||||
component: _import_component("Account/accountMessage.vue"),
|
||||
},
|
||||
{
|
||||
path: "accountFollowFans",
|
||||
name: "accountFollowFans",
|
||||
meta: { enter: "all" },
|
||||
component: _import_component("Account/accountFollowFans.vue"),
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "otherUsers",
|
||||
name: "otherUsers",
|
||||
meta: { enter: "all" },
|
||||
component: _import_component("Account/otherUsers.vue"),
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
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 },
|
||||
component: _import_component("Administrator/allUser.vue"),
|
||||
},
|
||||
{
|
||||
path: "coupons",
|
||||
name: "coupons",
|
||||
meta: { enter: 3 },
|
||||
component: _import_component("Administrator/coupons/index.vue"),
|
||||
},
|
||||
{
|
||||
path: "testClickData",
|
||||
name: "testClickData",
|
||||
meta: { enter: 3 },
|
||||
component: _import_component("Administrator/TestClickData.vue"),
|
||||
},
|
||||
{
|
||||
path: "trialApproval",
|
||||
name: "trialApproval",
|
||||
meta: { enter: 3 },
|
||||
component: _import_component("Administrator/trialApproval.vue"),
|
||||
},
|
||||
{
|
||||
path: "questionnaire",
|
||||
name: "questionnaire",
|
||||
meta: { enter: 3 },
|
||||
component: _import_component("Administrator/questionnaire.vue"),
|
||||
},
|
||||
{
|
||||
path: "recentActiveChart",
|
||||
name: "recentActiveChart",
|
||||
meta: { enter: 3 },
|
||||
component: _import_component("Administrator/recentActiveChart.vue"),
|
||||
},
|
||||
{
|
||||
path: "recentActiveUser",
|
||||
name: "recentActiveUser",
|
||||
meta: { enter: 3 },
|
||||
component: _import_component("Administrator/recentActiveUser.vue"),
|
||||
},
|
||||
{
|
||||
path: "recentActiveUserChart",
|
||||
name: "recentActiveUserChart",
|
||||
meta: { enter: 3 },
|
||||
component: _import_component("Administrator/recentActiveUserChart.vue"),
|
||||
},
|
||||
{
|
||||
path: "recentNewUser",
|
||||
name: "recentNewUser",
|
||||
meta: { enter: 3 },
|
||||
component: _import_component("Administrator/recentNewUser.vue"),
|
||||
},
|
||||
{
|
||||
path: "recentNewUserChart",
|
||||
name: "recentNewUserChart",
|
||||
meta: { enter: 3 },
|
||||
component: _import_component("Administrator/recentNewUserChart.vue"),
|
||||
},
|
||||
{
|
||||
path: "trialUserCountry",
|
||||
name: "trialUserCountry",
|
||||
meta: { enter: 3 },
|
||||
component: _import_component("Administrator/trialUserCountry.vue"),
|
||||
},
|
||||
{
|
||||
path: "trialUserConversionRateChart",
|
||||
name: "trialUserConversionRateChart",
|
||||
meta: { enter: 3 },
|
||||
component: _import_component(
|
||||
"Administrator/trialUserConversionRateChart.vue"
|
||||
),
|
||||
},
|
||||
{
|
||||
path: "trialAllUser",
|
||||
name: "trialAllUser",
|
||||
meta: { enter: 3 },
|
||||
component: _import_component("Administrator/trialAllUser.vue"),
|
||||
},
|
||||
{
|
||||
path: "affiliateAudit",
|
||||
name: "affiliateAudit",
|
||||
meta: { enter: 3 },
|
||||
component: _import_component(
|
||||
"Administrator/affiliate/affiliateAudit.vue"
|
||||
),
|
||||
},
|
||||
{
|
||||
path: "TransactionTable",
|
||||
name: "TransactionTable",
|
||||
meta: { enter: 3 },
|
||||
component: _import_component(
|
||||
"Administrator/Transaction/TransactionTable.vue"
|
||||
),
|
||||
},
|
||||
{
|
||||
path: "organization",
|
||||
name: "organization",
|
||||
meta: { enter: 3 },
|
||||
component: _import_component(
|
||||
"Administrator/organization/organization.vue"
|
||||
),
|
||||
},
|
||||
//企业版教育管理员页面
|
||||
{
|
||||
path: "allUserSE",
|
||||
name: "allUserSE",
|
||||
meta: { enter: 3 },
|
||||
component: _import_component("Administrator/SE/allUser/index.vue"),
|
||||
},
|
||||
{
|
||||
path: "testClickDataSE",
|
||||
name: "testClickDataSE",
|
||||
meta: { enter: 3 },
|
||||
component: _import_component(
|
||||
"Administrator/SE/designDetailList/index.vue"
|
||||
),
|
||||
},
|
||||
{
|
||||
path: "generateFrequencySE",
|
||||
name: "generateFrequencySE",
|
||||
meta: { enter: 3 },
|
||||
component: _import_component(
|
||||
"Administrator/SE/getGenerateFrequency/index.vue"
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
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",
|
||||
},
|
||||
];
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHistory(process.env.BASE_URL),
|
||||
// history: createWebHashHistory(),
|
||||
routes
|
||||
})
|
||||
history: createWebHistory(import.meta.env.BASE_URL),
|
||||
// history: createWebHashHistory(),
|
||||
routes,
|
||||
});
|
||||
// 刷新保存数据-
|
||||
let state:any = store.state
|
||||
let state: any = store.state;
|
||||
window.addEventListener("beforeunload", (e) => {
|
||||
localStorage.setItem(
|
||||
"vuex_setUserDetail",
|
||||
JSON.stringify(state.UserHabit.userDetail)
|
||||
);
|
||||
|
||||
localStorage.setItem(
|
||||
"vuex_setUserDetail",
|
||||
JSON.stringify(state.UserHabit.userDetail)
|
||||
);
|
||||
});
|
||||
var vuex_setUserDetail:any = localStorage.getItem("vuex_setUserDetail");
|
||||
var vuex_setUserDetail: any = localStorage.getItem("vuex_setUserDetail");
|
||||
if (vuex_setUserDetail) {
|
||||
if(JSON.parse(vuex_setUserDetail).email != '-------------'){
|
||||
store.commit("setUserDetail", JSON.parse(vuex_setUserDetail));
|
||||
}
|
||||
// localStorage.removeItem("vuex_setUserDetail");
|
||||
if (JSON.parse(vuex_setUserDetail).email != "-------------") {
|
||||
store.commit("setUserDetail", JSON.parse(vuex_setUserDetail));
|
||||
}
|
||||
// localStorage.removeItem("vuex_setUserDetail");
|
||||
}
|
||||
|
||||
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)
|
||||
|
||||
if(to.meta.enter == 'all'){
|
||||
next();
|
||||
}else if(state.UserHabit.userDetail.systemList.indexOf(to.meta.enter) > -1){
|
||||
next()
|
||||
}else{
|
||||
next('/404');
|
||||
}
|
||||
// if(systemUser == 0){//游客用户只能进入这两个页面
|
||||
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);
|
||||
|
||||
if (to.meta.enter == "all") {
|
||||
next();
|
||||
} else if (
|
||||
state.UserHabit.userDetail.systemList.indexOf(to.meta.enter) > -1
|
||||
) {
|
||||
next();
|
||||
} else {
|
||||
next("/404");
|
||||
}
|
||||
// if(systemUser == 0){//游客用户只能进入这两个页面
|
||||
});
|
||||
|
||||
export default router
|
||||
export default router;
|
||||
|
||||
57
src/shims-vue.d.ts
vendored
57
src/shims-vue.d.ts
vendored
@@ -1,21 +1,38 @@
|
||||
/* eslint-disable */
|
||||
declare module '*.vue' {
|
||||
import type { DefineComponent } from 'vue'
|
||||
const component: DefineComponent<{}, {}, any>
|
||||
export default component
|
||||
/// <reference types="vite/client" />
|
||||
|
||||
declare module "*.vue" {
|
||||
import type { DefineComponent } from "vue";
|
||||
const component: DefineComponent<{}, {}, any>;
|
||||
export default component;
|
||||
}
|
||||
|
||||
interface ImportMetaEnv {
|
||||
readonly VITE_APP_TITLE: string;
|
||||
readonly VITE_APP_BASE_URL: string;
|
||||
readonly BASE_URL: string;
|
||||
// 更多环境变量...
|
||||
}
|
||||
|
||||
interface ImportMeta {
|
||||
readonly env: ImportMetaEnv;
|
||||
}
|
||||
|
||||
// 第三方库声明
|
||||
declare module "@ans1998/vue3-color";
|
||||
declare module "three";
|
||||
declare module "three/examples/jsm/controls/OrbitControls";
|
||||
declare module "three/examples/jsm/postprocessing/EffectComposer";
|
||||
declare module "three/examples/jsm/postprocessing/RenderPass";
|
||||
declare module "three/examples/jsm/postprocessing/OutlinePass";
|
||||
|
||||
// 全局变量声明
|
||||
declare global {
|
||||
var ColorThief: any;
|
||||
var EyeDropper: any;
|
||||
interface Window {
|
||||
ColorThief: any;
|
||||
EyeDropper: any;
|
||||
google: any;
|
||||
gc?: () => void;
|
||||
}
|
||||
}
|
||||
// declare module '@vue/runtime-core' {
|
||||
// //全局this注册方法或者公用属性
|
||||
// interface ComponentCustomProperties {
|
||||
// // 调整成你要使用到的属性,在这里进行注册
|
||||
// // GO: any
|
||||
// }
|
||||
// }
|
||||
declare module '@ans1998/vue3-color'
|
||||
declare var ColorThief: any;
|
||||
declare var EyeDropper: any;
|
||||
declare module 'three'
|
||||
declare module 'OrbitControls'
|
||||
declare module 'EffectComposer'
|
||||
declare module 'RenderPass'
|
||||
declare module 'OutlinePass'
|
||||
|
||||
@@ -1,49 +1,53 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "esnext",
|
||||
"module": "esnext",
|
||||
"strict": true,
|
||||
"jsx": "preserve",
|
||||
"moduleResolution": "node",
|
||||
"experimentalDecorators": true,
|
||||
"skipLibCheck": true,
|
||||
"esModuleInterop": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"useDefineForClassFields": true,
|
||||
"resolveJsonModule": true,//引入json文件
|
||||
"esModuleInterop": true,//引入json文件
|
||||
"sourceMap": true,
|
||||
"allowJs": true, //编译时允许有js
|
||||
"baseUrl": ".",
|
||||
"outDir": "./",
|
||||
"types": [
|
||||
"webpack-env"
|
||||
"compilerOptions": {
|
||||
"target": "ES2020",
|
||||
"useDefineForClassFields": true,
|
||||
"lib": [
|
||||
"ES2020",
|
||||
"DOM",
|
||||
"DOM.Iterable"
|
||||
],
|
||||
"module": "ESNext",
|
||||
"skipLibCheck": true,
|
||||
/* Bundler mode */
|
||||
"moduleResolution": "bundler",
|
||||
"allowImportingTsExtensions": true,
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"noEmit": true,
|
||||
"jsx": "preserve",
|
||||
/* Linting */
|
||||
"strict": true,
|
||||
"noUnusedLocals": false,
|
||||
"noUnusedParameters": false,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
/* Path mapping */
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"@/*": [
|
||||
"src/*"
|
||||
]
|
||||
},
|
||||
/* Additional options for Vue 3 */
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"esModuleInterop": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"experimentalDecorators": true,
|
||||
"emitDecoratorMetadata": true
|
||||
},
|
||||
"include": [
|
||||
"src/**/*.ts",
|
||||
"src/**/*.d.ts",
|
||||
"src/**/*.tsx",
|
||||
"src/**/*.vue"
|
||||
],
|
||||
"paths": {
|
||||
"@/*": [
|
||||
"src/*"
|
||||
],
|
||||
"three/ *": ["three/addons/postprocessing/*"]
|
||||
},
|
||||
"lib": [
|
||||
"esnext",
|
||||
"dom",
|
||||
"dom.iterable",
|
||||
"scripthost"
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
"dist"
|
||||
],
|
||||
"references": [
|
||||
{
|
||||
"path": "./tsconfig.node.json"
|
||||
}
|
||||
]
|
||||
},
|
||||
"include": [
|
||||
"src/**/*.ts",
|
||||
"src/**/*.tsx",
|
||||
"src/**/*.vue",
|
||||
"tests/**/*.ts",
|
||||
"tests/**/*.tsx",
|
||||
"src/**/*.js",
|
||||
"src/**/*.svg",
|
||||
"src/**/*.gif",
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules"
|
||||
]
|
||||
}
|
||||
}
|
||||
12
tsconfig.node.json
Normal file
12
tsconfig.node.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"skipLibCheck": true,
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "bundler",
|
||||
"allowSyntheticDefaultImports": true
|
||||
},
|
||||
"include": [
|
||||
"vite.config.js"
|
||||
]
|
||||
}
|
||||
@@ -97,6 +97,7 @@ export default defineConfig(({ mode }) => {
|
||||
assetsDir: "assets",
|
||||
// 分包策略
|
||||
rollupOptions: {
|
||||
input: path.resolve(__dirname, "public/index.html"),
|
||||
output: {
|
||||
manualChunks: {
|
||||
vendor: ["vue", "vue-router", "vuex"],
|
||||
|
||||
Reference in New Issue
Block a user