->find();
return $this->view->fetch('product-cate', compact('cates', 'pro_cate', 'cate_id'));
}
public function product_detail()
{
$id = $this->request->param('id');
$product = $this->product->with(['items'])->find($id);
$product->pro_img = explode(',', $product->proimages);
// 推荐热销产品
$recommend_products = $this->product->where('isrecommend', 1)->order('id', 'desc')->select();
// 产品分类
$cate_and_pro = $this->category->with(['products'])->where('pid', 2)->order('weigh asc')->select();
return $this->view->fetch('product', compact('product', 'cate_and_pro', 'recommend_products'));
}
public function contact()