|
|
@@ -160,7 +160,7 @@ class Lepao {
|
|
|
throw new Error(data?.info || '未知错误,请尝试重新登录')
|
|
|
}
|
|
|
|
|
|
- await this.addRecord(account, data.data)
|
|
|
+ await this.addRecord(account, data.data, path_id)
|
|
|
|
|
|
// 获取剩余跑步次数
|
|
|
const recordData = await this.getRecord(uid, token, school_id, account)
|
|
|
@@ -188,11 +188,11 @@ class Lepao {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- async addRecord(account, result) {
|
|
|
+ async addRecord(account, result, path_id) {
|
|
|
try {
|
|
|
const time = Date.now()
|
|
|
- const sql = 'INSERT INTO lepao_record (time, lepao_account, result) VALUES (?, ?, ?)'
|
|
|
- await db.query(sql, [time, account, result])
|
|
|
+ const sql = 'INSERT INTO lepao_record (time, lepao_account, result, path_id) VALUES (?, ?, ?, ?)'
|
|
|
+ await db.query(sql, [time, account, result, path_id])
|
|
|
} catch (error) {
|
|
|
this.logger.error(error.stack || error.message)
|
|
|
}
|