|
|
@@ -37,7 +37,7 @@ class Lepao {
|
|
|
|
|
|
const paths = await db.query(pathSql, pathParams)
|
|
|
if (!paths || paths.length === 0) {
|
|
|
- throw new Error('未找到符合条件的路线,请改变选择条件')
|
|
|
+ throw new Error('未找到符合条件的路线,请改变路径选择条件')
|
|
|
}
|
|
|
|
|
|
const randomPath = paths[Math.floor(Math.random() * paths.length)]
|
|
|
@@ -86,7 +86,7 @@ class Lepao {
|
|
|
const ossRes = await axios.post(ossUrl, ossData)
|
|
|
const { data } = ossRes
|
|
|
if (!data || data.code !== 200 || !data.oss_path) {
|
|
|
- throw new Error('请检查登录是否过期')
|
|
|
+ throw new Error('请检查登录是否过期,并尝试更新乐跑登录状态')
|
|
|
}
|
|
|
oss_path = data.oss_path
|
|
|
} catch (error) {
|
|
|
@@ -103,7 +103,9 @@ class Lepao {
|
|
|
let run_end_time = Math.floor(Date.now() / 1000)
|
|
|
let hour = new Date().getHours()
|
|
|
if (hour >= 22) run_end_time -= 18000
|
|
|
- else if (hour < 6) run_end_time -= 43920
|
|
|
+
|
|
|
+ // 0点过后无法上传
|
|
|
+ // else if (hour < 6) run_end_time -= 43920
|
|
|
|
|
|
const lepaoData = {
|
|
|
uid,
|
|
|
@@ -115,7 +117,7 @@ class Lepao {
|
|
|
run_end_time
|
|
|
}
|
|
|
|
|
|
- console.log(lepaoData)
|
|
|
+ this.logger.info(lepaoData)
|
|
|
|
|
|
// 绑定乐跑数据
|
|
|
const lepaoUrl = this.runpy + '/bind_data'
|
|
|
@@ -123,7 +125,7 @@ class Lepao {
|
|
|
const lepaoRes = await axios.post(lepaoUrl, lepaoData)
|
|
|
const { data } = lepaoRes
|
|
|
|
|
|
- console.log(data)
|
|
|
+ this.logger.info(data)
|
|
|
|
|
|
if (!data || data.status !== 1 || !data.data) {
|
|
|
this.setStatusFail(account)
|