diff --git a/app/Controller/v3/HomeController.php b/app/Controller/v3/HomeController.php index c6c86bb..bdab336 100644 --- a/app/Controller/v3/HomeController.php +++ b/app/Controller/v3/HomeController.php @@ -135,7 +135,8 @@ class HomeController extends BaseController $roles[] = [ 'key'=>'store', 'title'=>'商家', - 'color'=>'#0091FF' + 'color'=>'#0091FF', + 'data'=>$store_info, ]; } @@ -143,7 +144,8 @@ class HomeController extends BaseController $roles[] = [ 'key'=>'sp', 'title'=>'服务', - 'color'=>'#0091FF' + 'color'=>'#0091FF', + 'data'=>$sp_info, ]; } diff --git a/app/Controller/v3/OrderListController.php b/app/Controller/v3/OrderListController.php index 08928c7..f1cb99e 100644 --- a/app/Controller/v3/OrderListController.php +++ b/app/Controller/v3/OrderListController.php @@ -47,8 +47,13 @@ class OrderListController extends BaseController public function offlineForStore() { - $params = $this->request->all(); - $list = $this->orderListService->offlineByStore($params['store_id'], $params['tab'], $params['page'], $params['pagesize'],$params['start_time'],$params['end_time']); + $storeId = $this->request->input('store_id',''); + $tab = $this->request->input('tab','all'); + $page = $this->request->input('page',1); + $pagesize = $this->request->input('pagesize',10); + $startTime = $this->request->input('start_time',''); + $endTime = $this->request->input('end_time',''); + $list = $this->orderListService->offlineByStore($storeId, $tab, $page, $pagesize,$startTime,$endTime); return $this->success($list); } diff --git a/app/Service/v3/Implementations/OrderListService.php b/app/Service/v3/Implementations/OrderListService.php index 0dad68c..4cd468e 100644 --- a/app/Service/v3/Implementations/OrderListService.php +++ b/app/Service/v3/Implementations/OrderListService.php @@ -95,7 +95,7 @@ class OrderListService implements OrderListServiceInterface break; } - $paginate = $builder->orderBy('created_at', 'desc')->paginate($pagesize); + $paginate = $builder->orderBy('lanzu_order_main.created_at', 'desc')->paginate($pagesize); $orders = $paginate->toArray(); $stateTxet = [ @@ -154,7 +154,7 @@ class OrderListService implements OrderListServiceInterface $builder->whereBetween('lanzu_order_main.created_at',[strtotime($start_time.' 23:59:59'),strtotime($end_time.' 23:59:59')]); } - $paginate = $builder->orderBy('created_at', 'desc')->paginate($pagesize); + $paginate = $builder->orderBy('lanzu_order_main.created_at', 'desc')->paginate($pagesize); $orders = $paginate->toArray(); return ['has_more_pages' => $paginate->hasMorePages(), 'orders' => $orders['data']]; } diff --git a/app/Service/v3/Implementations/UserCenterBlockService.php b/app/Service/v3/Implementations/UserCenterBlockService.php index 72c8675..1964962 100644 --- a/app/Service/v3/Implementations/UserCenterBlockService.php +++ b/app/Service/v3/Implementations/UserCenterBlockService.php @@ -35,7 +35,7 @@ class UserCenterBlockService implements UserCenterBlockServiceInterface 'title' => '常用功能', 'items' => [ ['name' => '收货地址', 'icon' => $img_host . 'user_icons/user_addr.png', 'type' => 'page', 'path' => '/pages/address/userAddress/userAddress','command'=>'user_addr'], - ['name' => '当面付订单查询', 'icon' => $img_host . 'user_icons/offline_orders.png', 'type' => 'page', 'path' => '/pages/faceOrderList/faceOrderList','command'=>'offline_orders'], + ['name' => '当面付订单查询', 'icon' => $img_host . 'user_icons/offline_orders.png', 'type' => 'page', 'path' => '/pages/facepay/facepay','command'=>'offline_orders'], ['name' => '在线客服', 'icon' => $img_host . 'user_icons/online_kf.png', 'type' => 'page', 'path' => '','command'=>'online_kf'], ['name' => '联系服务站', 'icon' => $img_host . 'user_icons/contact_fwz.png', 'type' => 'page', 'path' => '/pages/contactMarket/contactMarket','command'=>'contact_fwz'], ['name' => '关于懒族', 'icon' => $img_host . 'user_icons/about_lz.png', 'type' => 'page', 'path' => '/pages/aboutUs/aboutUs','command'=>'about'], @@ -43,25 +43,33 @@ class UserCenterBlockService implements UserCenterBlockServiceInterface ] ]; + $blocks[] = [ + 'type' => 'store_user', + 'title' => '商户相关', + 'items' => [ + ['name' => '商家入口', 'icon' => $img_host . 'user_icons/shop_enter.png', 'type' => 'page', 'path' => '/pages/shopLogin/shopLogin','command'=>'store_login'] + ] + ]; + foreach ($roles as $key => $item) { # code... - if($item['key'] == 'store'){ - $blocks[] = [ - 'type' => 'store_user', - 'title' => '商户相关', - 'items' => [ - ['name' => '商家入口', 'icon' => $img_host . 'user_icons/shop_enter.png', 'type' => 'page', 'path' => '/pages/shopLogin/shopLogin','command'=>'store_login'] - ] - ]; - } + // if($item['key'] == 'store'){ + // $blocks[] = [ + // 'type' => 'store_user', + // 'title' => '商户相关', + // 'items' => [ + // ['name' => '商家入口', 'icon' => $img_host . 'user_icons/shop_enter.png', 'type' => 'page', 'path' => '/pages/shopLogin/shopLogin','command'=>'store_login'] + // ] + // ]; + // } if($item['key'] == 'sp'){ $blocks[] = [ 'type' => 'sp_user', 'title' => '服务专员', 'items' => [ - ['name' => '评价', 'icon' => $img_host . 'user_icons/shop_enter.png', 'type' => 'page', 'path' => '/zh_cjdianc/pages/appraise/index','command'=>'store_login'] + ['name' => '评价', 'icon' => $img_host . 'user_icons/shop_enter.png', 'type' => 'page', 'path' => '/zh_cjdianc/pages/appraise/index?service_personnel_id='.$item['data']['id'],'command'=>'sp_login'] ] ]; } diff --git a/app/Service/v3/Interfaces/OrderListServiceInterface.php b/app/Service/v3/Interfaces/OrderListServiceInterface.php index a3feb77..4a24373 100644 --- a/app/Service/v3/Interfaces/OrderListServiceInterface.php +++ b/app/Service/v3/Interfaces/OrderListServiceInterface.php @@ -8,7 +8,7 @@ interface OrderListServiceInterface public function check(); public function undo(); public function onlineByUser($userId, $tab, $page=1, $pagesize=10); - public function onlineByStore($userId, $tab, $page, $pagesize); - public function offlineByStore($userId, $tab, $page, $pagesize,$start_time = '',$end_time = ''); + public function onlineByStore($storeId, $tab, $page, $pagesize); + public function offlineByStore($storeId, $tab, $page, $pagesize,$startTime = '',$endTime = ''); public function offlineByUser($userId, $page=1, $pagesize=10); } \ No newline at end of file