...
|
...
|
@@ -61,6 +61,7 @@ class User extends Api |
|
|
"count3": 0, //待确认数量
|
|
|
"count4": 0, //已结束数量
|
|
|
"count5": 0 //售后数量
|
|
|
"count6": 0 //已取消数量
|
|
|
},
|
|
|
"grab_count": { //抢单信息
|
|
|
"count1": 1, //抢单中数量
|
...
|
...
|
@@ -68,6 +69,7 @@ class User extends Api |
|
|
"count3": 0, //待确认数量
|
|
|
"count4": 0, //已结束数量
|
|
|
"count5": 0 //售后数量
|
|
|
"count6": 0 //已取消数量
|
|
|
},
|
|
|
"url": "/u/1"
|
|
|
}
|
...
|
...
|
@@ -84,6 +86,7 @@ class User extends Api |
|
|
'count3' => $this->getOrderCount(['user_id'=>$user['id'],'status'=>'3']), // 待确认
|
|
|
'count4' => $this->getOrderCount(['user_id'=>$user['id'],'status'=>['in','4,6']]), // 已完成/已拒绝
|
|
|
'count5' => $this->getOrderCount(['user_id'=>$user['id'],'status'=>'5']), // 售后
|
|
|
'count6' => $this->getOrderCount(['user_id'=>$user['id'],'status'=>['in','7,8']]), // 已取消
|
|
|
];
|
|
|
// 抢单信息
|
|
|
$user->grab_count = [
|
...
|
...
|
@@ -92,6 +95,7 @@ class User extends Api |
|
|
'count3' => $this->getGrabCount(['a.user_id'=>$user['id'],'a.status'=>'3']), // 待确认
|
|
|
'count4' => $this->getGrabCount(['a.user_id'=>$user['id'],'a.status'=>['in','4,6']]), // 已完成/已拒绝
|
|
|
'count5' => $this->getGrabCount(['a.user_id'=>$user['id'],'a.status'=>'5']), // 售后
|
|
|
'count6' => $this->getGrabCount(['a.user_id'=>$user['id'],'a.status'=>['in','7,8']]), // 已取消
|
|
|
];
|
|
|
$user->visible(['id','avatar','nickname','mobile','score','money','order_count','grab_count']);
|
|
|
$this->success('成功', $user);
|
...
|
...
|
|