Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
N
nse-ui
概览
Overview
Details
Activity
Cycle Analytics
版本库
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
Members
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
吴超
nse-ui
Commits
5889b974
Commit
5889b974
authored
Aug 20, 2025
by
ningjihai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
退出登录
parent
ac49d0ec
隐藏空白字符变更
内嵌
并排
正在显示
12 个修改的文件
包含
35 行增加
和
18 行删除
+35
-18
.env.development
+2
-0
.env.production
+4
-2
src/components/Editor/index.vue
+2
-2
src/components/FileUpload/index.vue
+1
-1
src/components/ImageUpload/index.vue
+1
-1
src/layout/components/Navbar.vue
+11
-1
src/plugins/download.js
+3
-3
src/router/index.js
+1
-1
src/store/modules/app.js
+5
-2
src/utils/auth.js
+3
-3
src/utils/request.js
+1
-1
src/views/system/user/index.vue
+1
-1
没有找到文件。
.env.development
View file @
5889b974
...
...
@@ -6,3 +6,4 @@ VITE_APP_ENV = 'development'
# 若依管理系统/开发环境
VITE_APP_BASE_API = '/dev-api'
VITE_APP_BASE_URL = '/'
\ No newline at end of file
.env.production
View file @
5889b974
...
...
@@ -8,4 +8,6 @@ VITE_APP_ENV = 'production'
VITE_APP_BASE_API = '/prod-api'
# 是否在打包时开启压缩,支持 gzip 和 brotli
VITE_BUILD_COMPRESS = gzip
\ No newline at end of file
VITE_BUILD_COMPRESS = gzip
VITE_APP_BASE_URL = '/'
\ No newline at end of file
src/components/Editor/index.vue
View file @
5889b974
...
...
@@ -37,7 +37,7 @@ const { proxy } = getCurrentInstance()
const
quillEditorRef
=
ref
()
const
uploadUrl
=
ref
(
import
.
meta
.
env
.
VITE_APP_BASE_API
+
"/common/upload"
)
// 上传的图片服务器地址
const
headers
=
ref
({
Authorization
:
"Bearer "
+
getToken
()
Token
:
getToken
()
})
const
props
=
defineProps
({
...
...
@@ -189,7 +189,7 @@ function handlePasteCapture(e) {
function
insertImage
(
file
)
{
const
formData
=
new
FormData
()
formData
.
append
(
"file"
,
file
)
axios
.
post
(
uploadUrl
.
value
,
formData
,
{
headers
:
{
"Content-Type"
:
"multipart/form-data"
,
Authorization
:
headers
.
value
.
Authorizatio
n
}
}).
then
(
res
=>
{
axios
.
post
(
uploadUrl
.
value
,
formData
,
{
headers
:
{
"Content-Type"
:
"multipart/form-data"
,
Token
:
headers
.
value
.
Toke
n
}
}).
then
(
res
=>
{
handleUploadSuccess
(
res
.
data
)
})
}
...
...
src/components/FileUpload/index.vue
View file @
5889b974
...
...
@@ -93,7 +93,7 @@ const number = ref(0)
const
uploadList
=
ref
([])
const
baseUrl
=
import
.
meta
.
env
.
VITE_APP_BASE_API
const
uploadFileUrl
=
ref
(
import
.
meta
.
env
.
VITE_APP_BASE_API
+
props
.
action
)
// 上传文件服务器地址
const
headers
=
ref
({
Authorization
:
"Bearer "
+
getToken
()
})
const
headers
=
ref
({
Token
:
getToken
()
})
const
fileList
=
ref
([])
const
showTip
=
computed
(
()
=>
props
.
isShowTip
&&
(
props
.
fileType
||
props
.
fileSize
)
...
...
src/components/ImageUpload/index.vue
View file @
5889b974
...
...
@@ -103,7 +103,7 @@ const dialogImageUrl = ref("")
const
dialogVisible
=
ref
(
false
)
const
baseUrl
=
import
.
meta
.
env
.
VITE_APP_BASE_API
const
uploadImgUrl
=
ref
(
import
.
meta
.
env
.
VITE_APP_BASE_API
+
props
.
action
)
// 上传的图片服务器地址
const
headers
=
ref
({
Authorization
:
"Bearer "
+
getToken
()
})
const
headers
=
ref
({
Token
:
getToken
()
})
const
fileList
=
ref
([])
const
showTip
=
computed
(
()
=>
props
.
isShowTip
&&
(
props
.
fileType
||
props
.
fileSize
)
...
...
src/layout/components/Navbar.vue
View file @
5889b974
...
...
@@ -95,7 +95,17 @@ function logout() {
type
:
'warning'
}).
then
(()
=>
{
userStore
.
logOut
().
then
(()
=>
{
location
.
href
=
'/index'
// location.href = '/index'
appStore
.
signOut
(
'logout'
)
appStore
.
setNavStatus
({
type
:
'manage'
})
appStore
.
setQueryData
({
projectId
:
''
})
window
.
location
.
replace
(
`
${
import
.
meta
.
env
.
BASE_URL
}
`
)
})
}).
catch
(()
=>
{
})
}
...
...
src/plugins/download.js
View file @
5889b974
...
...
@@ -15,7 +15,7 @@ export default {
method
:
'get'
,
url
:
url
,
responseType
:
'blob'
,
headers
:
{
'
Authorization'
:
'Bearer '
+
getToken
()
}
headers
:
{
'
Token'
:
getToken
()
}
}).
then
((
res
)
=>
{
const
isBlob
=
blobValidate
(
res
.
data
)
if
(
isBlob
)
{
...
...
@@ -32,7 +32,7 @@ export default {
method
:
'get'
,
url
:
url
,
responseType
:
'blob'
,
headers
:
{
'
Authorization'
:
'Bearer '
+
getToken
()
}
headers
:
{
'
Token'
:
getToken
()
}
}).
then
((
res
)
=>
{
const
isBlob
=
blobValidate
(
res
.
data
)
if
(
isBlob
)
{
...
...
@@ -50,7 +50,7 @@ export default {
method
:
'get'
,
url
:
url
,
responseType
:
'blob'
,
headers
:
{
'
Authorization'
:
'Bearer '
+
getToken
()
}
headers
:
{
'
Token'
:
getToken
()
}
}).
then
((
res
)
=>
{
const
isBlob
=
blobValidate
(
res
.
data
)
if
(
isBlob
)
{
...
...
src/router/index.js
View file @
5889b974
...
...
@@ -63,7 +63,7 @@ export const constantRoutes = [
hidden
:
true
},
{
// 项目
管理
// 项目
首页
path
:
'/projectManage'
,
component
:
()
=>
import
(
'@/views/projectManage/index'
),
hidden
:
true
...
...
src/store/modules/app.js
View file @
5889b974
// import { defineStore } from 'pinia'
import
Cookies
from
'js-cookie'
import
{
useRouter
}
from
'vue-router'
const
router
=
useRouter
()
const
useAppStore
=
defineStore
(
'app'
,
{
state
:
()
=>
({
// 新版基础状态
...
...
@@ -364,8 +365,10 @@ import { useRouter } from 'vue-router'
sessionStorage
.
clear
()
this
.
system
=
{}
if
(
status
!==
'login'
)
{
const
router
=
useRouter
()
await
router
.
push
(
"/login"
)
await
router
.
push
({
path
:
'/login'
})
}
}
}
...
...
src/utils/auth.js
View file @
5889b974
import
Cookies
from
'js-cookie'
const
TokenKey
=
'
Admin-T
oken'
const
TokenKey
=
'
__t
oken'
export
function
getToken
()
{
return
Cookies
.
get
(
TokenKey
)
return
sessionStorage
.
getItem
(
TokenKey
)
||
Cookies
.
get
(
TokenKey
)
}
export
function
setToken
(
token
)
{
return
Cookies
.
set
(
TokenKey
,
token
)
return
Cookies
.
set
(
TokenKey
,
token
)
}
export
function
removeToken
()
{
...
...
src/utils/request.js
View file @
5889b974
...
...
@@ -27,7 +27,7 @@ service.interceptors.request.use(config => {
// 是否需要防止数据重复提交
const
isRepeatSubmit
=
(
config
.
headers
||
{}).
repeatSubmit
===
false
if
(
getToken
()
&&
!
isToken
)
{
config
.
headers
[
'
Authorization'
]
=
'Bearer '
+
getToken
()
// 让每个请求携带自定义token 请根据实际情况自行修改
config
.
headers
[
'
Token'
]
=
getToken
()
// 让每个请求携带自定义token 请根据实际情况自行修改
}
// get请求映射params参数
if
(
config
.
method
===
'get'
&&
config
.
params
)
{
...
...
src/views/system/user/index.vue
View file @
5889b974
...
...
@@ -252,7 +252,7 @@ const upload = reactive({
// 是否更新已经存在的用户数据
updateSupport
:
0
,
// 设置上传的请求头部
headers
:
{
Authorization
:
"Bearer "
+
getToken
()
},
headers
:
{
Token
:
getToken
()
},
// 上传的地址
url
:
import
.
meta
.
env
.
VITE_APP_BASE_API
+
"/system/user/importData"
})
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论