提交 48f59522 编写于 作者: M MicroMilo

运动接口 bug 修复

上级 54186d15
......@@ -130,9 +130,16 @@ module.exports = {
let cur = res.data[0][fieldName];
cur += event.distance
res = await collection.doc(event.userId).update({
total_walking_distance: cur,
})
if (event.type == "跑步") {
res = await collection.doc(event.userId).update({
total_running_distance: cur
})
} else {
res = await collection.doc(event.userId).update({
total_walking_distance: cur
})
}
if (res.updated > 0)
return {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册