|
|
@@ -55,14 +55,14 @@ class Lepao {
|
|
|
try {
|
|
|
const reqData = { uid, token, school_id, student_id }
|
|
|
const recordUrl = this.runpy + '/get_record'
|
|
|
- const recordRes = await axios.post(recordUrl, reqData)
|
|
|
- const { data } = recordRes.data
|
|
|
+ let recordRes = await axios.post(recordUrl, reqData)
|
|
|
+ const { data } = recordRes
|
|
|
if (!data || data.status !== 1 || !data.data) {
|
|
|
this.logger.info('获取剩余跑步次数失败!')
|
|
|
console.log(data)
|
|
|
return
|
|
|
}
|
|
|
- return data
|
|
|
+ return data.data
|
|
|
} catch (error) {
|
|
|
this.logger.error('获取跑步次数失败!')
|
|
|
console.log(error.stack)
|
|
|
@@ -148,8 +148,6 @@ class Lepao {
|
|
|
const lepaoRes = await axios.post(lepaoUrl, lepaoData)
|
|
|
const { data } = lepaoRes
|
|
|
|
|
|
- this.logger.info(data)
|
|
|
-
|
|
|
if (!data || data.status !== 1 || !data.data) {
|
|
|
this.setStatusFail(account)
|
|
|
throw new Error(data?.info || '未知错误,请尝试重新登录')
|