Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
corporate-culture-qd
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王立鹏
corporate-culture-qd
Commits
f3e2e4e9
Commit
f3e2e4e9
authored
Mar 20, 2026
by
lijiabin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into feature/21096-YAYA文化岛自动获取亚币及碎片功能(包含碎片兑换)
parents
3a384238
cf442883
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
45 additions
and
22 deletions
+45
-22
onlineTime.ts
src/stores/onlineTime.ts
+2
-2
error.ts
src/utils/request/error.ts
+32
-16
index.vue
src/views/homePage/askTab/index.vue
+8
-2
index.vue
src/views/publishVideo/index.vue
+2
-0
selfDraft.vue
src/views/userPage/components/selfDraft.vue
+1
-2
No files found.
src/stores/onlineTime.ts
View file @
f3e2e4e9
import
{
defineStore
}
from
'pinia'
import
{
use
Local
Storage
}
from
'@vueuse/core'
import
{
useStorage
}
from
'@vueuse/core'
export
const
useOnlineTimeStore
=
defineStore
(
'onlineTime'
,
()
=>
{
const
showOnlineTime
=
use
Local
Storage
(
'show-online-time'
,
true
)
const
showOnlineTime
=
useStorage
(
'show-online-time'
,
true
)
return
{
showOnlineTime
,
}
...
...
src/utils/request/error.ts
View file @
f3e2e4e9
...
...
@@ -13,7 +13,7 @@ import type { AxiosError, AxiosRequestConfig, AxiosResponse } from 'axios'
import
service
from
'./index'
import
{
useUserStore
}
from
'@/stores/user'
import
{
push
,
type
PushClearMethods
}
from
'notivue'
import
{
generateLoginKey
}
from
'@/api'
/**
* 后端逻辑code报错处理
* @param backendServiceResult 后端传来错误信息
...
...
@@ -127,25 +127,41 @@ async function handleUnAuthorized(axiosError: AxiosError) {
// 捕捉这一个错误
await
promiseFlashing
return
service
.
request
(
axiosError
.
config
as
AxiosRequestConfig
)
}
catch
(
e
)
{
// 获取refreshToken接口报错
}
catch
(
e
:
any
)
{
console
.
log
(
e
)
create401ErrorMsg
()
userStore
.
clearAllUserInfo
()
return
Promise
.
reject
(
e
)
// 获取refreshToken接口报错
// 直接重新登陆
// 获取登陆的key
const
{
data
}
=
await
generateLoginKey
({
timestamp
:
Date
.
now
(),
type
:
1
,
userId
:
userStore
.
userInfo
?.
userId
||
''
,
})
// 清理sessionStorage
localStorage
.
clear
()
await
userStore
.
getUserInfoByCode
({
code
:
data
,
isCodeLogin
:
1
,
})
window
.
location
.
reload
()
// console.log(e)
// create401ErrorMsg()
// userStore.clearAllUserInfo()
// return Promise.reject(e)
}
finally
{
promiseFlashing
=
null
}
}
let
msgIns
:
PushClearMethods
|
null
=
null
//
let msgIns: PushClearMethods | null = null
function
create401ErrorMsg
()
{
if
(
!
msgIns
)
{
msgIns
=
push
.
error
({
message
:
'重新获取token失败,请关闭标签页,重新打开'
,
duration
:
0
,
})
}
return
msgIns
}
//
function create401ErrorMsg() {
//
if (!msgIns) {
//
msgIns = push.error({
//
message: '重新获取token失败,请关闭标签页,重新打开',
//
duration: 0,
//
})
//
}
//
return msgIns
//
}
src/views/homePage/askTab/index.vue
View file @
f3e2e4e9
...
...
@@ -50,8 +50,14 @@
class=
"text-gray-600 text-sm sm:text-base leading-relaxed transition-all duration-300"
:class=
"
{ 'line-clamp-3': !item.isExpand }"
>
<template
v-if=
"item.cultureCommentListVo?.replyName"
>
{{
item
.
cultureCommentListVo
?.
replyName
}}
:
<template
v-if=
"
item.cultureCommentListVo?.replyName || item.cultureCommentListVo?.hiddenName
"
>
{{
item
.
cultureCommentListVo
?.
replyName
||
item
.
cultureCommentListVo
?.
hiddenName
}}
:
<span
v-html=
"parseEmoji(item.cultureCommentListVo?.content)"
></span>
</
template
>
<
template
v-else
>
...
...
src/views/publishVideo/index.vue
View file @
f3e2e4e9
...
...
@@ -260,6 +260,7 @@
@
click=
"handleSubmit(ReleaseStatusTypeEnum.DRAFT)"
size=
"large"
class=
"w-full !border-gray-200 hover:!border-indigo-300 hover:!text-indigo-600 transition-colors duration-200"
:loading=
"loading"
>
<el-icon
class=
"mr-2"
>
<IEpDocument
/>
...
...
@@ -269,6 +270,7 @@
<el-button
type=
"primary"
size=
"large"
:loading=
"loading"
class=
"w-full !bg-gradient-to-r !from-indigo-500 !to-purple-600 !border-none shadow-lg hover:shadow-xl transition-shadow duration-300"
@
click=
"handleSubmit(ReleaseStatusTypeEnum.PUBLISH)"
>
...
...
src/views/userPage/components/selfDraft.vue
View file @
f3e2e4e9
...
...
@@ -120,8 +120,7 @@ const { list, loading, searchParams, total, refresh, goToPage, changePageSize }
const
handleEdit
=
(
item
:
any
)
=>
{
if
(
item
.
type
===
ArticleTypeEnum
.
VIDEO
)
{
// router.push(`/publishVideo/${item.id}`)
push
.
warning
(
'视频编辑功能暂未开放'
)
router
.
push
(
`/publishVideo?id=
${
item
.
id
}
`
)
}
else
{
router
.
push
(
`/publishLongArticle/
${
item
.
type
}
?id=
${
item
.
id
}
`
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment