Browse Source

h5访客登记

zgg 4 months ago
parent
commit
fb17774f9f
1 changed files with 18 additions and 1 deletions
  1. 18 1
      application/api/controller/h5/VisitorOrder.php

+ 18 - 1
application/api/controller/h5/VisitorOrder.php

@@ -58,7 +58,24 @@ class VisitorOrder extends Base
         }
         }
         HelpHander::success($lists);
         HelpHander::success($lists);
     }
     }
-
+    public function last(){
+        $map[] = ['del','=',0];
+        $map[] = ['type','=',2];
+        $map[] = ['user_id','=',$this->userId];
+        $map[] = ['org_id','=',$this->orgId];
+        $data = [
+            'name' => '',
+            'phone' => '',
+            'access' => ''
+        ];
+        $info = Db::name('visitor_order')->where($map)->order('id desc')->find();
+        if($info){
+            $data['name'] = $info['name'];
+            $data['phone'] = $info['phone'];
+            $data['access'] = $info['access'];
+        }
+        HelpHander::success($data);
+    }
     // 提交确认
     // 提交确认
     public function order(){
     public function order(){
         $type = input('type');
         $type = input('type');