111
This commit is contained in:
parent
7a7369cc04
commit
bb6d4abeae
|
|
@ -2174,7 +2174,7 @@ class Goods extends Base
|
||||||
$data['pay_currency'] = isset($data['pay_currency']) ? 1 : 0;
|
$data['pay_currency'] = isset($data['pay_currency']) ? 1 : 0;
|
||||||
$data['pay_currency2'] = isset($data['pay_currency2']) ? 1 : 0;
|
$data['pay_currency2'] = isset($data['pay_currency2']) ? 1 : 0;
|
||||||
$data['pay_coupon'] = isset($data['pay_coupon']) ? 1 : 0;
|
$data['pay_coupon'] = isset($data['pay_coupon']) ? 1 : 0;
|
||||||
$data['is_deduction'] = isset($data['is_deduction']) ? 1 : 0;
|
// $data['is_deduction'] = $data['is_deduction'];
|
||||||
|
|
||||||
// 查询是否已存在
|
// 查询是否已存在
|
||||||
$exist = \app\common\model\GoodsExtend::getByGoodsId($goods_id);
|
$exist = \app\common\model\GoodsExtend::getByGoodsId($goods_id);
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ class Config extends Base
|
||||||
return $this->renderSuccess('获取成功', [
|
return $this->renderSuccess('获取成功', [
|
||||||
'good_type' => $goodsTypeList,
|
'good_type' => $goodsTypeList,
|
||||||
'app_setting' => $app_setting,
|
'app_setting' => $app_setting,
|
||||||
'version' => '112'
|
'version' => '113'
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -1202,7 +1202,7 @@ class Goods extends Base
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#普通赏
|
#普通赏
|
||||||
$data = OrderList::field('id,user_id,shang_id,goodslist_id,goodslist_title,goodslist_imgurl,goodslist_money,count(id) as prize_num')
|
$data = OrderList::field('id,user_id,shang_id,goodslist_id,goodslist_title,goodslist_imgurl,goodslist_money,count(id) as prize_num,doubling,is_lingzhu,goodslist_type,goodslist_id,parent_goods_list_id')
|
||||||
->append(['shang_title'])
|
->append(['shang_title'])
|
||||||
->where('user_id', '=', $user['id'])
|
->where('user_id', '=', $user['id'])
|
||||||
->where('order_id', '=', $order_info['id'])
|
->where('order_id', '=', $order_info['id'])
|
||||||
|
|
|
||||||
|
|
@ -92,18 +92,16 @@ class Index extends Base
|
||||||
// 设置header
|
// 设置header
|
||||||
|
|
||||||
$type = \request()->param('type/d', 0);
|
$type = \request()->param('type/d', 0);
|
||||||
|
$client = request()->header('client', 'MP-WEIXIN');
|
||||||
// 使用Redis缓存
|
if ($type == 4 || $type == 5) {
|
||||||
// $redis = (new \app\common\server\RedisHelper())->getRedis();
|
if ($client == "APP_ANDROID"||$client == "APP_IOS") {
|
||||||
// $cacheKey = 'danye:content:' . $type;
|
if ($type == 4) {
|
||||||
|
$type = 30;
|
||||||
// // 尝试从缓存获取数据
|
} else {
|
||||||
// $cacheData = $redis->get($cacheKey);
|
$type = 31;
|
||||||
// if ($cacheData) {
|
}
|
||||||
// $cacheData = json_decode($cacheData, true);
|
}
|
||||||
// return json(['status' => 1, 'msg' => '请求成功', 'data' => $cacheData['content'], 'is_image_optimizer' => $cacheData['is_image_optimizer']]);
|
}
|
||||||
// }
|
|
||||||
|
|
||||||
// 缓存不存在,查询数据库
|
// 缓存不存在,查询数据库
|
||||||
$info = Danye::where(['id' => $type])->find();
|
$info = Danye::where(['id' => $type])->find();
|
||||||
$is_image_optimizer = 0;
|
$is_image_optimizer = 0;
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ use app\common\model\User;
|
||||||
use app\common\model\Order;
|
use app\common\model\Order;
|
||||||
use app\common\model\OrderList;
|
use app\common\model\OrderList;
|
||||||
use app\common\model\UserVip;
|
use app\common\model\UserVip;
|
||||||
use app\common\model\UserCoupon;
|
use app\common\model\UserCoupon;
|
||||||
use think\facade\Db;
|
use think\facade\Db;
|
||||||
use think\facade\Log;
|
use think\facade\Log;
|
||||||
use app\common\model\CouponReceive as CouponReceiveModel;
|
use app\common\model\CouponReceive as CouponReceiveModel;
|
||||||
|
|
@ -872,7 +872,7 @@ class Infinite extends Base
|
||||||
}
|
}
|
||||||
$prize_num = $order_info['prize_num'] ?? 0;
|
$prize_num = $order_info['prize_num'] ?? 0;
|
||||||
#普通赏
|
#普通赏
|
||||||
$data = OrderList::field('id,user_id,shang_id,goodslist_id,goodslist_title,goodslist_imgurl,goodslist_money,doubling,is_lingzhu')
|
$data = OrderList::field('id,user_id,shang_id,goodslist_id,goodslist_title,goodslist_imgurl,goodslist_money,doubling,is_lingzhu,goodslist_type,goodslist_id,parent_goods_list_id')
|
||||||
->append(['shang_title'])
|
->append(['shang_title'])
|
||||||
->where('user_id', '=', $user['id'])
|
->where('user_id', '=', $user['id'])
|
||||||
->where('order_id', '=', $order_info['id'])
|
->where('order_id', '=', $order_info['id'])
|
||||||
|
|
@ -904,7 +904,7 @@ class Infinite extends Base
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//重抽卡数量
|
//重抽卡数量
|
||||||
$item_card_count = Db::name('user_item_card')->where(['user_id' => $user['id'], 'status' => 1])->count();
|
$item_card_count =0;// Db::name('user_item_card')->where(['user_id' => $user['id'], 'status' => 1])->count();
|
||||||
|
|
||||||
$new_data = [
|
$new_data = [
|
||||||
'user_info' => [
|
'user_info' => [
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ use app\common\model\DiamondOrder;
|
||||||
use think\facade\Db;
|
use think\facade\Db;
|
||||||
use app\common\model\CouponReceive as CouponReceiveModel;
|
use app\common\model\CouponReceive as CouponReceiveModel;
|
||||||
use \think\Request;
|
use \think\Request;
|
||||||
|
use app\common\model\GoodsExtend;
|
||||||
class Mall extends Base
|
class Mall extends Base
|
||||||
{
|
{
|
||||||
static $shang_prize_id = [34, 38];#抽奖赏品id
|
static $shang_prize_id = [34, 38];#抽奖赏品id
|
||||||
|
|
@ -47,12 +47,15 @@ class Mall extends Base
|
||||||
$price = $goods['price'];
|
$price = $goods['price'];
|
||||||
#抽奖数量
|
#抽奖数量
|
||||||
$goods['prize_num'] = $prize_num;
|
$goods['prize_num'] = $prize_num;
|
||||||
|
$goods_type = $goods['type'];
|
||||||
|
$goodsExtend = GoodsExtend::getGoodsExtendByGoodsId($goods_id, $goods_type);
|
||||||
$data = [
|
$data = [
|
||||||
'goods' => $goods,
|
'goods' => $goods,
|
||||||
'price' => round($price, 2),
|
'price' => round($price, 2),
|
||||||
'integral' => round($price * 100, 2),
|
'integral' => round($price * 100, 2),
|
||||||
'use_integral' => round($user['money2'], 2),
|
'use_integral' => round($user['money2'], 2),
|
||||||
'money' => round($user['money'], 2),
|
'money' => round($user['money'], 2),
|
||||||
|
'goodsExtend' => $goodsExtend,
|
||||||
];
|
];
|
||||||
return $this->renderSuccess("请求成功", $data);
|
return $this->renderSuccess("请求成功", $data);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user