作者 郭鑫

需求修改

@@ -238,7 +238,7 @@ class UserneedController extends CommonController @@ -238,7 +238,7 @@ class UserneedController extends CommonController
238 // 加数据库 238 // 加数据库
239 $data = $request->Post(); 239 $data = $request->Post();
240 if(empty($data['code'])){ 240 if(empty($data['code'])){
241 - Db::rollback(); 241 +
242 $this->apiResponse('0','验证码不能为空'); 242 $this->apiResponse('0','验证码不能为空');
243 }else{ 243 }else{
244 $code = $data['code']; 244 $code = $data['code'];
@@ -248,11 +248,11 @@ class UserneedController extends CommonController @@ -248,11 +248,11 @@ class UserneedController extends CommonController
248 $where_code['create_time'] = array('egt',(time()-300)); 248 $where_code['create_time'] = array('egt',(time()-300));
249 $find_code = Db::name('Code')->where($where_code)->order('create_time desc')->field('code')->find(); 249 $find_code = Db::name('Code')->where($where_code)->order('create_time desc')->field('code')->find();
250 if(!$find_code){ 250 if(!$find_code){
251 - Db::rollback(); 251 +
252 $this->apiResponse('0','验证码错误,请重新获取'); 252 $this->apiResponse('0','验证码错误,请重新获取');
253 } 253 }
254 if($code != $find_code['code']){ 254 if($code != $find_code['code']){
255 - Db::rollback(); 255 +
256 $this->apiResponse('0','验证码错误,请重新获取'); 256 $this->apiResponse('0','验证码错误,请重新获取');
257 }else{ 257 }else{
258 $updateCode['status'] = 9; 258 $updateCode['status'] = 9;