|
@@ -123,7 +123,12 @@ class Order extends Api
|
|
foreach ($item['goods'] as $k => $v){
|
|
foreach ($item['goods'] as $k => $v){
|
|
if($v['goods_type'] == 0){
|
|
if($v['goods_type'] == 0){
|
|
$Books = new Books();
|
|
$Books = new Books();
|
|
- $lists['data'][$key]['goods'][$k]['good_item'] = $Books->where('id',$v['goods_id'])->field('id,title,image,book_type,is_new_recommend,author,is_awards,price,entity_price,createtime,updatetime,level_id,arrangement_id,speciality_id,series_id,is_series')->find();
|
|
|
|
|
|
+ $good = $Books->where('id',$v['goods_id'])->field('id,title,image,book_type,is_new_recommend,author,is_awards,price,entity_price,createtime,updatetime,level_id,arrangement_id,speciality_id,series_id,is_series')->find();
|
|
|
|
+ $good['is_free'] = 1;
|
|
|
|
+ if($good['price'] <= 0){
|
|
|
|
+ $good['is_free'] = 0;
|
|
|
|
+ }
|
|
|
|
+ $lists['data'][$key]['goods'][$k]['good_item'] = $good;
|
|
}else if($v['goods_type'] == 1){
|
|
}else if($v['goods_type'] == 1){
|
|
$Video = new Video();
|
|
$Video = new Video();
|
|
$lists['data'][$key]['goods'][$k]['good_item'] = $Video->where('id',$v['goods_id'])->find();
|
|
$lists['data'][$key]['goods'][$k]['good_item'] = $Video->where('id',$v['goods_id'])->find();
|
|
@@ -155,7 +160,12 @@ class Order extends Api
|
|
foreach ($lists['goods'] as $k => $v){
|
|
foreach ($lists['goods'] as $k => $v){
|
|
if($v['goods_type'] == 0){
|
|
if($v['goods_type'] == 0){
|
|
$Books = new Books();
|
|
$Books = new Books();
|
|
- $lists['goods'][$k]['good_item'] = $Books->where('id',$v['goods_id'])->field('id,title,image,book_type,is_new_recommend,author,is_awards,price,entity_price,createtime,updatetime,level_id,arrangement_id,speciality_id,series_id,is_series')->find();
|
|
|
|
|
|
+ $good = $Books->where('id',$v['goods_id'])->field('id,title,image,book_type,is_new_recommend,author,is_awards,price,entity_price,createtime,updatetime,level_id,arrangement_id,speciality_id,series_id,is_series')->find();
|
|
|
|
+ $good['is_free'] = 1;
|
|
|
|
+ if($good['price'] <= 0){
|
|
|
|
+ $good['is_free'] = 0;
|
|
|
|
+ }
|
|
|
|
+ $lists['goods'][$k]['good_item'] = $good;
|
|
}else if($v['goods_type'] == 1){
|
|
}else if($v['goods_type'] == 1){
|
|
$Video = new Video();
|
|
$Video = new Video();
|
|
$lists['goods'][$k]['good_item'] = $Video->where('id',$v['goods_id'])->find();
|
|
$lists['goods'][$k]['good_item'] = $Video->where('id',$v['goods_id'])->find();
|