diff --git a/common/models/Area_model.php b/common/models/Area_model.php index aa4f80f3..988f0f71 100755 --- a/common/models/Area_model.php +++ b/common/models/Area_model.php @@ -39,16 +39,18 @@ class Area_model extends HD_Model public function city($province_id = '',$type = 0) { $result = array(); - $list = $this->select(array('province_id' => $province_id), null, null, null, 'distinct(city_id), city_name'); + $list = $this->select(array('province_id' => $province_id), null, null, null, 'distinct(city_id), city_name, firstchar'); $type == 0 && $result[] = array('name'=>'城市','id'=>''); if($list) { foreach ($list as $v) { - $result[$v['city_id']] = array( + $item = array( 'id' => $v['city_id'], 'name' => $v['city_name'], ); + 2 == $type && $item['firstchar'] = $v['firstchar']; + $result[$v['city_id']] = $item; } }