Browse Source

🐞 fix: 打卡点数量不足时重新乐跑

Pchen. 7 months ago
parent
commit
248043acc8
1 changed files with 5 additions and 0 deletions
  1. 5 0
      lib/Lepao/Lepao.js

+ 5 - 0
lib/Lepao/Lepao.js

@@ -165,6 +165,11 @@ class Lepao {
                 const { data } = ossRes
                 this.logger.info(`${account}上传OSS记录返回结果: ${JSON.stringify(data)}`)
                 if (!data || data.code !== 200 || !data.oss_path || !data.point_data) {
+                    if(data.code == -200) {
+                        this.logger.info(`${account}分配打卡点数量不足,重新执行乐跑流程`)
+                        return this.beginLepao(uuid, account, token, uid, school_id, state)
+                    }
+
                     throw new Error('请检查登录是否过期,并尝试更新乐跑登录状态')
                 }
                 oss_path = data.oss_path