作者 anyv
1 个管道 的构建 通过 耗费 0 秒

8

... ... @@ -34,8 +34,16 @@ class PersonalcenterController extends WeChatBaseController{
foreach($data as $key => $val){
$data_goods[] = Db::name('goods') -> where("id =".$val['goods_id']) -> find();
}
foreach ($data_goods as $key => $val){
$price = explode('.',$val['price']);
$pricing = explode('.',$val['pricing']);
$data_goods[$key]['price0'] = $price[0];
$data_goods[$key]['price1'] = $price[1];
$data_goods[$key]['pricing0'] = $pricing[0];
$data_goods[$key]['pricing1'] = $pricing[1];
}
}
dump($data_goods);die;
$this -> assign('data_goods',$data_goods);
return $this -> fetch();
}
... ...