diff --git a/app/common/repositories/system/merchant/MerchantCategoryRepository.php b/app/common/repositories/system/merchant/MerchantCategoryRepository.php index eb47a4d4..34d596b5 100644 --- a/app/common/repositories/system/merchant/MerchantCategoryRepository.php +++ b/app/common/repositories/system/merchant/MerchantCategoryRepository.php @@ -84,7 +84,7 @@ class MerchantCategoryRepository extends BaseRepository $form = Elm::createForm($action, [ Elm::input('category_name', '分类名称')->required(), Elm::number('commission_rate', '手续费(%)', 0)->required()->max(100)->precision(2), - Elm::uploadImage('background', '背景图', 'test')->required(), + Elm::frameImage('background', '背景图', '/' . config('admin.admin_prefix') . '/setting/uploadPicture?field=background&type=1')->width('896px')->height('480px')->props(['footer' => false])->modal(['modal' => false, 'custom-class' => 'suibian-modal']), Elm::textarea('description', '简介')->required(), ]); diff --git a/app/controller/api/Common.php b/app/controller/api/Common.php index c404164f..f5c88325 100644 --- a/app/controller/api/Common.php +++ b/app/controller/api/Common.php @@ -497,7 +497,7 @@ class Common extends BaseController $find=DB::name('merchant')->alias('m')->where('m.type_id',11)->where('m.is_del',0)->where('m.status',1) ->join('merchant_address a','a.mer_id=m.mer_id and a.street_id='.$street_code) ->join('merchant_category c','m.category_id=c.merchant_category_id') - ->field('m.mer_id,category_id,category_name')->select(); + ->field('m.mer_id,category_id,category_name,c.background,c.description')->select(); return app('json')->success($find??[]); } } diff --git a/app/controller/api/store/order/StoreCart.php b/app/controller/api/store/order/StoreCart.php index 43e6124b..f02441a8 100644 --- a/app/controller/api/store/order/StoreCart.php +++ b/app/controller/api/store/order/StoreCart.php @@ -116,7 +116,7 @@ class StoreCart extends BaseController //更新购物车 $cart_id = $cart['cart_id']; $cart_num = ['cart_num' => ($cart['cart_num'] + $data['cart_num'])]; - if ($entryMerId) { + if ($entryMerId && $entryMerId != $result['product']['mer_id']) { $cart_num['source_id'] = $entryMerId; $cart_num['source'] = StoreCartDao::SOURCE_CLOUD; } @@ -125,7 +125,7 @@ class StoreCart extends BaseController //添加购物车 $data['uid'] = $this->request->uid(); $data['mer_id'] = $result['product']['mer_id']; - if ($entryMerId) { + if ($entryMerId && $entryMerId != $result['product']['mer_id']) { $data['source_id'] = $entryMerId; $data['source'] = StoreCartDao::SOURCE_CLOUD; }