Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
_milo
Great Teamwork
提交
ba1515e0
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看板
提交
ba1515e0
编写于
5月 25, 2023
作者:
0
052004122温宸杰
浏览文件
操作
浏览文件
下载
差异文件
后台管理系统优化
上级
4a3ac424
23cd157a
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
89 addition
and
160 deletion
+89
-160
alpha/admin/uniCloud-aliyun/cloudfunctions/fe-team-activityDetail/index.js
...oud-aliyun/cloudfunctions/fe-team-activityDetail/index.js
+54
-5
alpha/admin/uniCloud-aliyun/cloudfunctions/fe-team-applyActivity/index.js
...loud-aliyun/cloudfunctions/fe-team-applyActivity/index.js
+11
-4
alpha/admin/uniCloud-aliyun/cloudfunctions/fe-team-createActivity/index.js
...oud-aliyun/cloudfunctions/fe-team-createActivity/index.js
+2
-1
alpha/admin/uniCloud-aliyun/cloudfunctions/fe-team-leaveTeam/index.js
...uniCloud-aliyun/cloudfunctions/fe-team-leaveTeam/index.js
+15
-0
alpha/admin/uniCloud-aliyun/database/mustgo-team-activity.schema.json
...uniCloud-aliyun/database/mustgo-team-activity.schema.json
+7
-2
alpha/admin/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/package-lock.json
...pages/uniCloud/cloudfunctions/uni-id-co/package-lock.json
+0
-148
未找到文件。
alpha/admin/uniCloud-aliyun/cloudfunctions/fe-team-activityDetail/index.js
浏览文件 @
ba1515e0
...
...
@@ -6,7 +6,7 @@ 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
"
]
...
...
@@ -17,21 +17,70 @@ exports.main = async (event, context) => {
username
=
res1
.
data
[
0
][
"
name
"
]
icon
=
res1
.
data
[
0
][
"
icon
"
]
}
const
reg
=
db
.
collection
(
'
mustgo-registration
'
)
let
res2
=
await
reg
.
where
({
team_activity_id
:
event
.
activityId
,
owner_id
:
event
.
userId
}).
get
()
if
(
res2
.
affectedDocs
==
1
)
{
return
{
code
:
200
,
message
:
"
成功返回活动详情
"
,
qualification
:
"
取消报名
"
,
data
:
{
"
username
"
:
username
,
"
icon
"
:
icon
,
"
content
"
:
res
.
data
[
0
][
"
content
"
],
"
startDate
"
:
res
.
data
[
0
][
"
start_date
"
],
"
endDate
"
:
res
.
data
[
0
][
"
end_date
"
],
"
place
"
:
res
.
data
[
0
][
"
place
"
],
"
participants
"
:
res
.
data
[
0
][
"
participants
"
],
"
contact
"
:
res
.
data
[
0
][
"
contact
"
],
"
enrollment
"
:
res
.
data
[
0
][
"
enrollment
"
]
}
}
}
// console.log(res.date[0]["participants"])
// console.log(res.date[0]["enrollment"])
if
(
res
.
data
[
0
][
"
participants
"
]
<=
res
.
data
[
0
][
"
enrollment
"
])
{
return
{
code
:
200
,
message
:
"
成功返回活动详情
"
,
qualification
:
"
报名停止
"
,
data
:
{
"
username
"
:
username
,
"
icon
"
:
icon
,
"
content
"
:
res
.
data
[
0
][
"
content
"
],
"
startDate
"
:
res
.
data
[
0
][
"
start_date
"
],
"
endDate
"
:
res
.
data
[
0
][
"
end_date
"
],
"
place
"
:
res
.
data
[
0
][
"
place
"
],
"
participants
"
:
res
.
data
[
0
][
"
participants
"
],
"
contact
"
:
res
.
data
[
0
][
"
contact
"
],
"
enrollment
"
:
res
.
data
[
0
][
"
enrollment
"
]
}
}
}
return
{
code
:
200
,
message
:
"
成功返回活动详情
"
,
qualification
:
"
报名
"
,
data
:
{
"
username
"
:
username
,
"
icon
"
:
icon
,
"
username
"
:
username
,
"
icon
"
:
icon
,
"
content
"
:
res
.
data
[
0
][
"
content
"
],
"
startDate
"
:
res
.
data
[
0
][
"
start_date
"
],
"
endDate
"
:
res
.
data
[
0
][
"
end_date
"
],
"
place
"
:
res
.
data
[
0
][
"
place
"
],
"
participants
"
:
res
.
data
[
0
][
"
participants
"
],
"
contact
"
:
res
.
data
[
0
][
"
contact
"
]
"
contact
"
:
res
.
data
[
0
][
"
contact
"
],
"
enrollment
"
:
res
.
data
[
0
][
"
enrollment
"
]
}
}
}
return
{
"
code
"
:
400
,
...
...
alpha/admin/uniCloud-aliyun/cloudfunctions/fe-team-applyActivity/index.js
浏览文件 @
ba1515e0
...
...
@@ -3,10 +3,10 @@ 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
owner_id
:
event
.
userId
}).
get
()
if
(
regres
.
affectedDocs
==
1
)
{
return
{
...
...
@@ -15,7 +15,7 @@ exports.main = async (event, context) => {
"
data
"
:
{}
}
}
let
activityres
=
await
activitycollection
.
where
({
_id
:
event
.
activityId
}).
get
()
...
...
@@ -24,12 +24,19 @@ exports.main = async (event, context) => {
team_activity_id
:
event
.
activityId
,
owner_id
:
event
.
userId
})
if
(
res
.
id
.
length
>
0
)
if
(
res
.
id
.
length
>
0
)
{
const
res
=
await
activitycollection
.
doc
(
event
.
activityId
).
update
({
enrollment
:
activityres
.
data
[
0
][
"
enrollment
"
]
+
1
})
return
{
"
code
"
:
200
,
"
message
"
:
"
报名小队活动成功
"
,
"
data
"
:
{}
}
}
}
return
{
"
code
"
:
400
,
...
...
alpha/admin/uniCloud-aliyun/cloudfunctions/fe-team-createActivity/index.js
浏览文件 @
ba1515e0
...
...
@@ -29,7 +29,8 @@ exports.main = async (event, context) => {
status
:
0
,
participants
:
event
.
participants
,
contact
:
event
.
contact
,
team_id
:
teamid
team_id
:
teamid
,
enrollment
:
0
})
if
(
res
.
id
.
length
>
0
)
return
{
...
...
alpha/admin/uniCloud-aliyun/cloudfunctions/fe-team-leaveTeam/index.js
浏览文件 @
ba1515e0
...
...
@@ -2,6 +2,11 @@
exports
.
main
=
async
(
event
,
context
)
=>
{
const
db
=
uniCloud
.
database
()
const
collection
=
db
.
collection
(
'
mustgo-user
'
)
<<<<<<<
HEAD
=======
const
activitycollection
=
db
.
collection
(
'
mustgo-team-activity
'
)
>>>>>>>
23
cd157a5405ab804c346a27b655ccf7564925eb
let
res1
=
await
collection
.
where
({
_id
:
event
.
userId
...
...
@@ -53,11 +58,21 @@ exports.main = async (event, context) => {
arr
=
res2
.
data
const
registration
=
db
.
collection
(
'
mustgo-registration
'
)
for
(
var
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
<<<<<<<
HEAD
const
tmp
=
await
registration
.
where
({
team_activity_id
:
arr
[
i
][
"
_id
"
]
}).
remove
()
// doc(`${id}`).update({team_activity_id:{name:dbCmd.remove()}})
=======
const
res
=
await
activitycollection
.
doc
(
arr
[
i
][
"
_id
"
]).
update
({
enrollment
:
arr
[
i
][
"
enrollment
"
]
-
1
})
const
tmp
=
await
registration
.
where
({
team_activity_id
:
arr
[
i
][
"
_id
"
]
}).
remove
()
>>>>>>>
23
cd157a5405ab804c346a27b655ccf7564925eb
}
return
{
...
...
alpha/admin/uniCloud-aliyun/database/mustgo-team-activity.schema.json
浏览文件 @
ba1515e0
...
...
@@ -56,8 +56,13 @@
},
"participants"
:
{
"bsonType"
:
"int"
,
"title"
:
"参与人数"
,
"description"
:
"小队活动参与人数"
"title"
:
"限制人数"
,
"description"
:
"小队活动限制人数"
},
"enrollment"
:
{
"bsonType"
:
"int"
,
"title"
:
"报名人数"
,
"description"
:
"小队活动报名人数"
},
"contact"
:
{
"bsonType"
:
"string"
,
...
...
alpha/admin/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/package-lock.json
已删除
100644 → 0
浏览文件 @
4a3ac424
{
"name"
:
"uni-id-co"
,
"version"
:
"1.0.38"
,
"lockfileVersion"
:
1
,
"requires"
:
true
,
"dependencies"
:
{
"buffer-equal-constant-time"
:
{
"version"
:
"1.0.1"
,
"resolved"
:
"https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz"
,
"integrity"
:
"sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA=="
},
"ecdsa-sig-formatter"
:
{
"version"
:
"1.0.11"
,
"resolved"
:
"https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz"
,
"integrity"
:
"sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ=="
,
"requires"
:
{
"safe-buffer"
:
"^5.0.1"
}
},
"jsonwebtoken"
:
{
"version"
:
"8.5.1"
,
"resolved"
:
"https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz"
,
"integrity"
:
"sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w=="
,
"requires"
:
{
"jws"
:
"^3.2.2"
,
"lodash.includes"
:
"^4.3.0"
,
"lodash.isboolean"
:
"^3.0.3"
,
"lodash.isinteger"
:
"^4.0.4"
,
"lodash.isnumber"
:
"^3.0.3"
,
"lodash.isplainobject"
:
"^4.0.6"
,
"lodash.isstring"
:
"^4.0.1"
,
"lodash.once"
:
"^4.0.0"
,
"ms"
:
"^2.1.1"
,
"semver"
:
"^5.6.0"
}
},
"jwa"
:
{
"version"
:
"1.4.1"
,
"resolved"
:
"https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz"
,
"integrity"
:
"sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA=="
,
"requires"
:
{
"buffer-equal-constant-time"
:
"1.0.1"
,
"ecdsa-sig-formatter"
:
"1.0.11"
,
"safe-buffer"
:
"^5.0.1"
}
},
"jws"
:
{
"version"
:
"3.2.2"
,
"resolved"
:
"https://registry.npmjs.org/jws/-/jws-3.2.2.tgz"
,
"integrity"
:
"sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA=="
,
"requires"
:
{
"jwa"
:
"^1.4.1"
,
"safe-buffer"
:
"^5.0.1"
}
},
"lodash.includes"
:
{
"version"
:
"4.3.0"
,
"resolved"
:
"https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz"
,
"integrity"
:
"sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w=="
},
"lodash.isboolean"
:
{
"version"
:
"3.0.3"
,
"resolved"
:
"https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz"
,
"integrity"
:
"sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg=="
},
"lodash.isinteger"
:
{
"version"
:
"4.0.4"
,
"resolved"
:
"https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz"
,
"integrity"
:
"sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA=="
},
"lodash.isnumber"
:
{
"version"
:
"3.0.3"
,
"resolved"
:
"https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz"
,
"integrity"
:
"sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw=="
},
"lodash.isplainobject"
:
{
"version"
:
"4.0.6"
,
"resolved"
:
"https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz"
,
"integrity"
:
"sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA=="
},
"lodash.isstring"
:
{
"version"
:
"4.0.1"
,
"resolved"
:
"https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz"
,
"integrity"
:
"sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw=="
},
"lodash.merge"
:
{
"version"
:
"4.6.2"
,
"resolved"
:
"https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz"
,
"integrity"
:
"sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ=="
},
"lodash.once"
:
{
"version"
:
"4.1.1"
,
"resolved"
:
"https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz"
,
"integrity"
:
"sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg=="
},
"ms"
:
{
"version"
:
"2.1.3"
,
"resolved"
:
"https://registry.npmjs.org/ms/-/ms-2.1.3.tgz"
,
"integrity"
:
"sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
},
"safe-buffer"
:
{
"version"
:
"5.2.1"
,
"resolved"
:
"https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz"
,
"integrity"
:
"sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="
},
"semver"
:
{
"version"
:
"5.7.1"
,
"resolved"
:
"https://registry.npmjs.org/semver/-/semver-5.7.1.tgz"
,
"integrity"
:
"sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ=="
},
"uni-captcha"
:
{
"version"
:
"file:../../../../uni-captcha/uniCloud/cloudfunctions/common/uni-captcha"
,
"requires"
:
{
"uni-config-center"
:
"file:../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center"
},
"dependencies"
:
{
"uni-config-center"
:
{
"version"
:
"file:../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center"
}
}
},
"uni-config-center"
:
{
"version"
:
"file:../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center"
},
"uni-id-common"
:
{
"version"
:
"file:../../../../uni-id-common/uniCloud/cloudfunctions/common/uni-id-common"
,
"requires"
:
{
"uni-config-center"
:
"file:../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center"
},
"dependencies"
:
{
"uni-config-center"
:
{
"version"
:
"file:../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center"
}
}
},
"uni-open-bridge-common"
:
{
"version"
:
"file:../../../../uni-open-bridge-common/uniCloud/cloudfunctions/common/uni-open-bridge-common"
,
"requires"
:
{
"uni-config-center"
:
"file:../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center"
},
"dependencies"
:
{
"uni-config-center"
:
{
"version"
:
"file:../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center"
}
}
}
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录