提交
This commit is contained in:
parent
267c81173b
commit
423d983e09
8
.env
8
.env
|
|
@ -6,9 +6,9 @@ DEFAULT_TIMEZONE = Asia/Shanghai
|
|||
[DATABASE]
|
||||
TYPE = mysql
|
||||
HOSTNAME = 127.0.0.1
|
||||
DATABASE = youda_neice
|
||||
USERNAME = youda_neice
|
||||
PASSWORD = youda_neice
|
||||
DATABASE = youda
|
||||
USERNAME = youda
|
||||
PASSWORD = youda
|
||||
HOSTPORT = 3306
|
||||
CHARSET = utf8
|
||||
DEBUG = false
|
||||
|
|
@ -20,4 +20,4 @@ default_lang = zh-cn
|
|||
HOST = 127.0.0.1
|
||||
PORT = 6379
|
||||
PASSWORD =
|
||||
DB = 3
|
||||
DB = 2
|
||||
|
|
@ -64,7 +64,6 @@ class Goods extends Base
|
|||
$redis = (new \app\common\server\RedisHelper())->getRedis();
|
||||
$cache_key = "goods_list_{$type_str}_{$user_id}_{$page}";
|
||||
$cache_data = $redis->get($cache_key);
|
||||
|
||||
// 如果缓存存在,直接返回缓存数据
|
||||
if ($cache_data) {
|
||||
$cached_data = json_decode($cache_data, true);
|
||||
|
|
@ -94,7 +93,6 @@ class Goods extends Base
|
|||
|
||||
$paginate = 15;
|
||||
// 1一番赏 2无限赏 3擂台赏 4抽卡机 5积分赏 6全局赏 7福利盲盒 8领主赏 9连击赏 10 商品赏
|
||||
|
||||
// 使用映射数组简化类型条件判断
|
||||
$typeMapping = [
|
||||
1 => ['type' => 1],
|
||||
|
|
@ -170,7 +168,7 @@ class Goods extends Base
|
|||
|
||||
// 缓存空结果,避免重复查询
|
||||
$redis->set($cache_key, json_encode($new_data), 10);
|
||||
|
||||
|
||||
return $this->renderSuccess('请求成功', $new_data);
|
||||
}
|
||||
|
||||
|
|
@ -811,7 +809,7 @@ class Goods extends Base
|
|||
if (empty($user['mobile'])) {
|
||||
return $this->renderError('请先绑定手机号', [], -9);
|
||||
}
|
||||
return $this->renderError('正在维护中', []);
|
||||
|
||||
$prize_num = request()->param('prize_num/d', 0); #抽几发
|
||||
$goods_id = request()->param('goods_id/d', 0); #盒子ID
|
||||
$num = request()->param('goods_num/d', 0); #第几箱
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ class Index extends Base
|
|||
// // unset($tuijian[$key]);
|
||||
// continue;
|
||||
// }
|
||||
// $tuijian_list[] = $advert_value;
|
||||
$tuijian_list[] = $advert_value;
|
||||
}
|
||||
}
|
||||
$tuijian = $tuijian_list;
|
||||
|
|
|
|||
|
|
@ -507,7 +507,7 @@ class Infinite extends Base
|
|||
if (empty($user['mobile'])) {
|
||||
return $this->renderError('请先绑定手机号', [], -9);
|
||||
}
|
||||
return $this->renderError('正在维护中', []);
|
||||
|
||||
$ad_id = request()->header('adid');
|
||||
$goods_id = request()->param('goods_id/d', 0); #盒子ID
|
||||
$prize_num = request()->param('prize_num/d', 0); #抽几发
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user