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();
 }
Exemplo n.º 2
0
 public function del_collect_shop()
 {
     $id = $this->check_user();
     if (!$id) {
         $this->redirect("login/login");
     }
     $shop_id = $_REQUEST["shop_id"];
     $CollectionModel = new \Home\Model\CollectionModel();
     $status = $CollectionModel->del_shop($shop_id, $id);
     echo json_encode(array("status" => $status));
 }