insert($data); }//end addCode() /** * 查询验证码 */ public function selectCode($safetyCodeKey) { // // 查询验证码 $codeWhere['code_key'] = $safetyCodeKey; $code = $this ->field('code_key, code_time') ->where($codeWhere) ->find(); return [ 'code' => 1, 'msg' => '', 'data' => $code, ]; }//end addCode() }