diff --git a/application/third_party/ctmobilefirst/controllers/api.php b/application/third_party/ctmobilefirst/controllers/api.php index b4d526ae..d270114c 100644 --- a/application/third_party/ctmobilefirst/controllers/api.php +++ b/application/third_party/ctmobilefirst/controllers/api.php @@ -465,7 +465,7 @@ class Api extends CI_Controller { /** * 获取线路类型列表 */ - function getLineTypeList(){ + public function getLineTypeList(){ $list = $this->api_model->getLineTypeList(); echo json_encode($list,JSON_NUMERIC_CHECK); } diff --git a/application/third_party/ctmobilefirst/models/api_model.php b/application/third_party/ctmobilefirst/models/api_model.php index c63dcfb8..aba9cf95 100644 --- a/application/third_party/ctmobilefirst/models/api_model.php +++ b/application/third_party/ctmobilefirst/models/api_model.php @@ -607,7 +607,7 @@ class Api_model extends CI_Model { if ($query->num_rows() > 0) { foreach ($query->result_array() as $row) { - $column_data = $row['code']; + $column_data = $row['CLI_LineType']; // 分割逗号分隔的值 $values = explode(',', $column_data); // 去除每个值的空白字符