From 880c43a9ea5d785b7ef263f422613f1cd8c09ba5 Mon Sep 17 00:00:00 2001 From: liukang <644012909@qq.com> Date: Tue, 11 Feb 2025 15:50:34 +0800 Subject: [PATCH] =?UTF-8?q?=E9=83=A8=E7=BD=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 1 + .env.production | 3 +- .env.staging | 3 +- src/api/system/apply.js | 9 +- src/layout/components/Navbar.vue | 2 +- src/main.js | 9 +- src/utils/request.js | 2 +- src/views/index.vue | 2030 +++++++++++++++--------------- src/views/system/apply/index.vue | 42 +- vue.config.js | 68 +- 10 files changed, 1106 insertions(+), 1063 deletions(-) diff --git a/.env.development b/.env.development index 302ecd1..d83132c 100644 --- a/.env.development +++ b/.env.development @@ -9,3 +9,4 @@ VUE_APP_BASE_API = '/dev-api' # 路由懒加载 VUE_CLI_BABEL_TRANSPILE_MODULES = true +VITE_BASE_PATH = '' diff --git a/.env.production b/.env.production index b4893b0..5636990 100644 --- a/.env.production +++ b/.env.production @@ -5,4 +5,5 @@ VUE_APP_TITLE = 若依管理系统 ENV = 'production' # 若依管理系统/生产环境 -VUE_APP_BASE_API = '/prod-api' +VUE_APP_BASE_API = '/weverse-prod-api' +VITE_BASE_PATH = '/weverse/' diff --git a/.env.staging b/.env.staging index 209b64e..a320f1b 100644 --- a/.env.staging +++ b/.env.staging @@ -9,4 +9,5 @@ NODE_ENV = production ENV = 'staging' # 若依管理系统/测试环境 -VUE_APP_BASE_API = '/stage-api' +VUE_APP_BASE_API = '/weverse-stage-api' +VITE_BASE_PATH = '/weverse/' diff --git a/src/api/system/apply.js b/src/api/system/apply.js index 7ffd2fa..455afd7 100644 --- a/src/api/system/apply.js +++ b/src/api/system/apply.js @@ -35,10 +35,11 @@ export function updateApply(data) { }) } -// 删除申请 -export function delApply(id) { +export function toConfirm(id) { return request({ - url: '/system/apply/' + id, - method: 'delete' + url: '/system/apply/confirm/' + id, + method: 'post' }) } + + diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index 466cd98..b96c8dd 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -102,7 +102,7 @@ export default { type: 'warning' }).then(() => { this.$store.dispatch('LogOut').then(() => { - location.href = '/index'; + location.href = process.env.VITE_BASE_PATH; }) }).catch(() => {}); } diff --git a/src/main.js b/src/main.js index 13c6cf2..5e7cc55 100644 --- a/src/main.js +++ b/src/main.js @@ -12,13 +12,13 @@ import store from './store' import router from './router' import directive from './directive' // directive import plugins from './plugins' // plugins -import { download } from '@/utils/request' +import {download} from '@/utils/request' import './assets/icons' // icon import './permission' // permission control -import { getDicts } from "@/api/system/dict/data"; -import { getConfigKey } from "@/api/system/config"; -import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree } from "@/utils/ruoyi"; +import {getDicts} from "@/api/system/dict/data"; +import {getConfigKey} from "@/api/system/config"; +import {parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree} from "@/utils/ruoyi"; // 分页组件 import Pagination from "@/components/Pagination"; // 自定义表格工具组件 @@ -79,6 +79,7 @@ Vue.use(Element, { Vue.config.productionTip = false new Vue({ + base: process.env.VUE_APP_SUB_PATH, el: '#app', router, store, diff --git a/src/utils/request.js b/src/utils/request.js index ffb0d21..f43c00d 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -87,7 +87,7 @@ service.interceptors.response.use(res => { MessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', { confirmButtonText: '重新登录', cancelButtonText: '取消', type: 'warning' }).then(() => { isRelogin.show = false; store.dispatch('LogOut').then(() => { - location.href = '/index'; + location.href = process.env.VITE_BASE_PATH; }) }).catch(() => { isRelogin.show = false; diff --git a/src/views/index.vue b/src/views/index.vue index 92a6482..1d3fd43 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -1,1027 +1,1027 @@ diff --git a/src/views/system/apply/index.vue b/src/views/system/apply/index.vue index 3d148f6..41bef6b 100644 --- a/src/views/system/apply/index.vue +++ b/src/views/system/apply/index.vue @@ -1,6 +1,17 @@ @@ -138,13 +157,16 @@