0, ]; $getFatherProduct = model('Product')->getSelect($fatherProductField, $fatherProductWhere); $this->assign('fatherProduct', $getFatherProduct); $id = input('get.id') ?? $getFatherProduct[0]->product_id; $productWhere = [ 'product_pid' => $id, ]; $getProduct = model('Product')->getSelect($fatherProductField, $productWhere); $this->assign('product', $getProduct); $this->assign('id', $id); return $this->fetch(); } /** * 产品与服务详情 * * @access public * @return array JsonString */ public function details() { $findProductinfo = model('Productinfo')->getFind(); $id = input('get.id') ?? $findProductinfo->product_id; $productWhere = [ 'product_id' => $id, ]; $getProductInfo = model('Productinfo')->getSelect($productWhere); $this->assign('productInfo', $getProductInfo); $getProduct = model('Product')->getFind($productWhere); $this->assign('product', $getProduct); $getRenewal = model('Renewal')->getRenewal(); $this->assign('renewal', $getRenewal); return $this->fetch(); } }