diff --git a/application/index/controller/Index.php b/application/index/controller/Index.php index 6f987e7..881268a 100755 --- a/application/index/controller/Index.php +++ b/application/index/controller/Index.php @@ -89,11 +89,7 @@ class Index extends Controller $res['msg']='没有填写手机号'; return json($res); } - if(!$data['sfz']){ - $res['code']='FAIL'; - $res['msg']='没有填写身份证'; - return json($res); - } + //验证手机号规则 if(!preg_match('/^1([0-9]{9})/',$data['phone'])){ @@ -118,6 +114,15 @@ class Index extends Controller return json($res); } + if($fuActivity_data['id']!=19){ + //如果不是军训的话 就要身份证 + if(!$data['sfz']){ + $res['code']='FAIL'; + $res['msg']='没有填写身份证'; + return json($res); + } + } + //插入未支付的订单 $data['c_time']=date("Y-m-d H:i:s"); $data['status']=1;