shish 4 年 前
コミット
b8f3377324
1 ファイル変更13 行追加3 行削除
  1. 13 3
      app-ghs/controllers/XjController.php

+ 13 - 3
app-ghs/controllers/XjController.php

@@ -20,14 +20,24 @@ class XjController extends BaseController
         util::success(['list' => $list]);
     }
 
-    //取出商家小菊 shish 20210904
+    //取出商家上架的小菊 shish 20210904
     public function actionGetSjXj()
     {
-        $list = XjClass::getSjXj($this->shopExt);
+        $list = XjClass::getAllByCondition(['shopId' => $this->shopId, 'delStatus' => 0, 'status' => 1], null, '*');
+        if (!empty($list)) {
+            foreach ($list as $key => $val) {
+                $shortCover = $val['cover'] ?? '';
+                $cover = imgUtil::groupImg($shortCover) . "?x-oss-process=image/resize,m_fill,h_130,w_130";
+                $bigCover = imgUtil::groupImg($shortCover) . "?x-oss-process=image/resize,m_fill,h_700,w_700";
+                $list[$key]['cover'] = $cover;
+                $list[$key]['bigCover'] = $bigCover;
+                $list[$key]['shortCover'] = $shortCover;
+            }
+        }
         util::success(['list' => $list]);
     }
 
-    //取出所有小菊,带商家有没有标识 shish 20210904
+    //取出商家所有小菊 shish 20210904
     public function actionGetFilterXj()
     {
         $list = XjClass::getAllByCondition(['shopId' => $this->shopId, 'delStatus' => 0], null, '*');