后台门店管理调整

wysf
ztt 11 months ago
parent e6172eec0f
commit 533a968201
  1. 4
      app/store/controller/Shop.php
  2. 4
      app/store/model/store/Shop.php

@ -12,6 +12,8 @@ declare (strict_types=1);
namespace app\store\controller;
use app\api\model\UploadFile;
use app\common\library\helper;
use think\response\Json;
use app\store\model\store\Shop as ShopModel;
use app\common\model\store\ShopParking as ParkingModel;
@ -58,6 +60,8 @@ class Shop extends Controller
{
// 获取门店详情
$detail = ShopModel::detail($shopId);
$file = UploadFile::whereIn('file_id',explode(',',$detail['shop_image_id']))->select();
$detail['shop_image_url'] = helper::getArrayColumn($file, 'preview_url');
// 获取logoImage (这里不能用with因为编辑页需要logoImage对象)
!empty($detail) && $detail['logoImage'];
return $this->renderSuccess(compact('detail'));

@ -124,6 +124,10 @@ class Shop extends ShopModel
$coordinate = explode(',', $data['coordinate']);
$data['latitude'] = $coordinate[0];
$data['longitude'] = $coordinate[1];
// 格式化停车场坐标信息
$parking_coordinate = explode(',', $data['parking_coordinate']);
$data['parking_latitude'] = $parking_coordinate[0];
$data['parking_longitude'] = $parking_coordinate[1];
// 生成geohash
$data['geohash'] = (new Geohash)->encode($data['longitude'], $data['latitude']);
// 省市区ID

Loading…
Cancel
Save