Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
wangxiaolu-sfa-ui
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
sfa
wangxiaolu-sfa-ui
Commits
7cf45775
提交
7cf45775
authored
7月 30, 2025
作者:
lidongxu
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'refresh' into release
上级
9538d213
39c386da
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
33 行增加
和
15 行删除
+33
-15
login.js
src/api/common/login.js
+8
-0
element-ui.scss
src/assets/styles/element-ui.scss
+5
-0
Navbar.vue
src/layout/components/Navbar.vue
+8
-8
version.js
src/store/modules/version.js
+6
-6
request.js
src/utils/request.js
+6
-1
没有找到文件。
src/api/common/login.js
浏览文件 @
7cf45775
...
...
@@ -71,3 +71,11 @@ export function logout() {
})
}
// 刷新 token 有效期
export
function
refreshToken
()
{
return
request
({
url
:
'/auth/refresh'
,
method
:
'post'
})
}
src/assets/styles/element-ui.scss
浏览文件 @
7cf45775
...
...
@@ -46,6 +46,11 @@
}
}
// 重写 el-table 的 loading-mask 加载进度蒙层
.el-loading-mask
{
z-index
:
1
!
important
;
}
// to fixed https://github.com/ElemeFE/element/issues/2461
// 重写 dialog 样式,默认居中显示
.el-overlay-dialog
{
...
...
src/layout/components/Navbar.vue
浏览文件 @
7cf45775
...
...
@@ -14,7 +14,7 @@
<div
class=
"right-menu"
>
<template
v-if=
"appStore.device !== 'mobile'"
>
<!-- 新版本 -->
<
!--
<
div
class=
"right-menu-item hover-effect new-version"
<div
class=
"right-menu-item hover-effect new-version"
@
click=
"showVersionFn"
>
<svg-icon
icon-class=
"new-version"
/>
</div>
...
...
@@ -22,7 +22,7 @@
<version-notice
v-model=
"showVersionNoticeVisible"
:nowVersion=
"nowVersion"
:versionList=
"showVersionList"
@
confirm=
"saveNowVersion"
/>
-->
@
confirm=
"saveNowVersion"
/>
<header-search
id=
"header-search"
class=
"right-menu-item"
/>
...
...
@@ -107,12 +107,12 @@ const nowVersion = ref('') // 当前最新版本
// 判断是否有新版本出现
onMounted
(()
=>
{
//
const oldVersion = proxy.$cache.local.get('version')
//
const versionObj = versionStore.version[0]
//
nowVersion.value = versionObj.version
//
if (oldVersion !== nowVersion.value) {
//
handleVersionList()
//
}
const
oldVersion
=
proxy
.
$cache
.
local
.
get
(
'version'
)
const
versionObj
=
versionStore
.
version
[
0
]
nowVersion
.
value
=
versionObj
.
version
if
(
oldVersion
!==
nowVersion
.
value
)
{
handleVersionList
()
}
})
// 展示版本通知弹框
const
showVersionFn
=
()
=>
{
...
...
src/store/modules/version.js
浏览文件 @
7cf45775
...
...
@@ -10,12 +10,12 @@ export default defineStore(
// 获取版本信息
getVersion
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
//
getVersionAPI().then(res => {
//
this.version = res.data
//
resolve(res)
//
}).catch(error => {
//
reject(error)
//
})
getVersionAPI
().
then
(
res
=>
{
this
.
version
=
res
.
data
resolve
(
res
)
}).
catch
(
error
=>
{
reject
(
error
)
})
resolve
()
})
}
...
...
src/utils/request.js
浏览文件 @
7cf45775
...
...
@@ -6,7 +6,7 @@ import { tansParams, blobValidate } from '@/utils/ruoyi'
import
cache
from
'@/plugins/cache'
import
{
saveAs
}
from
'file-saver'
import
useUserStore
from
'@/store/modules/user'
import
{
fsClientAuth
}
from
'@/api'
import
{
fsClientAuth
,
refreshToken
}
from
'@/api'
let
downloadLoadingInstance
;
// 是否显示重新登录
...
...
@@ -81,6 +81,7 @@ service.interceptors.request.use(config => {
// 响应拦截器
service
.
interceptors
.
response
.
use
(
async
res
=>
{
// 未设置状态码则默认成功状态
const
code
=
res
.
data
.
code
||
200
;
// 获取错误信息
...
...
@@ -100,6 +101,10 @@ service.interceptors.response.use(async res => {
// 重新发送本次失败的请求
return
service
(
res
.
config
)
}
// PC/移动端刷新 token 有效期
// await refreshToken()
// return service(res.config)
if
(
!
isRelogin
.
show
)
{
isRelogin
.
show
=
true
;
ElMessageBox
.
confirm
(
'登录状态已过期,您可以继续留在该页面,或者重新登录'
,
'系统提示'
,
{
confirmButtonText
:
'重新登录'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论