Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cust-app
Project
Project
Details
Activity
Releases
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
李伟
cust-app
Commits
fe9f2328
Commit
fe9f2328
authored
Jan 09, 2025
by
liwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
对接了点赞接口
parent
d6ba1ab0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletion
+13
-1
index.js
api/article/index.js
+9
-0
Item.vue
pages/components/article/Item.vue
+4
-1
No files found.
api/article/index.js
View file @
fe9f2328
...
...
@@ -19,6 +19,15 @@ export function publishArticle(data) {
})
}
// 点赞
export
function
praise
(
id
)
{
return
request
({
url
:
'/opmarticle/likeAdd/'
+
id
,
data
:
id
,
method
:
'POST'
,
})
}
// oss查询图片路径
export
function
getOssUrl
(
id
)
{
return
request
({
...
...
pages/components/article/Item.vue
View file @
fe9f2328
...
...
@@ -105,6 +105,7 @@
<
script
>
import
imageAdaptation
from
'@/components/images-adaptation/imageAdaptation.vue'
import
xzjReadMore
from
"@/components/xzj-readMore/xzj-readMore.vue"
import
{
praise
}
from
"../../../api/article"
;
export
default
{
name
:
'ArticleItem'
,
options
:
{
...
...
@@ -178,8 +179,10 @@
})
},
// 点赞
praise
(
value
)
{
praise
(
item
)
{
praise
(
item
.
businessId
).
then
(
res
=>
{
})
},
// 删除
selectClick
(
item
)
{
...
...
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