作者 郭鑫

需求修改

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