Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
_milo
Great Teamwork
提交
b6528eb8
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看板
提交
b6528eb8
编写于
5月 06, 2023
作者:
L
ljw
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改完善部分接口
上级
1f8e06ea
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
82 addition
and
7 deletion
+82
-7
alpha/admin/uniCloud-aliyun/cloudfunctions/fe-team-activityDetail/index.js
...oud-aliyun/cloudfunctions/fe-team-activityDetail/index.js
+14
-0
alpha/admin/uniCloud-aliyun/cloudfunctions/fe-team-activityList/index.js
...Cloud-aliyun/cloudfunctions/fe-team-activityList/index.js
+6
-4
alpha/admin/uniCloud-aliyun/cloudfunctions/fe-team-applyActivity/index.js
...loud-aliyun/cloudfunctions/fe-team-applyActivity/index.js
+13
-1
alpha/admin/uniCloud-aliyun/cloudfunctions/fe-team-leaveTeam/index.js
...uniCloud-aliyun/cloudfunctions/fe-team-leaveTeam/index.js
+24
-1
alpha/admin/uniCloud-aliyun/cloudfunctions/fe-team-memberList/index.js
...niCloud-aliyun/cloudfunctions/fe-team-memberList/index.js
+25
-1
未找到文件。
alpha/admin/uniCloud-aliyun/cloudfunctions/fe-team-activityDetail/index.js
浏览文件 @
b6528eb8
...
...
@@ -6,10 +6,24 @@ exports.main = async (event, context) => {
_id
:
event
.
activityId
}).
get
()
if
(
res
.
affectedDocs
==
1
)
{
const
usercollection
=
db
.
collection
(
'
mustgo-user
'
)
let
res1
=
await
usercollection
.
where
({
_id
:
res
.
data
[
0
][
"
owner_id
"
]
}).
get
()
let
username
let
icon
if
(
res1
.
affectedDocs
==
1
)
{
username
=
res1
.
data
[
0
][
"
name
"
]
icon
=
res1
.
data
[
0
][
"
icon
"
]
}
return
{
code
:
200
,
message
:
"
成功返回活动详情
"
,
data
:
{
"
username
"
:
username
,
"
icon
"
:
icon
,
"
content
"
:
res
.
data
[
0
][
"
content
"
],
"
startDate
"
:
res
.
data
[
0
][
"
start_date
"
],
"
endDate
"
:
res
.
data
[
0
][
"
end_date
"
],
...
...
alpha/admin/uniCloud-aliyun/cloudfunctions/fe-team-activityList/index.js
浏览文件 @
b6528eb8
'
use strict
'
;
exports
.
main
=
async
(
event
,
context
)
=>
{
const
db
=
uniCloud
.
database
()
let
teamid
const
usercollection
=
db
.
collection
(
'
mustgo-user
'
)
let
userres
=
await
usercollection
.
where
({
...
...
@@ -14,19 +14,20 @@ exports.main = async (event, context) => {
"
data
"
:
{}
}
}
if
(
userres
.
data
[
0
][
"
team_id
"
]
==
""
)
{
if
(
userres
.
data
[
0
][
"
team_id
"
]
==
""
)
{
return
{
code
:
200
,
message
:
"
成功返回小队活动列表
"
,
join
:
false
,
join
:
false
,
data
:
{
username
:
userres
.
data
[
0
][
"
name
"
],
icon
:
userres
.
data
[
0
][
"
icon
"
],
activityList
:
[]
}
}
}
teamid
=
userres
.
data
[
0
][
"
team_id
"
]
const
collection
=
db
.
collection
(
'
mustgo-team-activity
'
)
let
res
=
await
collection
.
where
({
team_id
:
teamid
...
...
@@ -48,6 +49,7 @@ exports.main = async (event, context) => {
message
:
"
成功返回小队活动列表
"
,
data
:
{
username
:
userres
.
data
[
0
][
"
name
"
],
icon
:
userres
.
data
[
0
][
"
icon
"
],
activityList
:
list
}
}
...
...
alpha/admin/uniCloud-aliyun/cloudfunctions/fe-team-applyActivity/index.js
浏览文件 @
b6528eb8
...
...
@@ -3,10 +3,22 @@ exports.main = async (event, context) => {
const
db
=
uniCloud
.
database
()
const
collection
=
db
.
collection
(
'
mustgo-registration
'
)
const
activitycollection
=
db
.
collection
(
'
mustgo-team-activity
'
)
let
regres
=
await
collection
.
where
({
team_activity_id
:
event
.
activityId
,
owner_id
:
event
.
userId
}).
get
()
if
(
regres
.
affectedDocs
==
1
)
{
return
{
"
code
"
:
400
,
"
message
"
:
"
报名小队活动失败
"
,
"
data
"
:
{}
}
}
let
activityres
=
await
activitycollection
.
where
({
_id
:
event
.
activityId
}).
get
()
if
(
activityres
.
affectedDocs
==
1
)
{
const
res
=
await
collection
.
add
({
team_activity_id
:
event
.
activityId
,
...
...
alpha/admin/uniCloud-aliyun/cloudfunctions/fe-team-leaveTeam/index.js
浏览文件 @
b6528eb8
...
...
@@ -2,9 +2,32 @@
exports
.
main
=
async
(
event
,
context
)
=>
{
const
db
=
uniCloud
.
database
()
const
collection
=
db
.
collection
(
'
mustgo-user
'
)
let
res1
=
await
collection
.
where
({
_id
:
event
.
userId
}).
get
()
if
(
res1
.
affectedDocs
<=
0
)
{
return
{
"
code
"
:
400
,
"
message
"
:
"
退出小队失败
"
,
"
data
"
:
{}
}
}
let
teamid
if
(
res1
.
affectedDocs
==
1
)
{
teamid
=
res1
.
data
[
0
][
"
team_id
"
]
}
if
(
teamid
==
""
)
{
return
{
"
code
"
:
400
,
"
message
"
:
"
退出小队失败
"
,
"
data
"
:
{}
}
}
let
res
=
await
collection
.
where
({
_id
:
event
.
userId
,
team_id
:
event
.
teamI
d
team_id
:
teami
d
}).
get
()
if
(
res
.
affectedDocs
==
1
)
{
...
...
alpha/admin/uniCloud-aliyun/cloudfunctions/fe-team-memberList/index.js
浏览文件 @
b6528eb8
...
...
@@ -2,8 +2,32 @@
exports
.
main
=
async
(
event
,
context
)
=>
{
const
db
=
uniCloud
.
database
()
const
collection
=
db
.
collection
(
'
mustgo-user
'
)
let
res1
=
await
collection
.
where
({
_id
:
event
.
userId
}).
get
()
if
(
res1
.
affectedDocs
<=
0
)
{
return
{
"
code
"
:
400
,
"
message
"
:
"
返回小队成员列表失败
"
,
"
data
"
:
{}
}
}
let
teamid
if
(
res1
.
affectedDocs
==
1
)
{
teamid
=
res1
.
data
[
0
][
"
team_id
"
]
}
if
(
teamid
==
""
)
{
return
{
"
code
"
:
400
,
"
message
"
:
"
返回小队成员列表失败
"
,
"
data
"
:
{}
}
}
let
res
=
await
collection
.
where
({
team_id
:
event
.
teamI
d
team_id
:
teami
d
}).
get
()
var
list
=
new
Array
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录