Browse Source

完善我的订单

15954078560 2 năm trước cách đây
mục cha
commit
11fc4e40e8
1 tập tin đã thay đổi với 6 bổ sung1 xóa
  1. 6 1
      application/api/controller/User.php

+ 6 - 1
application/api/controller/User.php

@@ -1625,7 +1625,7 @@ class User extends Api
             $this->error('参数错误');
         }
 
-        $list = Db::name('active_order')->where(['user_id' => $this->auth->id])->page($this->page, $this->pagenum)->order('id desc')->select();
+        $list = Db::name('active_order')->where(['user_id' => $this->auth->id, 'status' => $type])->page($this->page, $this->pagenum)->order('id desc')->select();
 
         $active = Db::name('active');
         foreach ($list as &$v) {
@@ -1640,6 +1640,11 @@ class User extends Api
                     $v['button_status'] = 2;
                 }
             }
+            if ($v['active']['maxperson'] <= $v['active']['currentperson']) {
+                $v['is_full'] = 1; //已报满
+            } else {
+                $v['is_full'] = 0; //未报满
+            }
         }
 
         $this->success('我的订单', $list);