调整加入购物车参数

This commit is contained in:
luofei 2023-05-25 10:38:03 +08:00
parent c4e1ee67d3
commit dbf8ab42f5
3 changed files with 4 additions and 4 deletions

View File

@ -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(),
]);

View File

@ -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??[]);
}
}

View File

@ -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;
}