diff --git a/.env b/.env index a4d9e8a..1afc474 100644 --- a/.env +++ b/.env @@ -2,8 +2,8 @@ VITE_APP_TITLE=金融产品设计及数字化营销沙盘 VITE_PORT=9520 VITE_PROXY=http://192.168.31.125:8080 VITE_PUBLIC_PATH=./ -VITE_BASE_API=http://192.168.31.51:9000 +# VITE_BASE_API=http://192.168.31.217:9000 # VITE_BASE_API=http://121.37.12.51 -# VITE_BASE_API=https://www.occupationlab.com +VITE_BASE_API=https://www.occupationlab.com VITE_I18N_LOCALE=zh-cn VITE_I18N_FALLBACK_LOCALE=zh-cn diff --git a/src/components/Panel/index.vue b/src/components/Panel/index.vue index f93168b..732e508 100644 --- a/src/components/Panel/index.vue +++ b/src/components/Panel/index.vue @@ -222,12 +222,12 @@ class="z-[199] fixed top-[64px] right-0 bottom-0 left-0 bg-[rgba(0,0,0,.3)]"> diff --git a/src/components/Upload/FileListUpload.vue b/src/components/Upload/FileListUpload.vue deleted file mode 100644 index 7d2a180..0000000 --- a/src/components/Upload/FileListUpload.vue +++ /dev/null @@ -1,136 +0,0 @@ - - - - - diff --git a/src/components/Upload/ImageCropper.vue b/src/components/Upload/ImageCropper.vue deleted file mode 100644 index 1b77c2a..0000000 --- a/src/components/Upload/ImageCropper.vue +++ /dev/null @@ -1,84 +0,0 @@ - - - - - diff --git a/src/components/Upload/ImageListUpload.vue b/src/components/Upload/ImageListUpload.vue deleted file mode 100644 index 05e3167..0000000 --- a/src/components/Upload/ImageListUpload.vue +++ /dev/null @@ -1,157 +0,0 @@ - - - - - diff --git a/src/components/Upload/ImageUpload.vue b/src/components/Upload/ImageUpload.vue deleted file mode 100644 index 97921f6..0000000 --- a/src/components/Upload/ImageUpload.vue +++ /dev/null @@ -1,149 +0,0 @@ - - - - - diff --git a/src/components/Upload/index.ts b/src/components/Upload/index.ts deleted file mode 100644 index e04948a..0000000 --- a/src/components/Upload/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export { default as ImageUpload } from './ImageUpload.vue'; -export { default as ImageListUpload } from './ImageListUpload.vue'; -export { default as FileListUpload } from './FileListUpload.vue'; -export { default as BaseUpload } from './BaseUpload.vue'; diff --git a/src/layout/components/AppSidebar/index.vue b/src/layout/components/AppSidebar/index.vue index 869ba0e..71b914c 100644 --- a/src/layout/components/AppSidebar/index.vue +++ b/src/layout/components/AppSidebar/index.vue @@ -47,7 +47,6 @@ import { useRouter, useRoute } from 'vue-router'; import Menus from './Menu.vue'; import Settings from '@/settings'; import { getOperationTime, saveOperationTime } from '@/api/config'; -import { appState } from '@/store/useAppState'; import Cookies from 'js-cookie'; import dayjs from 'dayjs'; import { getNow } from '@/utils/common'; diff --git a/src/main.ts b/src/main.ts index 84965e8..f3da37a 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,5 +1,6 @@ import { createApp } from 'vue'; import ElementPlus from 'element-plus'; +// import Panel from '@/components/Panel/index.vue'; import App from './App.vue'; import router from './router'; import i18n from './i18n'; @@ -14,4 +15,5 @@ const app = createApp(App) // tinymce 对话框的层级太低,必须调低 ElementPlus 的 对话框层级(默认为2000) .use(ElementPlus, { zIndex: 500 }) .use(i18n); +// app.component('Panel', Panel); app.mount('#app'); diff --git a/src/utils/getPageTitle.ts b/src/utils/getPageTitle.ts index 97c7fd6..cb5dc43 100644 --- a/src/utils/getPageTitle.ts +++ b/src/utils/getPageTitle.ts @@ -1,14 +1,10 @@ import defaultSettings from '@/settings'; -import i18n from '@/i18n'; const { title } = defaultSettings; export default function getPageTitle(pageTitle: string | undefined): string { if (pageTitle) { - const { - global: { t }, - } = i18n; - return `${t(pageTitle)} - ${title}`; + return `${pageTitle} - ${title}`; } return `${title}`; } diff --git a/src/utils/request.ts b/src/utils/request.ts index e2bac04..80f50cf 100644 --- a/src/utils/request.ts +++ b/src/utils/request.ts @@ -1,8 +1,6 @@ -import { h } from 'vue'; import axios from 'axios'; import { ElMessageBox, ElMessage } from 'element-plus'; import { getAuthHeaders } from '@/utils/auth'; -import i18n from '@/i18n'; import { logout } from '@/store/useCurrentUser'; const service = axios.create({ @@ -33,23 +31,15 @@ service.interceptors.response.use( (e) => { const { response: { - data: { timestamp, message, path, error, exception, trace }, + data: { message, error }, status, }, } = e; - const { - global: { t }, - } = i18n; if (status === 401) { - ElMessageBox.confirm(t('confirmLogin'), { confirmButtonText: t('loginAgain'), type: 'warning' }).then(() => { + ElMessageBox.alert('登录状态已过期,请重新登录', { confirmButtonText: '重新登录', type: 'warning', closeOnClickModal: false, showClose: false }).then(() => { // 未登录 logout(); }); - } else if (status === 403) { - ElMessageBox({ - title: status, - message: h('div', null, [h('p', { class: 'text-lg' }, t('error.forbidden')), h('p', { class: 'mt-2' }, message)]), - }); } else if (message) { ElMessage.error(message); } diff --git a/src/views/403.vue b/src/views/403.vue index b89f821..47cc524 100644 --- a/src/views/403.vue +++ b/src/views/403.vue @@ -2,9 +2,11 @@

403

-

{{ message }}

+

对不起,您没有该页面的访问权限

- {{ $t('logout') }} + 退出

@@ -13,20 +15,17 @@ diff --git a/src/views/bankProduct/index.vue b/src/views/bankProduct/index.vue index d8b7eea..be7e51b 100644 --- a/src/views/bankProduct/index.vue +++ b/src/views/bankProduct/index.vue @@ -60,13 +60,11 @@ import { computed, onMounted, ref } from 'vue'; import { ElMessage } from 'element-plus'; import { Search } from '@element-plus/icons-vue'; -import { useI18n } from 'vue-i18n'; import dayjs from 'dayjs'; import { perm } from '@/store/useCurrentUser'; import { pageSizes, pageLayout, toParams, resetParams } from '@/utils/common'; import { deleteUser, queryUserPage } from '@/api/user'; -const { t } = useI18n(); const params = ref({}); const sort = ref(); const currentPage = ref(1); @@ -129,7 +127,6 @@ const handleEdit = (id: number) => { const handleDelete = async (ids: number[]) => { await deleteUser(ids); fetchData(); - ElMessage.success(t('success')); }; const deletable = (bean: any) => bean.id > 1; diff --git a/src/views/report/Index.vue b/src/views/report/Index.vue index 26266fa..bc76b0c 100644 --- a/src/views/report/Index.vue +++ b/src/views/report/Index.vue @@ -205,12 +205,10 @@ -