|
@@ -27,6 +27,19 @@ class User extends Main
|
|
|
if (Place::$user['agent_id'] > 0) {
|
|
|
$data['agent'] = Dever::db('agent', 'place')->find(Place::$user['agent_id']);
|
|
|
}*/
|
|
|
+
|
|
|
+ $data['show_order'] = 2;
|
|
|
+ foreach (Place::$resource as $k => $v) {
|
|
|
+ if ($v['type'] == 3) {
|
|
|
+ $data['show_order'] = 1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if ($data['show_order'] == 1) {
|
|
|
+ $data['order'][] = array('name' => '待付款', 'num' => Dever::db('order', 'goods')->count(array('status' => 1)));
|
|
|
+ $data['order'][] = array('name' => '待发货', 'num' => Dever::db('order', 'goods')->count(array('status' => 2)));
|
|
|
+ $data['order'][] = array('name' => '待收货', 'num' => Dever::db('order', 'goods')->count(array('status' => array('in', '3,4'))));
|
|
|
+ $data['order'][] = array('name' => '已完成', 'num' => Dever::db('order', 'goods')->count(array('status' => array('in', '5,6'))));
|
|
|
+ }
|
|
|
return Place::result($data);
|
|
|
}
|
|
|
|