From c75f12a2b159db35af8fd28584020a9c9c25b1c3 Mon Sep 17 00:00:00 2001 From: Bunny <1319900154@qq.com> Date: Sun, 29 Dec 2024 15:00:42 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=F0=9F=9A=80=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=9D=83=E9=99=90=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 4 +- build/data.js | 8 ++-- .../financial/account-bill/bill/index.vue | 30 +++++++++--- .../financial/account-bill/bill/utils/auth.ts | 12 +++++ .../financial/account-bill/category/index.vue | 26 +++++++--- .../account-bill/category/utils/auth.ts | 10 ++++ .../budget-saving/budget-category/index.vue | 34 ++++++++++--- .../budget-category/utils/auth.ts | 10 ++++ .../budget-saving/saving-goal/index.vue | 32 ++++++++++--- .../budget-saving/saving-goal/utils/auth.ts | 10 ++++ .../debt/debt-repayment-plan/index.vue | 48 +++++++++++++++---- .../debt/debt-repayment-plan/utils/auth.ts | 10 ++++ .../financial/debt/debt-tracking/index.vue | 32 ++++++++++--- .../debt/debt-tracking/utils/auth.ts | 10 ++++ src/views/i18n/i18n-setting/index.vue | 12 ++++- 15 files changed, 243 insertions(+), 45 deletions(-) create mode 100644 src/views/financial/account-bill/bill/utils/auth.ts create mode 100644 src/views/financial/account-bill/category/utils/auth.ts create mode 100644 src/views/financial/budget-saving/budget-category/utils/auth.ts create mode 100644 src/views/financial/budget-saving/saving-goal/utils/auth.ts create mode 100644 src/views/financial/debt/debt-repayment-plan/utils/auth.ts create mode 100644 src/views/financial/debt/debt-tracking/utils/auth.ts diff --git a/.env.development b/.env.development index c61e5b8..260865c 100644 --- a/.env.development +++ b/.env.development @@ -1,5 +1,5 @@ # 平台本地运行端口号 -VITE_PORT=1010 +VITE_PORT=1000 # 预发布环境路由历史模式(Hash模式传"hash"、HTML5模式传"h5"、Hash模式带base参数传"hash,base参数"、HTML5模式带base参数传"h5,base参数") VITE_ROUTER_HISTORY="hash" @@ -8,7 +8,7 @@ VITE_ROUTER_HISTORY="hash" VITE_BASE_API=/api # 跨域代理地址 -VITE_APP_URL=http://localhost:1000 +VITE_APP_URL=http://localhost:1010 # mock地址 VITE_MOCK_BASE_API=/mock diff --git a/build/data.js b/build/data.js index bc345a1..53b805d 100644 --- a/build/data.js +++ b/build/data.js @@ -1,9 +1,11 @@ +const baseRequestUrl = 'http://localhost:1010'; + /** * * 自动创建权限内容 */ (async function requestPath() { // 获取基础paths对象 - const response = await fetch('http://localhost:7070/v3/api-docs/%E9%BB%98%E8%AE%A4%E8%AF%B7%E6%B1%82%E6%8E%A5%E5%8F%A3', { method: 'GET' }); + const response = await fetch(`${baseRequestUrl}/v3/api-docs/%E5%90%8E%E5%8F%B0%E7%AE%A1%E7%90%86`, { method: 'GET' }); const json = await response.json(); const paths = json.paths; @@ -71,12 +73,12 @@ // 向服务器添加的内容 async function add(data) { - const response = await fetch('http://localhost:7070/admin/power/addPower', { + const response = await fetch(`${baseRequestUrl}/admin/power/addPower`, { method: 'POST', headers: { 'Content-Type': 'application/json', token: - 'eyJhbGciOiJIUzI1NiIsInppcCI6IkdaSVAifQ.H4sIAAAAAAAA_yWLywqFIBQA_-WsE9Sjt2xXuz7jmAYGWfiAIu6_X-HuhmHmhVwtjDDXGB_owN8XjKJH3iMayTuo2afFNffHSIdv-eSOEEMuicqZ2raX0Kx22g4ciRkUyBRpw6yxgq1S0SBXubnPBt8fEjhnWnMAAAA.YwSm-NO_6Kg1k1GRwucIt50Y70FbPHoldsdTPVHK_Y4', + 'eyJhbGciOiJIUzI1NiIsInppcCI6IkdaSVAifQ.H4sIAAAAAAAA_yWLSwrDIBQA7_LWCjE-f9k1ux7D1CdYiCl-ICXk7hW6G4aZC2rfYIG15_wFBnR-YBFGKus0WsOgVyrPMNwfs99p5I-wp5xqK74dZWzvloZVOEvnhea0ReI4aeQe0XCrhCP10jJOEe4fV-ghSXMAAAA.Vr41db3JGTYyZyz2H1YxNFvJjFkOZ0bq6RziYJ3uhBc', }, body: JSON.stringify(data), }); diff --git a/src/views/financial/account-bill/bill/index.vue b/src/views/financial/account-bill/bill/index.vue index 4e7f60f..c1af70b 100644 --- a/src/views/financial/account-bill/bill/index.vue +++ b/src/views/financial/account-bill/bill/index.vue @@ -18,6 +18,8 @@ import LoadingSvg from '@/assets/svg/loading.svg'; import { useAdminUserStore } from '@/store/system/adminUser'; import Upload from '@iconify-icons/ep/upload'; import { currentMouth, currentWeek, currentYear, shortcutsAllMouth } from '@/enums/dateEnums'; +import { hasAuth } from '@/router/utils'; +import { auth } from '@/views/financial/account-bill/bill/utils/auth'; const tableRef = ref(); const formRef = ref(); @@ -132,15 +134,23 @@ onMounted(() => { - {{ $t('search') }} - {{ $t('buttons.reset') }} + + {{ $t('search') }} + + + {{ $t('buttons.reset') }} +