Merge branch 'dev' of https://gitea.lihaink.cn/mkm/shop-new into dev
This commit is contained in:
commit
92d4f7263a
@ -331,4 +331,41 @@ class Merchant extends BaseController
|
|||||||
return app('json')->success('修改成功');
|
return app('json')->success('修改成功');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public function info(MerchantTakeRepository $repository)
|
||||||
|
{
|
||||||
|
$id = $this->request->param('id');
|
||||||
|
if (empty($id)) {
|
||||||
|
return app('json')->fail('参数错误');
|
||||||
|
}
|
||||||
|
$merchant = app()->make(MerchantRepository::class)->search(['mer_id' => $id])->find();
|
||||||
|
|
||||||
|
// $data = Db::name('merchant')->where('mer_id', $id)->find();
|
||||||
|
$merchant['mer_certificate'] = merchantConfig($id, 'mer_certificate');
|
||||||
|
// $data['mer_certificate'] = $data['mer_certificate'][0] ?? '';
|
||||||
|
$append = ['merchantCategory', 'merchantType', 'mer_certificate'];
|
||||||
|
if ($merchant['is_margin'] == -10)
|
||||||
|
$append[] = 'refundMarginOrder';
|
||||||
|
|
||||||
|
$data = $merchant->append($append)->hidden(['mark', 'reg_admin_id', 'sort','financial_bank'])->toArray();
|
||||||
|
$delivery = $repository->get($id) + systemConfig(['tx_map_key']);
|
||||||
|
$data = array_merge($data, $delivery);
|
||||||
|
$data['sys_bases_status'] = systemConfig('sys_bases_status') === '0' ? 0 : 1;
|
||||||
|
$data['type_code'] = Db::name('MerchantType')->where('mer_type_id', $data['type_id'])->value('type_code');
|
||||||
|
return app('json')->success($data);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ class MerchantUpdateValidate extends Validate
|
|||||||
'mer_address|店铺地址' => 'require|max:128',
|
'mer_address|店铺地址' => 'require|max:128',
|
||||||
'long|店铺经度' => 'max:24',
|
'long|店铺经度' => 'max:24',
|
||||||
'lat|店铺纬度' => 'max:24',
|
'lat|店铺纬度' => 'max:24',
|
||||||
'services_type|联系客服方式' => 'require|in:0,1',
|
// 'services_type|联系客服方式' => 'require|in:0,1',
|
||||||
];
|
];
|
||||||
|
|
||||||
protected function isPhone($val)
|
protected function isPhone($val)
|
||||||
|
@ -540,6 +540,7 @@ Route::group('api/', function () {
|
|||||||
Route::get('/local', 'Merchant/localLst');
|
Route::get('/local', 'Merchant/localLst');
|
||||||
//编辑商户信息
|
//编辑商户信息
|
||||||
Route::post('update', 'Merchant/update');
|
Route::post('update', 'Merchant/update');
|
||||||
|
Route::get('info', 'Merchant/info');
|
||||||
})->prefix('api.store.merchant.');
|
})->prefix('api.store.merchant.');
|
||||||
Route::post('store/certificate/:merId', 'api.Auth/getMerCertificate');
|
Route::post('store/certificate/:merId', 'api.Auth/getMerCertificate');
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user