Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
corporateCulture-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
王立鹏
corporateCulture-qd
Commits
067c7e80
Commit
067c7e80
authored
Nov 13, 2025
by
lijiabin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【需求 17679】 wip: 加入接口、常量等
parent
5a65d31b
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
80 additions
and
1 deletions
+80
-1
components.d.ts
components.d.ts
+4
-0
index.ts
src/api/article/index.ts
+14
-0
types.ts
src/api/article/types.ts
+1
-1
index.ts
src/api/user/index.ts
+55
-0
index.ts
src/constants/index.ts
+1
-0
symbolKey.ts
src/constants/symbolKey.ts
+5
-0
No files found.
components.d.ts
View file @
067c7e80
...
...
@@ -47,6 +47,8 @@ declare module 'vue' {
ElSwitch
:
typeof
import
(
'element-plus/es'
)[
'ElSwitch'
]
ElTable
:
typeof
import
(
'element-plus/es'
)[
'ElTable'
]
ElTableColumn
:
typeof
import
(
'element-plus/es'
)[
'ElTableColumn'
]
ElTabPane
:
typeof
import
(
'element-plus/es'
)[
'ElTabPane'
]
ElTabs
:
typeof
import
(
'element-plus/es'
)[
'ElTabs'
]
ElTag
:
typeof
import
(
'element-plus/es'
)[
'ElTag'
]
ElTooltip
:
typeof
import
(
'element-plus/es'
)[
'ElTooltip'
]
ElUpload
:
typeof
import
(
'element-plus/es'
)[
'ElUpload'
]
...
...
@@ -108,6 +110,8 @@ declare global {
const
ElSwitch
:
typeof
import
(
'element-plus/es'
)[
'ElSwitch'
]
const
ElTable
:
typeof
import
(
'element-plus/es'
)[
'ElTable'
]
const
ElTableColumn
:
typeof
import
(
'element-plus/es'
)[
'ElTableColumn'
]
const
ElTabPane
:
typeof
import
(
'element-plus/es'
)[
'ElTabPane'
]
const
ElTabs
:
typeof
import
(
'element-plus/es'
)[
'ElTabs'
]
const
ElTag
:
typeof
import
(
'element-plus/es'
)[
'ElTag'
]
const
ElTooltip
:
typeof
import
(
'element-plus/es'
)[
'ElTooltip'
]
const
ElUpload
:
typeof
import
(
'element-plus/es'
)[
'ElUpload'
]
...
...
src/api/article/index.ts
View file @
067c7e80
import
service
from
'@/utils/request/index'
import
type
{
AddOrUpdateArticleDto
,
ArticleItemDto
,
ArticleSearchParams
}
from
'./types'
import
type
{
BackendServicePageResult
}
from
'@/utils/request/types'
import
{
ArticleTypeEnum
}
from
'@/constants'
/**
* 发布文章
*/
...
...
@@ -32,3 +35,14 @@ export const getArticleDetail = (articleId: number | string) => {
method
:
'POST'
,
})
}
/**
* 收藏或者取消收藏
*/
export
const
addOrCancelCollect
=
(
data
:
{
articleId
:
number
|
string
;
type
:
ArticleTypeEnum
})
=>
{
return
service
.
request
<
boolean
>
({
url
:
`/api/cultureCollect/addOrCancelCollect`
,
method
:
'POST'
,
data
,
})
}
src/api/article/types.ts
View file @
067c7e80
...
...
@@ -65,7 +65,7 @@ export interface ArticleItemDto {
createTime
:
number
viewCount
:
number
isRecommend
:
BooleanFlag
type
:
string
type
:
ArticleTypeEnum
isRelateColleague
:
BooleanFlag
releaseStatus
:
ReleaseStatusEnum
tagNameList
:
string
[]
...
...
src/api/user/index.ts
View file @
067c7e80
import
service
from
'@/utils/request/index'
import
type
{
UpdateUserInfoDto
}
from
'./types'
import
type
{
BackendServicePageResult
,
BackendServiceResult
,
PageSearchParams
,
}
from
'@/utils/request/types'
/**
* 更新用户信息
*/
...
...
@@ -10,3 +16,52 @@ export const updateUserInfo = (data: UpdateUserInfoDto) => {
data
,
})
}
/**
* 是否有官方账号权限
*/
export
const
hasOfficialAccount
=
()
=>
{
return
service
.
request
<
[]
>
({
url
:
'/api/personalCenter/getIsOfficial'
,
method
:
'POST'
,
data
:
{},
})
}
/**
* 获取我的收藏列表
*/
export
const
getSelfCollectList
=
(
data
:
PageSearchParams
)
=>
{
return
service
.
request
<
BackendServicePageResult
<
{
id
:
number
title
:
string
content
:
string
createTime
:
string
updateTime
:
string
}
>
>
({
url
:
'/api/personalCenter/selfCollect'
,
method
:
'POST'
,
data
,
})
}
/**
* 获取我的点赞列表
*/
export
const
getSelfPraiseList
=
(
data
:
PageSearchParams
)
=>
{
return
service
.
request
<
BackendServicePageResult
<
{
id
:
number
title
:
string
content
:
string
createTime
:
string
updateTime
:
string
}
>
>
({
url
:
'/api/personalCenter/selfPraise'
,
method
:
'POST'
,
data
,
})
}
src/constants/index.ts
View file @
067c7e80
export
*
from
'./options'
export
*
from
'./enums'
export
*
from
'./symbolKey'
src/constants/symbolKey.ts
0 → 100644
View file @
067c7e80
import
type
{
InjectionKey
,
Ref
}
from
'vue'
export
const
TABS_REF_KEY
=
Symbol
()
as
InjectionKey
<
Ref
<
HTMLElement
|
null
>>
export
const
COMMENT_REF_KEY
=
Symbol
()
as
InjectionKey
<
Ref
<
HTMLElement
|
null
>>
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