'use strict'; 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.runningId }).get() if (res.affectedDocs == 1) { return { code: 200, message: "成功返回跑步记录详情", data: { "distance": res.data[0]["distance"], "duration": res.data[0]["duration"], "pace": res.data[0]["pace"], "StartDatetime": res.data[0]["start_date"], "feeling": res.data[0]["feelings"], "startPoint": res.data[0]["start_point"], "endPoint": res.data[0]["end_point"], "pathLine": res.data[0]["path_line"] } } } return { code: 400, message: "返回跑步记录详情失败", data: {} } };