ztt 9 months ago
parent a09683a219
commit 2d1744746b
  1. 2
      app/api/model/RecoveryOrder.php
  2. 12
      app/store/controller/Shop.php

@ -138,7 +138,7 @@ class RecoveryOrder extends BaseRecoveryOrder
$query = self::where('order_status', '=', $type);
// 非店长不带入user_id查询
if (!UserService::isStore()) {
$query = self::where('user_id', '=', $userId);
$query = $query->where('user_id', '=', $userId);
}
return $query->count();
}

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

Loading…
Cancel
Save