public function alist() { $aid = $_GET["id"]; $articles = M("Articles"); $result_temp = $articles->where("aid={$aid}")->find(); $this->assign("result_temp", $result_temp); $id = $result_temp["belong"]; //查询店铺的基本信息 $ShopModel = new \Home\Model\ShopModel(); $shop_info = $ShopModel->get_shop_info($id); //$shop=M("shop"); //$data=$shop->field("") $this->assign("shop_info", $shop_info); // $mall = M("mall"); $mall_info = $mall->where("id={$shop_info['mall_id']}")->find(); $this->assign("mall_info", $mall_info); //查询店铺的图片 /*$ShopPicModel = new \Home\Model\ShopPicModel(); $this->assign("pic", $ShopPicModel->get_shop_pic($id)); */ $shophomeFocus = D("ShopHomeFocus"); $pic = $shophomeFocus->where("role={$id}")->select(); $this->assign("pic", $pic); $this->display(); }
public function shop_collect() { $id = $this->id; $result_array = array(); $CollectionModel = new \Home\Model\CollectionModel(); $ShopModel = new \Home\Model\ShopModel(); $shop_collect = $CollectionModel->get_shop_collect($id); foreach ($shop_collect as $piece) { $shop_info = $ShopModel->get_shop_info($piece["collect_id"]); array_push($result_array, array("shop_info" => $shop_info, "collect_info" => $piece)); } $this->assign("result", $result_array); $this->display(); }