This commit is contained in:
youda 2025-04-25 09:43:38 +08:00
parent 267c81173b
commit 423d983e09
4 changed files with 8 additions and 10 deletions

8
.env
View File

@ -6,9 +6,9 @@ DEFAULT_TIMEZONE = Asia/Shanghai
[DATABASE] [DATABASE]
TYPE = mysql TYPE = mysql
HOSTNAME = 127.0.0.1 HOSTNAME = 127.0.0.1
DATABASE = youda_neice DATABASE = youda
USERNAME = youda_neice USERNAME = youda
PASSWORD = youda_neice PASSWORD = youda
HOSTPORT = 3306 HOSTPORT = 3306
CHARSET = utf8 CHARSET = utf8
DEBUG = false DEBUG = false
@ -20,4 +20,4 @@ default_lang = zh-cn
HOST = 127.0.0.1 HOST = 127.0.0.1
PORT = 6379 PORT = 6379
PASSWORD = PASSWORD =
DB = 3 DB = 2

View File

@ -64,7 +64,6 @@ class Goods extends Base
$redis = (new \app\common\server\RedisHelper())->getRedis(); $redis = (new \app\common\server\RedisHelper())->getRedis();
$cache_key = "goods_list_{$type_str}_{$user_id}_{$page}"; $cache_key = "goods_list_{$type_str}_{$user_id}_{$page}";
$cache_data = $redis->get($cache_key); $cache_data = $redis->get($cache_key);
// 如果缓存存在,直接返回缓存数据 // 如果缓存存在,直接返回缓存数据
if ($cache_data) { if ($cache_data) {
$cached_data = json_decode($cache_data, true); $cached_data = json_decode($cache_data, true);
@ -94,7 +93,6 @@ class Goods extends Base
$paginate = 15; $paginate = 15;
// 1一番赏 2无限赏 3擂台赏 4抽卡机 5积分赏 6全局赏 7福利盲盒 8领主赏 9连击赏 10 商品赏 // 1一番赏 2无限赏 3擂台赏 4抽卡机 5积分赏 6全局赏 7福利盲盒 8领主赏 9连击赏 10 商品赏
// 使用映射数组简化类型条件判断 // 使用映射数组简化类型条件判断
$typeMapping = [ $typeMapping = [
1 => ['type' => 1], 1 => ['type' => 1],
@ -811,7 +809,7 @@ class Goods extends Base
if (empty($user['mobile'])) { if (empty($user['mobile'])) {
return $this->renderError('请先绑定手机号', [], -9); return $this->renderError('请先绑定手机号', [], -9);
} }
return $this->renderError('正在维护中', []);
$prize_num = request()->param('prize_num/d', 0); #抽几发 $prize_num = request()->param('prize_num/d', 0); #抽几发
$goods_id = request()->param('goods_id/d', 0); #盒子ID $goods_id = request()->param('goods_id/d', 0); #盒子ID
$num = request()->param('goods_num/d', 0); #第几箱 $num = request()->param('goods_num/d', 0); #第几箱

View File

@ -41,7 +41,7 @@ class Index extends Base
// // unset($tuijian[$key]); // // unset($tuijian[$key]);
// continue; // continue;
// } // }
// $tuijian_list[] = $advert_value; $tuijian_list[] = $advert_value;
} }
} }
$tuijian = $tuijian_list; $tuijian = $tuijian_list;

View File

@ -507,7 +507,7 @@ class Infinite extends Base
if (empty($user['mobile'])) { if (empty($user['mobile'])) {
return $this->renderError('请先绑定手机号', [], -9); return $this->renderError('请先绑定手机号', [], -9);
} }
return $this->renderError('正在维护中', []);
$ad_id = request()->header('adid'); $ad_id = request()->header('adid');
$goods_id = request()->param('goods_id/d', 0); #盒子ID $goods_id = request()->param('goods_id/d', 0); #盒子ID
$prize_num = request()->param('prize_num/d', 0); #抽几发 $prize_num = request()->param('prize_num/d', 0); #抽几发