lrf 2 年 前
コミット
c8d711ec1e
1 ファイル変更1 行追加1 行削除
  1. 1 1
      app/service/trade/coupon.js

+ 1 - 1
app/service/trade/coupon.js

@@ -15,7 +15,7 @@ class CouponService extends CrudService {
 
   async userView(filter, { skip = 0, limit, sort, desc, projection } = {}) {
     const customer = _.get(this.ctx, 'user._id');
-    if (customer) throw new BusinessError(ErrorCode.NOT_LOGIN, '未找到用户登陆信息');
+    if (!customer) throw new BusinessError(ErrorCode.NOT_LOGIN, '未找到用户登陆信息');
     let list = await this.query(filter, { skip, limit, sort, desc, projection });
     list = await this.makeShowData(list);
     // 还需要判断用户是否领取过了