Sfoglia il codice sorgente

[Chg] User dont need to auth to buy things

Ark 4 anni fa
parent
commit
0a6ab76417
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      src/api/controller/order.js

+ 1 - 1
src/api/controller/order.js

@@ -209,7 +209,7 @@ module.exports = class extends Base {
     think.logger.debug(Date.now());
     // 更新用户余额
     const user = await this.model('user').where({id: this.getLoginUserId()}).find();
-    if (think.isEmpty(user) || parseInt(user.isAuthen) === 0) return this.fail('用户未注册');
+    if (think.isEmpty(user)) return this.fail('未找到用户');
     if (user.balance < goodsTotalPrice) return this.fail('余额不足');
     think.logger.debug(user.balance + '-=' + goodsTotalPrice);
     await this.model('user').where({id: this.getLoginUserId()}).update({