public function trial()
 {
     $status = $_REQUEST["status"];
     $time_flag = $_REQUEST["time_flag"];
     $search_text = $_REQUEST["search_text"];
     if (!isset($status)) {
         $status = 40;
     }
     if (!isset($time_flag)) {
         $time_flag = 5;
     }
     $OrderModel = new \Home\Model\TrialOrderModel();
     //取得各个状态的数目
     list($wait_pay, $wait_send, $wait_take, $wait_comment) = $OrderModel->search_status_num($this->id);
     $this->assign("wait_pay", $wait_pay);
     $this->assign("wait_send", $wait_send);
     $this->assign("wait_take", $wait_take);
     $this->assign("wait_comment", $wait_comment);
     //查询商品详情
     $this->assign("data", $OrderModel->search_order_by_user($this->id, $status, $time_flag, $search_text));
     $this->assign("orderid", $OrderModel->get_orderid($this->id, $status, $time_flag, $search_text));
     $this->display();
 }
Пример #2
0
 public function del_trialorder()
 {
     $result_array = array();
     $id = $this->check_user();
     if (!$id) {
         $this->redirect("login/login");
     }
     $order_num = $_REQUEST["order_num"];
     if (!$order_num) {
         $result_array["status"] = 0;
     } else {
         $OrderModel = new \Home\Model\TrialOrderModel();
         if ($OrderModel->del_order($id, $order_num)) {
             $result_array["status"] = 1;
         } else {
             $result_array["status"] = 0;
         }
     }
     echo json_encode($result_array);
 }