generated from liutk/owl-admin-base
admin 门店坐标
parent
6fd52e9dc0
commit
b3f164c23f
|
|
@ -113,10 +113,10 @@ class StoreController extends AdminController
|
|||
->showSteps(false)
|
||||
->required(),
|
||||
amis()->InputCityControl()->name('region')->label(__('store.region'))->allowDistrict(false)->extractValue(false)->required(),
|
||||
amis()->TextControl()->name('location.address')->label(__('store.address'))->required(),
|
||||
amis()->TextControl()->name('address')->label(__('store.address'))->required(),
|
||||
amis()->GroupControl()->label(__('store.location'))->body([
|
||||
amis()->TextControl()->name('location.lng')->placeholder('106.65781638883')->label(false),
|
||||
amis()->TextControl()->name('location.lat')->placeholder('29.033745284277')->label(false),
|
||||
amis()->TextControl()->name('lon')->placeholder('106.65781638883')->label(false),
|
||||
amis()->TextControl()->name('lat')->placeholder('29.033745284277')->label(false),
|
||||
])->description('参考: <a href="https://api.map.baidu.com/lbsapi/getpoint/index.html" target="_blank">https://api.map.baidu.com/lbsapi/getpoint/index.html</a>')->required(),
|
||||
// amis()->LocationControl()->name('location')->label(__('store.location'))->coordinatesType('gcj02')->ak(config('baidu.js_secret'))->autoSelectCurrentLoc()->required(),
|
||||
]);
|
||||
|
|
@ -132,7 +132,8 @@ class StoreController extends AdminController
|
|||
['label' => __('store.business_id'), 'content' => '${business.name}'],
|
||||
['label' => __('store.level_id'), 'content' => '${level.name}'],
|
||||
['label' => __('store.region'), 'content' => '${region.province}-${region.city}'],
|
||||
['label' => __('store.address'), 'content' => '${address}', 'span' => 2],
|
||||
['label' => __('store.address'), 'content' => '${address}'],
|
||||
['label' => __('store.location'), 'content' => '${lon},${lat}'],
|
||||
['label' => __('store.profit_ratio'), 'content' => '${profit_ratio}%', 'span' => 3],
|
||||
]);
|
||||
|
||||
|
|
|
|||
|
|
@ -100,17 +100,6 @@ class StoreService extends BaseService
|
|||
return true;
|
||||
}
|
||||
|
||||
public function resloveData($data, $model = null)
|
||||
{
|
||||
if (isset($data['location'])) {
|
||||
$data['lon'] = data_get($data['location'], 'lng');
|
||||
$data['lat'] = data_get($data['location'], 'lat');
|
||||
$data['address'] = data_get($data['location'], 'address');
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function validate($data, $model = null)
|
||||
{
|
||||
$createRules = [
|
||||
|
|
|
|||
Loading…
Reference in New Issue