Просмотр исходного кода

【程序目录】优化缩略图显示问题

evoxwht 3 лет назад
Родитель
Сommit
321ae3f4b9

+ 1 - 1
crmeb/app/api/controller/v1/activity/StoreIntegralController.php

@@ -29,7 +29,7 @@ class StoreIntegralController
         $where = ['is_show' => 1];
         $where = ['is_show' => 1];
         $where['is_host'] = 1;
         $where['is_host'] = 1;
         $data['list'] = $this->services->getIntegralList($where);
         $data['list'] = $this->services->getIntegralList($where);
-        return app('json')->successful(get_thumb_water($data, 'mid'));
+        return app('json')->successful(get_thumb_water($data, 'big'));
     }
     }
 
 
     /**
     /**

+ 1 - 5
crmeb/app/api/controller/v1/store/StoreProductController.php

@@ -69,10 +69,6 @@ class StoreProductController
         }
         }
         $type = 'big';
         $type = 'big';
         $field = ['image', 'recommend_image'];
         $field = ['image', 'recommend_image'];
-        if ($where['store_name']) {
-            $type = 'big';
-            $field = ['image'];
-        }
         $list = $this->services->getGoodsList($where, (int)$request->uid());
         $list = $this->services->getGoodsList($where, (int)$request->uid());
         return app('json')->successful(get_thumb_water($list, $type, $field));
         return app('json')->successful(get_thumb_water($list, $type, $field));
     }
     }
@@ -205,7 +201,7 @@ class StoreProductController
         /** @var StoreProductReplyServices $replyService */
         /** @var StoreProductReplyServices $replyService */
         $replyService = app()->make(StoreProductReplyServices::class);
         $replyService = app()->make(StoreProductReplyServices::class);
         $list = $replyService->getProductReplyList($id, $type);
         $list = $replyService->getProductReplyList($id, $type);
-        return app('json')->successful(get_thumb_water($list, 'small', ['pics']));
+        return app('json')->successful(get_thumb_water($list, 'mid', ['pics']));
     }
     }
 
 
     /**
     /**

+ 1 - 1
crmeb/app/services/message/service/StoreServiceLogServices.php

@@ -135,7 +135,7 @@ class StoreServiceLogServices extends BaseServices
                 ['is_del', '=', 0],
                 ['is_del', '=', 0],
                 ['is_show', '=', 1],
                 ['is_show', '=', 1],
             ];
             ];
-            $productList = get_thumb_water($productServices->getProductArray($where, '*', 'id'));
+            $productList = get_thumb_water($productServices->getProductArray($where, '*', 'id'),'mid');
         }
         }
         /** @var StoreOrderServices $orderServices */
         /** @var StoreOrderServices $orderServices */
         $orderServices = app()->make(StoreOrderServices::class);
         $orderServices = app()->make(StoreOrderServices::class);

+ 1 - 1
crmeb/app/services/pc/UserServices.php

@@ -79,7 +79,7 @@ class UserServices extends BaseServices
                 $list[$k]['price'] = $product['product']['price'] ?? 0;
                 $list[$k]['price'] = $product['product']['price'] ?? 0;
                 $list[$k]['ot_price'] = $product['product']['ot_price'] ?? 0;
                 $list[$k]['ot_price'] = $product['product']['ot_price'] ?? 0;
                 $list[$k]['sales'] = $product['product']['sales'] ?? 0;
                 $list[$k]['sales'] = $product['product']['sales'] ?? 0;
-                $list[$k]['image'] = get_thumb_water($product['product']['image'] ?? 0);
+                $list[$k]['image'] = get_thumb_water($product['product']['image'] ?? 0, 'mid');
                 $list[$k]['is_del'] = $product['product']['is_del'] ?? 0;
                 $list[$k]['is_del'] = $product['product']['is_del'] ?? 0;
                 $list[$k]['is_show'] = $product['product']['is_show'] ?? 0;
                 $list[$k]['is_show'] = $product['product']['is_show'] ?? 0;
                 $list[$k]['is_fail'] = $product['product']['is_del'] && $product['product']['is_show'];
                 $list[$k]['is_fail'] = $product['product']['is_del'] && $product['product']['is_show'];

+ 2 - 2
crmeb/app/services/product/product/StoreProductServices.php

@@ -1668,7 +1668,7 @@ class StoreProductServices extends BaseServices
      * @param string $type
      * @param string $type
      * @return array[]
      * @return array[]
      */
      */
-    public function getRecommendProductArr(int $uid, array $fields, bool $is_num = true, string $type = 'small')
+    public function getRecommendProductArr(int $uid, array $fields, bool $is_num = true, string $type = 'mid')
     {
     {
         $baseList = $firstList = $benefitList = $hotList = $vipList = [];
         $baseList = $firstList = $benefitList = $hotList = $vipList = [];
         $data = [$baseList, $firstList, $benefitList, $hotList, $vipList];
         $data = [$baseList, $firstList, $benefitList, $hotList, $vipList];
@@ -1756,7 +1756,7 @@ class StoreProductServices extends BaseServices
      * @throws \think\db\exception\DbException
      * @throws \think\db\exception\DbException
      * @throws \think\db\exception\ModelNotFoundException
      * @throws \think\db\exception\ModelNotFoundException
      */
      */
-    public function getRecommendProduct(int $uid, $field, int $num = 0, string $type = 'small')
+    public function getRecommendProduct(int $uid, $field, int $num = 0, string $type = 'mid')
     {
     {
         [$page, $limit] = $this->getPageValue();
         [$page, $limit] = $this->getPageValue();
         $where['vip_user'] = $uid ? app()->make(UserServices::class)->value(['uid' => $uid], 'is_money_level') : 0;
         $where['vip_user'] = $uid ? app()->make(UserServices::class)->value(['uid' => $uid], 'is_money_level') : 0;

+ 0 - 5
crmeb/crmeb/utils/JwtAuth.php

@@ -95,11 +95,6 @@ class JwtAuth
     {
     {
         $tokenInfo = $this->getToken($id, $type, $params);
         $tokenInfo = $this->getToken($id, $type, $params);
         $exp = $tokenInfo['params']['exp'] - $tokenInfo['params']['iat'] + 60;
         $exp = $tokenInfo['params']['exp'] - $tokenInfo['params']['iat'] + 60;
-        if (in_array($type, ['api', 'wechat', 'routine'])) {
-            $type = 'api' . $id;
-        } else {
-            $type = 'admin';
-        }
         $res = CacheService::setTokenBucket(md5($tokenInfo['token']), ['uid' => $id, 'type' => $type, 'token' => $tokenInfo['token'], 'exp' => $exp], (int)$exp, $type);
         $res = CacheService::setTokenBucket(md5($tokenInfo['token']), ['uid' => $id, 'type' => $type, 'token' => $tokenInfo['token'], 'exp' => $exp], (int)$exp, $type);
         if (!$res) {
         if (!$res) {
             throw new AdminException(ApiErrorCode::ERR_SAVE_TOKEN);
             throw new AdminException(ApiErrorCode::ERR_SAVE_TOKEN);