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

8

@@ -19,7 +19,7 @@ class GoodsdetailsController extends WeChatBaseController{ @@ -19,7 +19,7 @@ class GoodsdetailsController extends WeChatBaseController{
19 public function Goods_details(){ 19 public function Goods_details(){
20 20
21 $goods_id = $this -> request -> param(); 21 $goods_id = $this -> request -> param();
22 - $data = Db::name('goods') -> alias('a') -> join('classification b','a.classify_id = b.id','LEFT') -> where('a.id',$goods_id['goods_id']) -> find(); 22 + $data = Db::name('goods') -> alias('a') -> field("a.*,b.name") -> join('classification b','a.classify_id = b.id','LEFT') -> where('a.id',$goods_id['goods_id']) -> find();
23 $price = explode('.',$data['price']); 23 $price = explode('.',$data['price']);
24 $pricing = explode('.',$data['pricing']); 24 $pricing = explode('.',$data['pricing']);
25 $data['price0'] = $price[0]; 25 $data['price0'] = $price[0];