|
|
|
@ -47,28 +47,22 @@ class UserCenterBlockService implements UserCenterBlockServiceInterface |
|
|
|
'type' => 'store_user', |
|
|
|
'title' => '商家相关', |
|
|
|
'items' => [ |
|
|
|
['name' => '商家入口', 'icon' => $img_host . 'user_icons/shop_enter2.png', 'type' => 'page', 'path' => '/pages/shopLogin/shopLogin','command'=>'store_login'], |
|
|
|
[ |
|
|
|
'name' => '商品管理', 'icon' => $img_host . 'user_icons/service2.png', |
|
|
|
'type' => 'webview', |
|
|
|
'path' => 'http://localhost:8080/#/pages/goodsManagement/goodsManagement?market_id=1&user_id=694&store_id=5', |
|
|
|
'command'=>'sp_login' |
|
|
|
] |
|
|
|
['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'){
|
|
|
|
// $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'){ |
|
|
|
$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'){ |
|
|
|
$blocks[] = [ |
|
|
|
@ -79,7 +73,7 @@ class UserCenterBlockService implements UserCenterBlockServiceInterface |
|
|
|
[ |
|
|
|
'name' => '商品管理', 'icon' => $img_host . 'user_icons/service2.png', |
|
|
|
'type' => 'webview', |
|
|
|
'path' => 'http://localhost:8080/#/pages/index/index?user_id=680&personal_id=68', |
|
|
|
'path' => 'http://localhost:8080/#/pages/index/index?user_id='.$item['data']['user_id'].'&personal_id='.$item['data']['id'], |
|
|
|
'command'=>'sp_login' |
|
|
|
] |
|
|
|
] |
|
|
|
|