|
|
@ -15,6 +15,7 @@ namespace app\controller\admin\system\merchant; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
use app\common\repositories\store\product\ProductCopyRepository; |
|
|
|
use app\common\repositories\store\product\ProductCopyRepository; |
|
|
|
|
|
|
|
use app\common\repositories\system\auth\MenuRepository; |
|
|
|
use app\common\repositories\system\merchant\FinancialRecordRepository; |
|
|
|
use app\common\repositories\system\merchant\FinancialRecordRepository; |
|
|
|
use app\common\repositories\system\merchant\MerchantTypeRepository; |
|
|
|
use app\common\repositories\system\merchant\MerchantTypeRepository; |
|
|
|
use app\common\repositories\user\UserAssetsRepository; |
|
|
|
use app\common\repositories\user\UserAssetsRepository; |
|
|
@ -250,12 +251,24 @@ class Merchant extends BaseController |
|
|
|
$adminInfo = $adminRepository->merIdByAdmin($id); |
|
|
|
$adminInfo = $adminRepository->merIdByAdmin($id); |
|
|
|
$tokenInfo = $adminRepository->createToken($adminInfo); |
|
|
|
$tokenInfo = $adminRepository->createToken($adminInfo); |
|
|
|
$admin = $adminInfo->toArray(); |
|
|
|
$admin = $adminInfo->toArray(); |
|
|
|
|
|
|
|
$merchant = $this->repository->get($id); |
|
|
|
|
|
|
|
$typeMenu = (app(MerchantTypeRepository::class))->detail($merchant['type_id']); |
|
|
|
|
|
|
|
Log::info("merchant_type".json_encode($typeMenu)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
$menuId = $typeMenu['options'][0]['children'][0]['id']; |
|
|
|
|
|
|
|
$menu = \app(MenuRepository::class)->get($menuId); |
|
|
|
|
|
|
|
$url = $menu['route']; |
|
|
|
|
|
|
|
}catch (\Throwable $e){ |
|
|
|
|
|
|
|
$url = "/product/list"; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
Log::info("merchant_type_info".$typeMenu['options'][0]['children'][0]['id']); |
|
|
|
unset($admin['pwd']); |
|
|
|
unset($admin['pwd']); |
|
|
|
$data = [ |
|
|
|
$data = [ |
|
|
|
'token' => $tokenInfo['token'], |
|
|
|
'token' => $tokenInfo['token'], |
|
|
|
'exp' => $tokenInfo['out'], |
|
|
|
'exp' => $tokenInfo['out'], |
|
|
|
'admin' => $admin, |
|
|
|
'admin' => $admin, |
|
|
|
'url' => '/' . config('admin.merchant_prefix').'/product/list' |
|
|
|
'url' => '/' . config('admin.merchant_prefix').$url |
|
|
|
]; |
|
|
|
]; |
|
|
|
|
|
|
|
|
|
|
|
return app('json')->success($data); |
|
|
|
return app('json')->success($data); |
|
|
|