mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-10-29 05:50:50 +00:00
【程序目录】优化缩略图显示问题
This commit is contained in:
parent
93623d6919
commit
321ae3f4b9
@ -29,7 +29,7 @@ class StoreIntegralController
|
||||
$where = ['is_show' => 1];
|
||||
$where['is_host'] = 1;
|
||||
$data['list'] = $this->services->getIntegralList($where);
|
||||
return app('json')->successful(get_thumb_water($data, 'mid'));
|
||||
return app('json')->successful(get_thumb_water($data, 'big'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -69,10 +69,6 @@ class StoreProductController
|
||||
}
|
||||
$type = 'big';
|
||||
$field = ['image', 'recommend_image'];
|
||||
if ($where['store_name']) {
|
||||
$type = 'big';
|
||||
$field = ['image'];
|
||||
}
|
||||
$list = $this->services->getGoodsList($where, (int)$request->uid());
|
||||
return app('json')->successful(get_thumb_water($list, $type, $field));
|
||||
}
|
||||
@ -205,7 +201,7 @@ class StoreProductController
|
||||
/** @var StoreProductReplyServices $replyService */
|
||||
$replyService = app()->make(StoreProductReplyServices::class);
|
||||
$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']));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -135,7 +135,7 @@ class StoreServiceLogServices extends BaseServices
|
||||
['is_del', '=', 0],
|
||||
['is_show', '=', 1],
|
||||
];
|
||||
$productList = get_thumb_water($productServices->getProductArray($where, '*', 'id'));
|
||||
$productList = get_thumb_water($productServices->getProductArray($where, '*', 'id'),'mid');
|
||||
}
|
||||
/** @var StoreOrderServices $orderServices */
|
||||
$orderServices = app()->make(StoreOrderServices::class);
|
||||
|
||||
@ -79,7 +79,7 @@ class UserServices extends BaseServices
|
||||
$list[$k]['price'] = $product['product']['price'] ?? 0;
|
||||
$list[$k]['ot_price'] = $product['product']['ot_price'] ?? 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_show'] = $product['product']['is_show'] ?? 0;
|
||||
$list[$k]['is_fail'] = $product['product']['is_del'] && $product['product']['is_show'];
|
||||
|
||||
@ -1668,7 +1668,7 @@ class StoreProductServices extends BaseServices
|
||||
* @param string $type
|
||||
* @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 = [];
|
||||
$data = [$baseList, $firstList, $benefitList, $hotList, $vipList];
|
||||
@ -1756,7 +1756,7 @@ class StoreProductServices extends BaseServices
|
||||
* @throws \think\db\exception\DbException
|
||||
* @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();
|
||||
$where['vip_user'] = $uid ? app()->make(UserServices::class)->value(['uid' => $uid], 'is_money_level') : 0;
|
||||
|
||||
@ -95,11 +95,6 @@ class JwtAuth
|
||||
{
|
||||
$tokenInfo = $this->getToken($id, $type, $params);
|
||||
$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);
|
||||
if (!$res) {
|
||||
throw new AdminException(ApiErrorCode::ERR_SAVE_TOKEN);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user