'user', 'title' => '常用功能', 'items' => [ ['name' => '收货地址', 'icon' => $img_host . 'user_icons/user_addr2.png', 'type' => 'page', 'path' => '/pages/address/userAddress/userAddress','command'=>'user_addr'], ['name' => '当面付订单查询', 'icon' => $img_host . 'user_icons/offline_orders2.png', 'type' => 'page', 'path' => '/pages/facepay/facepay','command'=>'offline_orders'], ['name' => '在线客服', 'icon' => $img_host . 'user_icons/online_kf2.png', 'type' => 'page', 'path' => '','command'=>'online_kf'], ['name' => '联系服务站', 'icon' => $img_host . 'user_icons/contact_fwz2.png', 'type' => 'page', 'path' => '/pages/contactMarket/contactMarket','command'=>'contact_fwz'], ['name' => '关于华华', 'icon' => $img_host . 'user_icons/about_lz3.png', 'type' => 'page', 'path' => '/pages/aboutUs/aboutUs','command'=>'about'], ] ] ]; $blocks[] = [ 'type' => 'store_user', 'title' => '商家相关', 'items' => [ ['name' => '商家入口', 'icon' => $img_host . 'user_icons/shop_enter2.png', 'type' => 'page', 'path' => '/pages/shopLogin/shopLogin','command'=>'store_login'] ] ]; foreach ($roles as $key => $item) { # code... // if($item['key'] == 'store'){ // $goodsEditor = [ // 'name' => '商品管理', 'icon' => $img_host . 'user_icons/service2.png', // 'type' => 'webview', // 'path' => 'http://localhost:8080/#/pages/goodsManagement/goodsManagement?market_id='.$item['data']['market_id'].'&user_id='.$item['data']['user_id'].'&store_id='.$item['data']['id'], // 'command'=>'sp_login' // ]; // array_push($blocks[1]['items'],$goodsEditor); // } if($item['key'] == 'sp'){ $tags = []; if(in_array(29,$item['data']['position'])){ array_push($tags, [ 'name' => '骑手端', 'icon' => $img_host . 'user_icons/service2.png', 'type' => 'page', 'path' => '/pages/deliverymanOrders/deliverymanOrders?employees_id='.$item['data']['id'], 'command'=>'sp_login' ] ); } if(in_array(30,$item['data']['position'])){ $personalId = ServicePersonnel::query()->where('user_id',$item['data']['user_id'])->value('id'); array_push($tags, [ 'name' => '评价', 'icon' => $img_host . 'user_icons/service2.png', 'type' => 'page', 'path' => '/zh_cjdianc/pages/appraise/index?service_personnel_id='.$personalId,'command'=>'sp_login' ], [ 'name' => '商品管理', 'icon' => $img_host . 'user_icons/service2.png', 'type' => 'page', 'path' => '/pages/shopList/shopList?personal_id='.$personalId, 'command'=>'sp_login' ] ); } $blocks[] = [ 'type' => 'sp_user', 'title' => '服务专员', 'items' => $tags ]; } } return $blocks; } }