WIN-2308041133\Administrator 1 năm trước cách đây
mục cha
commit
7abdb9b4db
1 tập tin đã thay đổi với 3 bổ sung4 xóa
  1. 3 4
      application/api/controller/Lave.php

+ 3 - 4
application/api/controller/Lave.php

@@ -170,11 +170,10 @@ class Lave extends Api
                 ['from', 'weixin'],
             ], $request
         );
-        try {
-            $where['user_id']=$this->auth->getUserinfo()['id'];
-        } catch (\Exception $e) {
-            $this->error('请登录后操作');
+        if (!$this->auth->isLogin()) {
+            $this->error(__('Please login first'), null, 401);
         }
+        $where['user_id']=$this->auth->getUserinfo()['id'];
         $where1 = $where;
         unset($where1['from']);
         $where1['order_id'] = LaveMonthModel::getNewOrderId();