ci = &get_instance(); $this->ci->load->model('area_model'); } /** * @return string */ public function getMobileAsterisk() { return is_numeric($this->mobile) ? mobile_asterisk($this->mobile) : $this->mobile; } /** * @return string */ public function getCityName() { $cityName = '全国'; if ($this->cityId) { $city = $this->ci->area_model->get(['city_id' => $this->cityId]); $cityName = "{$city['province_name']}-{$city['city_name']}"; //城市名称 } return $cityName; } }