Эх сурвалжийг харах

地址识别添加'盟'和'旗'的识别

wufeng 2 жил өмнө
parent
commit
bfc2586525
1 өөрчлөгдсөн 2 нэмэгдсэн , 2 устгасан
  1. 2 2
      app/common.php

+ 2 - 2
app/common.php

@@ -845,12 +845,12 @@ if (!function_exists('get_address')) {
             $province = $matches[count($matches) - 2];
             $address = preg_replace('/(.*?(省|自治区|北京市|天津市|上海市|重庆市|澳门特别行政区|香港特别行政区))/', '', $address, 1);
         }
-        preg_match('/(.*?(市|自治州|地区|区划|县))/', $address, $matches);
+        preg_match('/(.*?(市|自治州|地区|区划|县|盟))/', $address, $matches);
         if (count($matches) > 1) {
             $city = $matches[count($matches) - 2];
             $address = str_replace($city, '', $address);
         }
-        preg_match('/(.*?(区|县|镇|乡|街道))/', $address, $matches);
+        preg_match('/(.*?(区|县|镇|乡|街道|旗))/', $address, $matches);
         if (count($matches) > 1) {
             $area = $matches[count($matches) - 2];
             $address = str_replace($area, '', $address);