Commit 84a098a3 by lijiabin

【需求 17679】fix: 优化部署等

parent 9d944558
......@@ -7,11 +7,11 @@ import path from 'node:path'
const unzipDirMode = {
spawn: 'pnpm run build:test',
// 解压文件名
unzipDir: 'oa-test/',
unzipDir: 'culture/',
// 终端定位位置 cd
servicePath: '/usr/local/nginx/www/',
servicePath: '/usr/local/nginx/',
// 压缩包存放位置
serviceFilePath: '/usr/local/nginx/www/dist.tar.gz',
serviceFilePath: '/usr/local/nginx/dist.tar.gz',
}
const __dirname = path.resolve()
// 文件所在地
......
<template>
<h1>ccccccccccccccccccccccccccccccccccccccccccccccccccccc1</h1>
<h1>ccccccccccccccccccccccccccccccccccccccccccccccccccccc1</h1>
<h1>ccccccccccccccccccccccccccccccccccccccccccccccccccccc1</h1>
<h1>ccccccccccccccccccccccccccccccccccccccccccccccccccccc1</h1>
<h1>ccccccccccccccccccccccccccccccccccccccccccccccccccccc1</h1>
<h1>ccccccccccccccccccccccccccccccccccccccccccccccccccccc1</h1>
<h1>ccccccccccccccccccccccccccccccccccccccccccccccccccccc1</h1>
<el-config-provider :locale="locale">
<router-view v-slot="{ Component }">
<component :is="Component" />
......
......@@ -3,19 +3,19 @@ import type { Router } from 'vue-router'
import { saveScrollPosition } from './scrollStorage'
import { parseCode, parseIsCodeLogin, parseIsCutEmail } from '@/utils/wxUtil'
import { useUserStore } from '@/stores'
import { fa } from 'element-plus/es/locales.mjs'
// 白名单
const WHITE_LIST: string[] = []
const WHITE_LIST: string[] = ['/aa']
export function registerRouterGuard(router: Router) {
router.beforeEach(async (to, from, next) => {
router.beforeEach(async (to, from) => {
// 保存当前页面的滚动位置
if (from.fullPath) {
saveScrollPosition(from.fullPath, window.scrollY)
}
if (WHITE_LIST.includes(to.path)) {
next()
return
return true
}
const code = parseCode()
......@@ -27,10 +27,11 @@ export function registerRouterGuard(router: Router) {
const userStore = useUserStore()
if (code) {
console.log('code', code)
await userStore.getUserInfoByCode(code)
return next()
return true
} else {
return next()
return true
}
})
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment