diff --git a/src/layout/index.vue b/src/layout/index.vue index 3eee778..daac857 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -18,28 +18,28 @@ {{ $t("modelMangage.title") }} -
+
{{ $t("businessMangage.title") }}
-
+
{{ $t("keyMangage.title") }}
-
+
{{ $t("priceMangage.title") }}
-
+
@@ -47,7 +47,7 @@
-
+
diff --git a/src/router/index.ts b/src/router/index.ts index 4f168d0..cbd1ad7 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -12,99 +12,27 @@ export const constantRoutes: RouteRecordRaw[] = [ meta: { hidden: true }, name: "login", }, + { path: "/signSucceed", component: () => import("@/views/signSucceed/index.vue"), meta: { hidden: true }, }, - // 创建视频 - { - path: "/", - component: Layout, - redirect: "/createVideo", - children: [ - { - path: "createVideo", - component: () => import("@/views/createVideo/index.vue"), - name: "createVideo", - meta: { - title: "createVideo", - icon: "homepage", - affix: true, - name: "createVideo.title", - }, - }, - ], - }, - // 视频列表 - { - path: "/", - component: Layout, - redirect: "/myCreating", - children: [ - { - path: "myCreating", - component: () => import("@/views/myCreating/index.vue"), - name: "myCreating", - meta: { - title: "myCreating", - icon: "homepage", - affix: true, - name: "myCreating.title", - }, - }, - ], - }, - { - path: "/", - component: Layout, - redirect: "/myStore", - children: [ - { - path: "myStore", - component: () => import("@/views/myStore/index.vue"), - name: "myStore", - meta: { - title: "myStore", - icon: "homepage", - affix: true, - name: "myStore.title", - }, - }, - ], - }, - { - path: "/", - component: Layout, - redirect: "/myAPI", - children: [ - { - path: "myAPI", - component: () => import("@/views/myAPI/index.vue"), - name: "myAPI", - meta: { - title: "myAPI", - icon: "homepage", - affix: true, - name: "API.title", - }, - }, - ], - }, + { path: "/", component: Layout, - redirect: "/moveImg", + redirect: "/model", children: [ { - path: "moveImg", - component: () => import("@/views/moveImg/index.vue"), - name: "moveImg", + path: "model", + component: () => import("@/views/mangage/model.vue"), + name: "model", meta: { - title: "moveImg", + title: "model", icon: "homepage", affix: true, - name: "moveImg.title", + name: "modelMangage.title", }, }, ], @@ -112,17 +40,17 @@ export const constantRoutes: RouteRecordRaw[] = [ { path: "/", component: Layout, - redirect: "/model", + redirect: "/keyCheck", children: [ { - path: "model", - component: () => import("@/views/mangage/model.vue"), - name: "model", + path: "keyCheck", + component: () => import("@/views/mangage/keyCheck.vue"), + name: "keyCheck", meta: { - title: "model", + title: "keyCheck", icon: "homepage", affix: true, - name: "modelMangage.title", + name: "keyMangage.title", }, }, ], diff --git a/src/types/auto-imports.d.ts b/src/types/auto-imports.d.ts index e5c7bdb..9ea2d5d 100644 --- a/src/types/auto-imports.d.ts +++ b/src/types/auto-imports.d.ts @@ -2,7 +2,6 @@ export {} declare global { const EffectScope: typeof import('vue')['EffectScope'] - const ElForm: typeof import('element-plus/es')['ElForm'] const ElMessage: typeof import('element-plus/es')['ElMessage'] const ElMessageBox: typeof import('element-plus/es')['ElMessageBox'] const asyncComputed: typeof import('@vueuse/core')['asyncComputed'] @@ -271,7 +270,6 @@ import { UnwrapRef } from 'vue' declare module 'vue' { interface ComponentCustomProperties { readonly EffectScope: UnwrapRef - readonly ElForm: UnwrapRef readonly ElMessage: UnwrapRef readonly ElMessageBox: UnwrapRef readonly asyncComputed: UnwrapRef diff --git a/src/utils/request copy.js b/src/utils/request copy.js deleted file mode 100644 index 9a13562..0000000 --- a/src/utils/request copy.js +++ /dev/null @@ -1,67 +0,0 @@ -import axios from 'axios' -import router from '@/router/index' -import { ElMessage } from 'element-plus' -// ElMessage -import { userInfoModules } from "@/store/modules/userInfo"; -// import stores from '@/store/index' -import { store } from '@/store/index'; // 因为不是在setup环境而是js中,必须重新初始化加载store -const userInfoPinia = userInfoModules(store); //pinia -// 开发环境需以 "/api" 拼接,其他环境需以 "/C" 拼接 -const env = process.env.NODE_ENV == 'development' ? "/api" : "/C" -// console.log(process.env.NODE_ENV, 'env') - - -/** -* @description:发送Axios请求 -*/ -const request = axios.create({ - baseURL: env, - timeout: 15000 -}) - -// 请求拦截器 -request.interceptors.request.use( - function (config) { - // 给所有授权的请求提供token - const AccessToken = localStorage.getItem("AccessToken") - if (AccessToken) { - config.headers.token = AccessToken - } - return config - }, - function (error) { - // 操作 - return Promise.reject(error) - } -) - -// 响应拦截器 -request.interceptors.response.use( - function (response) { - let code = response.data.code - // 当token无效(过期或损坏)时 1053为未登录 - if (code == 1052 || code == 1053) { - localStorage.removeItem("AccessToken"); - router.push("/login"); - ElMessage.error("登录过期,请重新登录!"); - return - // 弹出错误 - } else if (code != 200) { - if (code == 500) { - ElMessage.error("系统异常,请稍后再试"); - - // 其他错误 - } else { - return Promise.reject(response.data) - } - } else { - // 正常返回 - return response.data - } - - }, - function (error) { - } -) - -export default request \ No newline at end of file diff --git a/src/views/mangage/keyCheck.vue b/src/views/mangage/keyCheck.vue new file mode 100644 index 0000000..5210b1b --- /dev/null +++ b/src/views/mangage/keyCheck.vue @@ -0,0 +1,171 @@ + + + + + +