Your Name 3 lat temu
rodzic
commit
daca9704eb
2 zmienionych plików z 17 dodań i 2 usunięć
  1. 2 0
      tool/work/assets/pc/html/callback.html
  2. 15 2
      tool/work/lib/Appoint.php

+ 2 - 0
tool/work/assets/pc/html/callback.html

@@ -159,6 +159,7 @@ function search()
 	      data: {
 	        phone : $('#content').val(),
 	        //json:2,
+          type:1
 	      },
 	      //dataType: "json",
 	      success: function (data) {
@@ -192,6 +193,7 @@ $('#content').bind('keydown',function(event){
 	      data: {
 	        phone : $('#content').val(),
 	        //json:2,
+          type :1,
 	      },
 	      //dataType: "json",
 	     success: function (data) {

+ 15 - 2
tool/work/lib/Appoint.php

@@ -535,12 +535,22 @@ Class Appoint
 
     public function callback_api(){
         $mobile = Dever::input('phone');
+        $type = Dever::input('type');
         
         $data = array();
         if ($mobile) {
+            $state = 2;
             if(!preg_match('/^1[3|5|6|7|8|9]\d{9}$/', $mobile)){
                 // Dever::alert('代理商手机号不正确');
-                return  '手机号不正确';
+                $state = 1;
+                if ($type == 1) {
+                    return  '手机号不正确';
+                }
+            }
+
+            if ($state == 1) {
+                $data = array();
+                return Dever::render('callback', $data); 
             }
             $data['user']['title'] = '电话号码';
             $data['user']['mobile'] = $mobile;
@@ -611,6 +621,9 @@ Class Appoint
             $data['user']['work_list'] = Dever::url('home?link=' . urlencode($data['user']['work_list']) . '&group=10&parent_menu=work&menu=work.info' , 'manage');
 
              return Dever::render('callback', $data); 
+        }else {
+            $data = array();
+            return Dever::render('callback', $data); 
         }
-    }
+    } 
 }