|
@@ -71,11 +71,12 @@ class Address extends Base
|
|
|
//$data['address_info'] = $data['province_name'] . $data['city_name'] . $data['county_name'] .','. $data['address'] .','. $data['house_number'];
|
|
|
$data['add_string'] = $data['province_name'] . $data['city_name'] . $data['county_name'] .','. $data['address'] .','. $data['house_number'] .','. $data['contact'] .','. $data['mobile'];
|
|
|
} else {
|
|
|
+ $city = '';
|
|
|
if (strstr($data['address'], '省')) {
|
|
|
$temp = explode('省', $data['address']);
|
|
|
$data['province_name'] = $temp[0] . '省';
|
|
|
unset($temp[0]);
|
|
|
- $city = implode('市', $temp);
|
|
|
+ $city = $temp[1];
|
|
|
} elseif (strstr($data['address'], '市')) {
|
|
|
$temp = explode('市', $data['address']);
|
|
|
$data['province_name'] = $temp[0] . '市';
|
|
@@ -95,9 +96,9 @@ class Address extends Base
|
|
|
$temp = explode('市', $city);
|
|
|
$data['city_name'] = $temp[0] . '市';
|
|
|
}
|
|
|
- $data['county_name'] = $temp[1];
|
|
|
-
|
|
|
-
|
|
|
+ if (isset($temp[1])) {
|
|
|
+ $data['county_name'] = $temp[1];
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
return $data;
|