WIN-2308041133\Administrator hace 1 día
padre
commit
6e2e5d345a
Se han modificado 1 ficheros con 15 adiciones y 0 borrados
  1. 15 0
      app/api/controller/store/DeviceRepairController.php

+ 15 - 0
app/api/controller/store/DeviceRepairController.php

@@ -71,6 +71,21 @@ class DeviceRepairController
 //        if (!$validate->check($data)) {
 //            return json(['code' => 0, 'msg' => $validate->getError()]);
 //        }
+        if ($repair_problem == ''){
+            return app('json')->fail('请描述报修问题');
+        }
+        if ($return_address == ''){
+            return app('json')->fail('请填写寄回地址');
+        }
+        if ($contact_name == ''){
+            return app('json')->fail('请填写联系人姓名');
+        }
+        if ($contact_phone == ''){
+            return app('json')->fail('请填写联系电话');
+        }
+        if (!Validate::is($contact_phone,'mobile')){
+            return app('json')->fail('请填写正确的手机号');
+        }
         $data = [
             'device_name' => $device_name,
             'device_number' => $device_number,