From b486615bcc4cf83888ba96ac8604978ee7252807 Mon Sep 17 00:00:00 2001 From: wang hou sheng <76928547+wanghousheng@users.noreply.github.com> Date: Sun, 21 Apr 2024 20:14:04 +0800 Subject: [PATCH] 1 --- app/api/controller/Store.php | 9 +++++++-- app/common/model/WxwholesalerAccount.php | 8 ++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 app/common/model/WxwholesalerAccount.php diff --git a/app/api/controller/Store.php b/app/api/controller/Store.php index d9d7edcb..b95203aa 100644 --- a/app/api/controller/Store.php +++ b/app/api/controller/Store.php @@ -17,6 +17,7 @@ use app\api\service\User as UserService; use app\api\validate\store\Store as StoreValidte; use app\common\model\PriceSet; use app\common\model\Store as StoreInfoModel; +use app\common\model\UploadFile; use app\store\model\store\Address as AddressModel; use think\db\exception\DataNotFoundException; use think\db\exception\DbException; @@ -113,8 +114,12 @@ class Store extends Controller public function getStoreInfo(): Json { $storeid = request()->header()['storeid']; - $info = StoreInfoModel::detail(intval($storeid)); - return $this->renderSuccess(compact('info')); + $info = StoreInfoModel::where('store_id', $storeid)->find()->toArray(); + $file = UploadFile::where('file_id', $info['group_share_img_id'])->field('file_path,domain')->find(); + $info['group_share_img'] = $file['preview_url']; + $file = UploadFile::where('file_id', $info['logo_image_id'])->field('file_path,domain')->find(); + $info['logo_image'] = $file['preview_url']; + return $this->renderSuccess($info); } /** diff --git a/app/common/model/WxwholesalerAccount.php b/app/common/model/WxwholesalerAccount.php new file mode 100644 index 00000000..2eea6c67 --- /dev/null +++ b/app/common/model/WxwholesalerAccount.php @@ -0,0 +1,8 @@ +