|
|
|
@ -12,7 +12,7 @@ declare (strict_types=1); |
|
|
|
|
|
|
|
|
|
namespace app\store\controller; |
|
|
|
|
|
|
|
|
|
use app\api\model\UploadFile; |
|
|
|
|
use app\common\model\UploadFile; |
|
|
|
|
use app\common\library\helper; |
|
|
|
|
use think\response\Json; |
|
|
|
|
use app\store\model\store\Shop as ShopModel; |
|
|
|
@ -60,8 +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'); |
|
|
|
|
$file = UploadFile::whereIn('file_id',explode(',',$detail['shop_image_id']))->field('*')->select(); |
|
|
|
|
$detail['shop_image_url'] = $file; |
|
|
|
|
// 获取logoImage (这里不能用with因为编辑页需要logoImage对象) |
|
|
|
|
!empty($detail) && $detail['logoImage']; |
|
|
|
|
return $this->renderSuccess(compact('detail')); |
|
|
|
@ -129,4 +129,10 @@ class Shop extends Controller |
|
|
|
|
} |
|
|
|
|
return $this->renderError($model->getError() ?: '失败'); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public function test(int $shopId) { |
|
|
|
|
// 门店详情 |
|
|
|
|
$model = ShopModel::detail($shopId); |
|
|
|
|
dd($model['logoImage']->toArray()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|