From 98c111816db027fe9f9087a9d9ede527c9d344b8 Mon Sep 17 00:00:00 2001 From: youda Date: Fri, 13 Jun 2025 16:56:33 +0800 Subject: [PATCH] 333 --- app/api/controller/Config.php | 15 ++++++++++++++- app/api/controller/Index.php | 17 +++++++++-------- app/common/server/platform/AppPlatform.php | 2 +- 3 files changed, 24 insertions(+), 10 deletions(-) diff --git a/app/api/controller/Config.php b/app/api/controller/Config.php index d33460b..b6bfea5 100755 --- a/app/api/controller/Config.php +++ b/app/api/controller/Config.php @@ -22,11 +22,24 @@ class Config extends Base ->select() ->toArray(); $app_setting = getConfig('app_setting'); + #客服 + $base_rule = getConfig('base'); + // 'is_shou_tan' => $rule['is_shou_tan'], + // 'jump_appid' => $rule['jump_appid'], + // 'corpid' => $rule['corpid'], + // 'wx_link' => $rule['wx_link'], + $base_config = [ + 'is_shou_tan' => $base_rule['is_shou_tan'], + 'jump_appid' => $base_rule['jump_appid'], + 'corpid' => $base_rule['corpid'], + 'wx_link' => $base_rule['wx_link'] + ]; // 返回数据 return $this->renderSuccess('获取成功', [ 'good_type' => $goodsTypeList, 'app_setting' => $app_setting, - 'version' => '115' + 'base_config' => $base_config, + 'version' => '116' ]); } /** diff --git a/app/api/controller/Index.php b/app/api/controller/Index.php index c9123dd..f278084 100755 --- a/app/api/controller/Index.php +++ b/app/api/controller/Index.php @@ -34,8 +34,8 @@ class Index extends Base foreach ($tuijian as $key => &$advert_value) { $advert_value['imgurl'] = imageUrl($advert_value['imgurl']); if ($advert_value['goods_id']) { - $goods = Goods::where('id', '=', $advert_value['goods_id'])->find(); - $status = $goods['status']; + // $goods = Goods::where('id', '=', $advert_value['goods_id'])->find(); + // $status = $goods['status']; // if (!$goods || $status == 2) { // // 商品不存在或已下架或卖完,不显示此推荐位 // // unset($tuijian[$key]); @@ -113,11 +113,11 @@ class Index extends Base $content = ''; } - // 存入Redis缓存,设置过期时间为60秒(10分钟) - $cacheData = [ - 'content' => $content, - 'is_image_optimizer' => $is_image_optimizer - ]; + // // 存入Redis缓存,设置过期时间为60秒(10分钟) + // $cacheData = [ + // 'content' => $content, + // 'is_image_optimizer' => $is_image_optimizer + // ]; // $redis->setex($cacheKey, 600, json_encode($cacheData)); // return $this->renderSuccess("请求成功", $content); @@ -139,7 +139,8 @@ class Index extends Base } return $this->renderSuccess("请求成功", [ 'content' => $content, - 'title' => $info['title'] + 'title' => $info['title'], + 'is_image_optimizer'=>$info['is_image_optimizer'] ]); } diff --git a/app/common/server/platform/AppPlatform.php b/app/common/server/platform/AppPlatform.php index 903546d..c308f58 100644 --- a/app/common/server/platform/AppPlatform.php +++ b/app/common/server/platform/AppPlatform.php @@ -40,7 +40,7 @@ class AppPlatform extends BasePlatform ]; $configVersion = (int) preg_replace('/[^0-9]/', '', $config['version']); if ($versionNumber >= $configVersion) { - $config['isCheck'] = true; + $config['isCheck'] = false; } return $config; }