From 6c9d61fac7d3474e05a096cb2bcaf9dc4e5e7880 Mon Sep 17 00:00:00 2001 From: fengxinyhyl Date: Tue, 18 Jun 2024 11:11:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/merchant/MerchantTypeRepository.php | 2 ++ app/controller/admin/system/merchant/Merchant.php | 15 ++++++++++++++- app/controller/api/store/product/StoreSpu.php | 2 +- public/system.html | 2 +- .../src/views/accounts/capitalFlow/index.vue | 6 +++--- 5 files changed, 21 insertions(+), 6 deletions(-) diff --git a/app/common/repositories/system/merchant/MerchantTypeRepository.php b/app/common/repositories/system/merchant/MerchantTypeRepository.php index 87595f7..3de01c0 100644 --- a/app/common/repositories/system/merchant/MerchantTypeRepository.php +++ b/app/common/repositories/system/merchant/MerchantTypeRepository.php @@ -20,6 +20,7 @@ use app\common\repositories\system\RelevanceRepository; use FormBuilder\Factory\Elm; use think\exception\ValidateException; use think\facade\Db; +use think\facade\Log; use think\facade\Route; /** @@ -134,6 +135,7 @@ class MerchantTypeRepository extends BaseRepository array_push($ids, $id); } $auth = app()->make(MenuRepository::class)->getAllOptions(1, true, compact('ids')); + Log::info("detail_auth".json_encode($auth)); $options = formatTree($auth, 'menu_name'); } diff --git a/app/controller/admin/system/merchant/Merchant.php b/app/controller/admin/system/merchant/Merchant.php index 920389e..4cdd8d7 100644 --- a/app/controller/admin/system/merchant/Merchant.php +++ b/app/controller/admin/system/merchant/Merchant.php @@ -15,6 +15,7 @@ namespace app\controller\admin\system\merchant; 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\MerchantTypeRepository; use app\common\repositories\user\UserAssetsRepository; @@ -250,12 +251,24 @@ class Merchant extends BaseController $adminInfo = $adminRepository->merIdByAdmin($id); $tokenInfo = $adminRepository->createToken($adminInfo); $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']); $data = [ 'token' => $tokenInfo['token'], 'exp' => $tokenInfo['out'], 'admin' => $admin, - 'url' => '/' . config('admin.merchant_prefix').'/product/list' + 'url' => '/' . config('admin.merchant_prefix').$url ]; return app('json')->success($data); diff --git a/app/controller/api/store/product/StoreSpu.php b/app/controller/api/store/product/StoreSpu.php index 6e65439..009ab64 100644 --- a/app/controller/api/store/product/StoreSpu.php +++ b/app/controller/api/store/product/StoreSpu.php @@ -68,7 +68,7 @@ class StoreSpu extends BaseController $where['is_good'] = 1; } $where['order'] = $where['order'] ?: 'rank'; - if ($where['is_trader'] != 1) unset($where['is_trader']); +// if ($where['is_trader'] != 1) unset($where['is_trader']); $data = $this->repository->getApiSearch($where, $page, $limit, $this->userInfo); return app('json')->success($data); } diff --git a/public/system.html b/public/system.html index f30d063..028ceb7 100644 --- a/public/system.html +++ b/public/system.html @@ -1,3 +1,3 @@ -加载中...
\ No newline at end of file diff --git a/view/admin/src/views/accounts/capitalFlow/index.vue b/view/admin/src/views/accounts/capitalFlow/index.vue index 09d9f89..be71ad8 100644 --- a/view/admin/src/views/accounts/capitalFlow/index.vue +++ b/view/admin/src/views/accounts/capitalFlow/index.vue @@ -41,7 +41,7 @@ 列表导出 - + @@ -185,7 +185,7 @@ export default { if (lebData.export.length) { data = data.concat(lebData.export) excelData.page++ - } + } } createWorkBook(lebData.header, lebData.title, data, lebData.foot,lebData.filename); return @@ -193,7 +193,7 @@ export default { /**资金流水 */ downData(excelData) { return new Promise((resolve, reject) => { - fundingRecordsExportApi(excelData).then((res) => { + capitalFlowExportApi(excelData).then((res) => { return resolve(res.data) }) })