dever 4 سال پیش
والد
کامیت
86381f80f3
4فایلهای تغییر یافته به همراه5 افزوده شده و 5 حذف شده
  1. 1 1
      database/city.php
  2. 1 1
      database/county.php
  3. 1 1
      database/province.php
  4. 2 2
      src/Api.php

+ 1 - 1
database/city.php

@@ -41,7 +41,7 @@ return array
 			'desc' 		=> '城市名称',
 			'match' 	=> 'is_string',
 			'update'	=> 'text',
-			//'search'	=> 'fulltext',
+			'search'	=> 'fulltext',
 			'list'		=> true,
 		),
 

+ 1 - 1
database/county.php

@@ -41,7 +41,7 @@ return array
 			'desc' 		=> '县区名称',
 			'match' 	=> 'is_string',
 			'update'	=> 'text',
-			//'search'	=> 'fulltext',
+			'search'	=> 'fulltext',
 			'list'		=> true,
 		),
 

+ 1 - 1
database/province.php

@@ -35,7 +35,7 @@ return array
 			'desc' 		=> '省份名称',
 			'match' 	=> 'is_string',
 			'update'	=> 'text',
-			//'search'	=> 'fulltext',
+			'search'	=> 'fulltext',
 			'list'		=> true,
 		),
 

+ 2 - 2
src/Api.php

@@ -254,7 +254,7 @@ class Api
      *
      * @return mixed
      */
-    public function string($area, $im = ',')
+    public function string($area, $im = ',', $unset = true)
     {
         if ($area) {
             $area = explode(',', $area);
@@ -264,7 +264,7 @@ class Api
                     $result[$k] = $this->getName('province', $v);
                 } elseif ($k == 1) {
                     $result[$k] = $this->getName('city', $v);
-                    if ($result[0] == $result[1]) {
+                    if ($result[0] == $result[1] && $unset) {
                         unset($result[1]);
                     }
                 } elseif ($k == 2) {