Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
_milo
Great Teamwork
提交
d2a5593d
Great Teamwork
项目概览
_milo
/
Great Teamwork
通知
13
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Great Teamwork
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
d2a5593d
编写于
5月 07, 2023
作者:
0
042003124
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
完善接口,修改点赞bug
上级
f418c60b
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
13 addition
and
11 deletion
+13
-11
alpha/admin/uniCloud-aliyun/cloudfunctions/fe-college-likeComment/index.js
...oud-aliyun/cloudfunctions/fe-college-likeComment/index.js
+2
-3
alpha/admin/uniCloud-aliyun/cloudfunctions/fe-college-likePost/index.js
...iCloud-aliyun/cloudfunctions/fe-college-likePost/index.js
+1
-1
alpha/admin/uniCloud-aliyun/cloudfunctions/fe-college-postDetail/index.js
...loud-aliyun/cloudfunctions/fe-college-postDetail/index.js
+5
-2
alpha/admin/uniCloud-aliyun/cloudfunctions/fe-my-runningList/index.js
...uniCloud-aliyun/cloudfunctions/fe-my-runningList/index.js
+2
-2
alpha/admin/uniCloud-aliyun/cloudfunctions/fe-my-walkingList/index.js
...uniCloud-aliyun/cloudfunctions/fe-my-walkingList/index.js
+3
-3
未找到文件。
alpha/admin/uniCloud-aliyun/cloudfunctions/fe-college-likeComment/index.js
浏览文件 @
d2a5593d
...
...
@@ -26,13 +26,12 @@ exports.main = async (event, context) => {
const
res2
=
await
comment_table
.
doc
(
event
.
commentId
).
update
({
likes
:
like
})
return
{
code
:
200
,
message
:
"
点赞评论成功
"
,
data
:{
commentId
:
comment
.
data
[
0
][
"
_id
"
],
new
L
ikes
:
like
new
l
ikes
:
like
}
}
}
...
...
@@ -59,7 +58,7 @@ exports.main = async (event, context) => {
message
:
"
取消点赞评论成功
"
,
data
:{
commentId
:
comment2
.
data
[
0
][
"
_id
"
],
new
L
ikes
:
like2
new
l
ikes
:
like2
}
}
}
...
...
alpha/admin/uniCloud-aliyun/cloudfunctions/fe-college-likePost/index.js
浏览文件 @
d2a5593d
...
...
@@ -12,7 +12,7 @@ exports.main = async (event, context) => {
post_id
:
event
.
postId
,
owner_id
:
event
.
userId
}).
get
()
if
(
islike
.
affectedDocs
==
0
&&
res
.
affectedDocs
==
1
){
const
res2
=
await
post_table
.
doc
(
event
.
postId
).
update
({
likes
:
res
.
data
[
0
][
"
likes
"
]
+
1
...
...
alpha/admin/uniCloud-aliyun/cloudfunctions/fe-college-postDetail/index.js
浏览文件 @
d2a5593d
...
...
@@ -12,7 +12,7 @@ exports.main = async (event, context) => {
_id
:
event
.
postId
}).
get
()
const
res3
=
await
comment_table
.
where
({
const
res3
=
await
comment_table
.
orderBy
(
"
date
"
,
"
desc
"
).
where
({
post_id
:
event
.
postId
}).
get
()
...
...
@@ -36,6 +36,7 @@ exports.main = async (event, context) => {
var
comment
=
{
commenterIcon
:
res4
.
data
[
0
][
"
icon
"
],
commenterName
:
res4
.
data
[
0
][
"
name
"
],
commentId
:
arr
[
i
][
"
_id
"
],
commentContent
:
arr
[
i
][
"
content
"
],
commentDatetime
:
arr
[
i
][
"
date
"
],
commentLikes
:
arr
[
i
][
"
likes
"
],
...
...
@@ -50,12 +51,14 @@ exports.main = async (event, context) => {
const
res2
=
await
user_table
.
where
({
_id
:
res
.
data
[
0
][
"
owner_id
"
]
}).
get
()
var
likepost
=
0
const
postLike
=
await
post_like
.
where
({
owner_id
:
event
.
userId
,
post_id
:
event
.
postId
}).
get
()
if
(
postLike
==
1
)
likepost
=
1
if
(
postLike
.
affectedDocs
==
1
)
likepost
=
1
if
(
res2
.
affectedDocs
==
1
){
return
{
code
:
200
,
...
...
alpha/admin/uniCloud-aliyun/cloudfunctions/fe-my-runningList/index.js
浏览文件 @
d2a5593d
...
...
@@ -2,8 +2,8 @@
exports
.
main
=
async
(
event
,
context
)
=>
{
const
db
=
uniCloud
.
database
();
const
running_table
=
db
.
collection
(
'
mustgo-running-record
'
)
let
res
=
await
running_table
.
where
({
_id
:
event
.
userId
let
res
=
await
running_table
.
orderBy
(
"
start_date
"
,
"
desc
"
).
where
({
owner
_id
:
event
.
userId
}).
get
()
var
arr
=
new
Array
var
list
=
new
Array
...
...
alpha/admin/uniCloud-aliyun/cloudfunctions/fe-my-walkingList/index.js
浏览文件 @
d2a5593d
...
...
@@ -2,7 +2,7 @@
exports
.
main
=
async
(
event
,
context
)
=>
{
const
db
=
uniCloud
.
database
();
const
walking_table
=
db
.
collection
(
'
mustgo-walking-record
'
)
var
res
=
await
walking_table
.
where
({
var
res
=
await
walking_table
.
orderBy
(
"
start_date
"
,
"
desc
"
).
where
({
owner_id
:
event
.
userId
}).
get
()
...
...
@@ -15,7 +15,7 @@ exports.main = async (event, context) => {
var
record
=
{
walkingId
:
arr
[
i
][
"
_id
"
],
distance
:
arr
[
i
][
"
distance
"
],
steps
:
arr
[
i
][
"
steps
"
],
pace
:
arr
[
i
][
"
pace
"
],
startDatetime
:
arr
[
i
][
"
start_date
"
]
}
list
.
push
(
record
)
...
...
@@ -24,7 +24,7 @@ exports.main = async (event, context) => {
code
:
200
,
message
:
"
成功返回健走记录列表
"
,
data
:
{
runn
ingList
:
list
walk
ingList
:
list
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录