shish 1 год назад
Родитель
Сommit
11ffd81477
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      app-ghs/controllers/CustomController.php

+ 2 - 1
app-ghs/controllers/CustomController.php

@@ -644,11 +644,12 @@ class CustomController extends BaseController
                 if (stringUtil::isMobile($name)) {
                     $where['mobile'] = $name;
                 } else {
-                    $where['mobile'] = ['like', $name];
                     $shop = $this->shop;
                     //如果是昆明的批发,搜索数字还是优先搜索客户名称,因为客户名称经常会编号
                     if($shop->pfLevel == 1){
                         $where['name'] = ['like', $name];
+                    }else{
+                        $where['mobile'] = ['like', $name];
                     }
                 }
             } else if (stringUtil::isLetter($name)) {