新需求-活动需求-天降好礼
This commit is contained in:
@@ -147,14 +147,14 @@ class Activities extends BaseCom
|
|||||||
$data['gift_list'] = [];
|
$data['gift_list'] = [];
|
||||||
foreach ($detail as $k=>$v){
|
foreach ($detail as $k=>$v){
|
||||||
if($v['type'] == 1){
|
if($v['type'] == 1){
|
||||||
$list[$k]['name'] = "金币";
|
$list[$k]['gift_name'] = "金币";
|
||||||
$list[$k]['num'] = $v['gold'];
|
$list[$k]['num'] = $v['gold'];
|
||||||
$list[$k]['gold'] = $v['gold'];
|
$list[$k]['gold'] = $v['gold'];
|
||||||
$list[$k]['type'] = 1;
|
$list[$k]['type'] = 1;
|
||||||
$list[$k]['icon'] = localpath_to_netpath("static/image/icon/gold.png");
|
$list[$k]['icon'] = localpath_to_netpath("static/image/icon/gold.png");
|
||||||
}elseif($v['type'] == 2) {
|
}elseif($v['type'] == 2) {
|
||||||
$gift = DB::name('vs_gift')->where(['gid'=>$v['foreign_id']])->find();
|
$gift = DB::name('vs_gift')->where(['gid'=>$v['foreign_id']])->find();
|
||||||
$list[$k]['name'] = $gift['gift_name'];
|
$list[$k]['gift_name'] = $gift['gift_name'];
|
||||||
$list[$k]['num'] = $v['quantity'];
|
$list[$k]['num'] = $v['quantity'];
|
||||||
$list[$k]['gold'] = $gift['gift_price'];
|
$list[$k]['gold'] = $gift['gift_price'];
|
||||||
$list[$k]['type'] =2;
|
$list[$k]['type'] =2;
|
||||||
@@ -162,13 +162,13 @@ class Activities extends BaseCom
|
|||||||
} elseif($v['type'] == 3) {
|
} elseif($v['type'] == 3) {
|
||||||
$decorate_price = DB::name('vs_decorate_price')->where(['id'=>$v['foreign_id']])->find();
|
$decorate_price = DB::name('vs_decorate_price')->where(['id'=>$v['foreign_id']])->find();
|
||||||
$gift = DB::name('vs_decorate')->where(['did'=>$decorate_price['did']])->find();
|
$gift = DB::name('vs_decorate')->where(['did'=>$decorate_price['did']])->find();
|
||||||
$list[$k]['name'] = $gift['title']; //装扮名称
|
$list[$k]['gift_name'] = $gift['title']; //装扮名称
|
||||||
$list[$k]['num'] = $decorate_price['day']; //天数
|
$list[$k]['num'] = $decorate_price['day']; //天数
|
||||||
$list[$k]['gold'] = $decorate_price['price']; //价格
|
$list[$k]['gold'] = $decorate_price['price']; //价格
|
||||||
$list[$k]['type'] =3;
|
$list[$k]['type'] =3;
|
||||||
$list[$k]['icon'] = $gift['base_image'];
|
$list[$k]['icon'] = $gift['base_image'];
|
||||||
}elseif($v['type'] == 4) {
|
}elseif($v['type'] == 4) {
|
||||||
$list[$k]['name'] = "钻石";
|
$list[$k]['gift_name'] = "钻石";
|
||||||
$list[$k]['num'] = $v['quantity'];
|
$list[$k]['num'] = $v['quantity'];
|
||||||
$list[$k]['gold'] = $v['gold'];
|
$list[$k]['gold'] = $v['gold'];
|
||||||
$list[$k]['type'] = 4;
|
$list[$k]['type'] = 4;
|
||||||
|
|||||||
Reference in New Issue
Block a user