Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
_milo
Great Teamwork
提交
97b7f98e
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看板
提交
97b7f98e
编写于
5月 10, 2023
作者:
M
MicroMilo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修复间谍bug(雾)
上级
98c8a9a7
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
36 addition
and
4 deletion
+36
-4
alpha/admin/uniCloud-aliyun/cloudfunctions/fe-my-runningDetail/index.js
...iCloud-aliyun/cloudfunctions/fe-my-runningDetail/index.js
+5
-1
alpha/admin/uniCloud-aliyun/cloudfunctions/fe-sport-run-save/index.js
...uniCloud-aliyun/cloudfunctions/fe-sport-run-save/index.js
+9
-0
alpha/admin/uniCloud-aliyun/cloudfunctions/fe-sport-walk-save/index.js
...niCloud-aliyun/cloudfunctions/fe-sport-walk-save/index.js
+10
-1
alpha/admin/uniCloud-aliyun/cloudfunctions/fe-team-joinTeam/index.js
.../uniCloud-aliyun/cloudfunctions/fe-team-joinTeam/index.js
+12
-2
未找到文件。
alpha/admin/uniCloud-aliyun/cloudfunctions/fe-my-runningDetail/index.js
浏览文件 @
97b7f98e
...
...
@@ -14,7 +14,11 @@ exports.main = async (event, context) => {
"
duration
"
:
res
.
data
[
0
][
"
duration
"
],
"
pace
"
:
res
.
data
[
0
][
"
pace
"
],
"
StartDatetime
"
:
res
.
data
[
0
][
"
start_date
"
],
"
feeling
"
:
res
.
data
[
0
][
"
feelings
"
]
"
feeling
"
:
res
.
data
[
0
][
"
feelings
"
],
"
startPoint
"
:
res
.
data
[
0
][
"
start_point
"
],
"
endPoint
"
:
res
.
data
[
0
][
"
end_point
"
],
"
pathLine
"
:
res
.
data
[
0
][
"
path_line
"
]
}
}
}
...
...
alpha/admin/uniCloud-aliyun/cloudfunctions/fe-sport-run-save/index.js
浏览文件 @
97b7f98e
...
...
@@ -6,6 +6,15 @@ exports.main = async (event, context) => {
const
db
=
uniCloud
.
database
();
let
collection
=
db
.
collection
(
'
mustgo-running-record
'
);
if
(
event
.
distance
<
0.01
)
{
return
{
code
:
400
,
message
:
"
距离过短,不予保存
"
,
data
:
{
}
}
}
let
res
=
await
collection
.
add
({
start_date
:
event
.
startTime
,
duration
:
event
.
duration
,
...
...
alpha/admin/uniCloud-aliyun/cloudfunctions/fe-sport-walk-save/index.js
浏览文件 @
97b7f98e
...
...
@@ -6,10 +6,19 @@ exports.main = async (event, context) => {
const
db
=
uniCloud
.
database
();
let
collection
=
db
.
collection
(
'
mustgo-walking-record
'
);
if
(
event
.
distance
<
0.01
)
{
return
{
code
:
400
,
message
:
"
距离过短,不予保存
"
,
data
:
{
}
}
}
let
res
=
await
collection
.
add
({
start_date
:
event
.
startTime
,
duration
:
event
.
duration
,
// feelings: event.feelings
,
feelings
:
""
,
owner_id
:
event
.
userId
,
distance
:
event
.
distance
,
pace
:
event
.
pace
,
...
...
alpha/admin/uniCloud-aliyun/cloudfunctions/fe-team-joinTeam/index.js
浏览文件 @
97b7f98e
...
...
@@ -6,8 +6,18 @@ exports.main = async (event, context) => {
let
teamres
=
await
teamcollection
.
where
({
_id
:
event
.
teamId
}).
get
()
if
(
teamres
.
affectedDocs
==
1
)
{
let
userres
=
await
collection
.
where
({
_id
:
event
.
userId
}).
get
()
if
(
userres
.
data
[
0
][
"
team_id
"
]
!=
""
)
{
return
{
"
code
"
:
400
,
"
message
"
:
"
加入小队失败
"
,
"
data
"
:
{}
}
}
const
res
=
await
collection
.
doc
(
event
.
userId
).
update
({
team_id
:
event
.
teamId
})
...
...
@@ -28,4 +38,4 @@ exports.main = async (event, context) => {
"
message
"
:
"
加入小队失败
"
,
"
data
"
:
{}
}
};
\ No newline at end of file
};
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录