提交代码
This commit is contained in:
parent
fe916f5aca
commit
e61603715f
6
.env
6
.env
|
|
@ -6,9 +6,9 @@ DEFAULT_TIMEZONE = Asia/Shanghai
|
|||
[DATABASE]
|
||||
TYPE = mysql
|
||||
HOSTNAME = 127.0.0.1
|
||||
DATABASE = youda_test
|
||||
USERNAME = youda_test
|
||||
PASSWORD = youda_test
|
||||
DATABASE = youda
|
||||
USERNAME = youda
|
||||
PASSWORD = youda
|
||||
HOSTPORT = 3306
|
||||
CHARSET = utf8
|
||||
DEBUG = false
|
||||
|
|
|
|||
|
|
@ -32,14 +32,14 @@ class FuLiWu extends Base
|
|||
if ($type_str != 1 && $type_str != 3) {
|
||||
return $this->renderError('参数错误');
|
||||
}
|
||||
$order='sort desc,id desc';
|
||||
$order = 'sort desc,id desc';
|
||||
$whe = [];
|
||||
$whe[] = ['status', '=', $type_str];
|
||||
$paginate = 15;
|
||||
$whe[] = ['type', '=', 15];
|
||||
$whe[] = ['is_open', '=', $type_str == 1 ? 0 : 1];
|
||||
if($type_str!=1){
|
||||
$order='open_time desc';
|
||||
if ($type_str != 1) {
|
||||
$order = 'open_time desc';
|
||||
}
|
||||
$user_id = $this->getUserId();
|
||||
if ($user_id == 0) {
|
||||
|
|
@ -131,6 +131,8 @@ class FuLiWu extends Base
|
|||
$goods_detail['imgurl'] = imageUrl($goods_detail['imgurl']);
|
||||
if (!empty($goods_detail['imgurl_detail'])) {
|
||||
$goods_detail['imgurl_detail'] = imageUrl($goods_detail['imgurl_detail']);
|
||||
} else {
|
||||
$goods_detail['imgurl_detail'] = $goods_detail['imgurl'];
|
||||
}
|
||||
|
||||
// 获取福利屋中的奖品列表
|
||||
|
|
@ -144,7 +146,12 @@ class FuLiWu extends Base
|
|||
// 处理奖品列表,添加图片地址
|
||||
foreach ($goodslist as &$item) {
|
||||
$item['imgurl'] = imageUrl($item['imgurl']);
|
||||
$item['imgurl_detail'] = imageUrl($item['imgurl_detail']);
|
||||
|
||||
if (!empty($item['imgurl_detail'])) {
|
||||
$item['imgurl_detail'] = imageUrl($item['imgurl_detail']);
|
||||
} else {
|
||||
$item['imgurl_detail'] = $item['imgurl'];
|
||||
}
|
||||
// 获取奖品类型信息
|
||||
$shang_info = Shang::field('title,color')->where(['id' => $item['shang_id']])->find();
|
||||
$item['shang_title'] = $shang_info ? $shang_info['title'] : '';
|
||||
|
|
|
|||
|
|
@ -704,7 +704,7 @@ class Goods extends Base
|
|||
$coupon_id = request()->param('coupon_id/d', 0); //优惠券
|
||||
|
||||
#盒子信息
|
||||
$goods = Goodsmodel::field('id,title,imgurl_detail,type,price,status,is_shou_zhe,quanju_xiangou,lock_is,choujiang_xianzhi,lock_time,daily_xiangou')->where(['id' => $goods_id])
|
||||
$goods = Goodsmodel::field('id,title,imgurl_detail,type,price,status,is_shou_zhe,quanju_xiangou,lock_is,choujiang_xianzhi,lock_time,flw_start_time,flw_end_time,daily_xiangou')->where(['id' => $goods_id])
|
||||
->find();
|
||||
if (!$goods) {
|
||||
return $this->renderError("盒子不存在");
|
||||
|
|
|
|||
|
|
@ -237,7 +237,7 @@ class Index extends Base
|
|||
$result = $posterService->getUserPoster($userId);
|
||||
|
||||
// 检查是否需要直接输出图片
|
||||
$outputImage = request()->param('output/d', 0);
|
||||
$outputImage = request()->param('output/d', 1);
|
||||
|
||||
if ($result['status']) {
|
||||
if ($outputImage) {
|
||||
|
|
|
|||
|
|
@ -681,6 +681,10 @@ class Warehouse extends Base
|
|||
if ($type != 1 && $type != 2) {
|
||||
return $this->renderError("请求参数错误");
|
||||
}
|
||||
$isTest = \app\common\helper\ConfigHelper::getSystemTestKey("disable_wechat_pay");
|
||||
if ($isTest == "1") {
|
||||
return $this->renderError("发货未开放");
|
||||
}
|
||||
$recovery_info = request()->param('recovery_info', '');
|
||||
if (empty($recovery_info)) {
|
||||
return $this->renderError("请选择兑换的赏品");
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ return [
|
|||
// OPTIONS预检请求处理中间件
|
||||
\app\api\middleware\OptionsRequestMiddleware::class,
|
||||
// GET请求签名验证中间件
|
||||
\app\api\middleware\SignatureVerifyMiddleware::class,
|
||||
// \app\api\middleware\SignatureVerifyMiddleware::class,
|
||||
// 注意:原来的Allow中间件已被拆分为上面三个专门的中间件,不再需要
|
||||
// \app\api\middleware\Allow::class,
|
||||
];
|
||||
|
|
|
|||
|
|
@ -263,7 +263,7 @@ class PaymentCalculator
|
|||
$user_id = $user['id'];
|
||||
$choujiang_xianzhi = $goods['choujiang_xianzhi'];
|
||||
|
||||
if ($choujiang_xianzhi && $choujiang_xianzhi > 0) {
|
||||
if ($choujiang_xianzhi && $choujiang_xianzhi > 0 || $goods['type'] == 15) {
|
||||
// 验证福利屋活动
|
||||
if ($goods['type'] == 15) {
|
||||
// 获取用户在该福利屋活动期间的消费情况
|
||||
|
|
@ -278,7 +278,7 @@ class PaymentCalculator
|
|||
'status' => 0,
|
||||
'msg' => "需在指定时间" . date('Y-m-d H:i:s', $goods['flw_start_time']) . "-"
|
||||
. date('Y-m-d H:i:s', $goods['flw_end_time']) . "消耗达到" . $choujiang_xianzhi
|
||||
. "钻石,即可加入房间,还需" . round(($choujiang_xianzhi - $consumptionData['total_consumed']), 2) . "钻石."
|
||||
. "钻石,即可加入房间,还需" . removeTrailingZeros( round(($choujiang_xianzhi - $consumptionData['total_consumed']), 2)) . "钻石."
|
||||
];
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user