🎈 perf: 路由优化,生产环境变量配置

This commit is contained in:
郭永超 2025-09-02 15:32:30 +08:00
parent ed2a6e29de
commit 9ccfba5645
9 changed files with 12 additions and 12 deletions

View File

@ -5,8 +5,8 @@ VITE_APP_TITLE = 政务云后台管理系统
VITE_APP_ENV = 'production' VITE_APP_ENV = 'production'
# 生产环境 # 生产环境
VITE_APP_BASE_API = 'http://47.109.205.240:8080' VITE_APP_BASE_API = 'https://app.yingyijt.com/apis'
VITE_APP_PLATFORM = 'http://47.109.205.240/platform' VITE_APP_PLATFORM = 'https://app.yingyijt.com/platform'
# 是否在打包时开启压缩,支持 gzip 和 brotli # 是否在打包时开启压缩,支持 gzip 和 brotli
VITE_BUILD_COMPRESS = gzip VITE_BUILD_COMPRESS = gzip

View File

@ -79,10 +79,10 @@ export const constantRoutes = [
path: '/sub-government-admin/user', path: '/sub-government-admin/user',
component: Layout, component: Layout,
hidden: true, hidden: true,
redirect: '/sub-government-admin/user/profile', redirect: 'noredirect',
children: [ children: [
{ {
path: 'profile/:activeTab?', path: '',
component: () => import('@/views/system/user/profile/index'), component: () => import('@/views/system/user/profile/index'),
name: 'Profile', name: 'Profile',
meta: { title: '个人中心', icon: 'user' } meta: { title: '个人中心', icon: 'user' }

View File

@ -34,7 +34,7 @@ const errGif = ref(errImage + "?" + +new Date())
function back() { function back() {
if (proxy.$route.query.noGoBack) { if (proxy.$route.query.noGoBack) {
proxy.$router.push({ path: "/" }) proxy.$router.push({ path: "/sub-government-admin" })
} else { } else {
proxy.$router.go(-1) proxy.$router.go(-1)
} }

View File

@ -150,7 +150,7 @@ function handleLogin() {
} }
return acc; return acc;
}, {}); }, {});
router.push({ path: redirect.value || "/", query: otherQueryParams }); router.push({ path: redirect.value || "/sub-government-admin", query: otherQueryParams });
}) })
.catch(() => { .catch(() => {
loading.value = false; loading.value = false;

View File

@ -438,7 +438,7 @@ function crontabFill(value) {
/** 任务日志列表查询 */ /** 任务日志列表查询 */
function handleJobLog(row) { function handleJobLog(row) {
const jobId = row.jobId || 0 const jobId = row.jobId || 0
router.push('/monitor/job-log/index/' + jobId) router.push('/sub-government-admin/monitor/job-log/index/' + jobId)
} }
/** 新增按钮操作 */ /** 新增按钮操作 */

View File

@ -64,7 +64,7 @@
<span v-else> 中...</span> <span v-else> 中...</span>
</el-button> </el-button>
<div style="float: right;"> <div style="float: right;">
<router-link class="link-type" :to="'/login'">使用已有账户登录</router-link> <router-link class="link-type" :to="'/sub-government-admin/login'">使用已有账户登录</router-link>
</div> </div>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -130,7 +130,7 @@ function handleRegister() {
dangerouslyUseHTMLString: true, dangerouslyUseHTMLString: true,
type: "success", type: "success",
}).then(() => { }).then(() => {
router.push("/login") router.push("/sub-government-admin/login")
}).catch(() => {}) }).catch(() => {})
}).catch(() => { }).catch(() => {
loading.value = false loading.value = false

View File

@ -373,7 +373,7 @@ function handleCommand(command, row) {
/** 分配用户 */ /** 分配用户 */
function handleAuthUser(row) { function handleAuthUser(row) {
router.push("/system/role-auth/user/" + row.roleId) router.push("/sub-government-admin/system/role-auth/user/" + row.roleId)
} }
/** 查询菜单树结构 */ /** 查询菜单树结构 */

View File

@ -399,7 +399,7 @@ function handleCommand(command, row) {
/** 跳转角色分配 */ /** 跳转角色分配 */
function handleAuthRole(row) { function handleAuthRole(row) {
const userId = row.userId const userId = row.userId
router.push("/system/user-auth/role/" + userId) router.push("/sub-government-admin/system/user-auth/role/" + userId)
} }
/** 重置密码按钮操作 */ /** 重置密码按钮操作 */

View File

@ -41,7 +41,7 @@ export default defineConfig(({ mode, command }) => {
}, },
// vite 相关配置 // vite 相关配置
server: { server: {
port: 80, port: 82,
host: '0.0.0.0', host: '0.0.0.0',
open: true, open: true,
headers: { headers: {