|
@@ -77,13 +77,20 @@ class Address extends Base
|
|
|
} elseif (strstr($data['address'], '市')) {
|
|
|
$temp = explode('市', $data['address']);
|
|
|
$data['province_name'] = $temp[0] . '市';
|
|
|
+ $city = '';
|
|
|
+ unset($temp[0]);
|
|
|
+ $city = implode('', $temp);
|
|
|
} elseif (strstr($data['address'], '区')) {
|
|
|
$temp = explode('区', $data['address']);
|
|
|
$data['province_name'] = $temp[0] . '区';
|
|
|
+
|
|
|
+ $city = '';
|
|
|
+ unset($temp[0]);
|
|
|
+ $city = implode('', $temp);
|
|
|
}
|
|
|
|
|
|
- if (strstr($temp[1], '市')) {
|
|
|
- $temp = explode('市', $temp[1]);
|
|
|
+ if (strstr($city, '市')) {
|
|
|
+ $temp = explode('市', $city);
|
|
|
$data['city_name'] = $temp[0] . '市';
|
|
|
}
|
|
|
$data['county_name'] = $temp[1];
|