shish 11 달 전
부모
커밋
b185ff5f5e
1개의 변경된 파일6개의 추가작업 그리고 3개의 파일을 삭제
  1. 6 3
      app-mall/controllers/OrderController.php

+ 6 - 3
app-mall/controllers/OrderController.php

@@ -20,6 +20,7 @@ use bizMall\user\services\UserService;
 use common\components\dateUtil;
 use common\components\dict;
 use common\components\httpUtil;
+use common\components\imgUtil;
 use common\components\noticeUtil;
 use common\components\orderSn;
 use common\components\stringUtil;
@@ -382,11 +383,13 @@ class OrderController extends BaseController
         $regionTree = RegionService::tree();
 
         //门店名称
-        $shop = isset($this->shop) && !empty($this->shop) ? $this->shop->attributes : [];
+        $shop = !empty($this->shop) ? $this->shop->attributes : [];
         $sjName = $shop['merchantName'] ?? '';
         $shopName = $shop['shopName'] ?? '';
-        $default = $shop['default'] ?? 0;
-        $shop['showName'] = $default == 1 && $shopName == '首店' ? $sjName : $sjName . ' ' . $shopName;
+        $shop['showName'] = $shopName == '首店' ? $sjName : $sjName . ' ' . $shopName;
+        $avatar = $shop['avatar'] ?? '';
+        $smallAvatar = imgUtil::groupImg($avatar) . "?x-oss-process=image/resize,m_fill,h_130,w_130";
+        $shop['smallAvatar'] = $smallAvatar;
 
         $freight = ['first' => 5, 'add' => 2];
         $mapKey = 'OFWBZ-2NTHP-EHNDD-LKWQY-GANM7-PXBJH';