You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
information-system/application/third_party/ctmobilefirst/controllers/api.php

62 lines
1.3 KiB
PHTML

4 years ago
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Api extends CI_Controller {
public function __construct()
{
parent::__construct();
$this->load->model('api_model');
}
public function index()
{
echo("<1>api</h1>");
}
/**
* @description: 返回一日游价格
* @param {*} $returntype
* @return {*}
* @Date Changed:
*/
public function getDaytripsPrice(){
$pagecode = $_GET["pagecode"];
if (isset($_GET["personnum"])){
$personnum=$_GET["personnum"];
}else{
$personnum=2;
}
$result = $this->api_model->getDaytripsPrice($pagecode,$personnum);
echo json_encode($result);
}
/**
* @description: 获取精华线路价格2人等)
* @param {*}
* @return {*}
* @Date Changed:
*/
public function getTourPrice(){
if (isset($_GET["param"])){
$param = $_GET["param"];
$result["status"]="ok";
$result["price"] = $this->api_model->getTourPrice($param);
echo json_encode($result);
}else{
$result["status"]="no param";
echo json_encode($result);
}
}
}
/* End of file Api.php */