error(lang('contact.yzm_error')); } if ($_REQUEST['email'] !== $_REQUEST['re_email']) { return $this->error(lang('contact.email_error')); } unset($_REQUEST['re_email']); unset($_REQUEST['s']); unset($_REQUEST['yzm']); $_REQUEST['reg_time'] = date('Y-m-d H:i:s'); $_REQUEST['source'] = MODEL; $_REQUEST['model'] = CONTACT_MODEL; $_REQUEST['lang'] = Cookie::get('think_var'); $_REQUEST['token'] = md5(CONTACT_MODEL); try { $order_res = Httpcurl::request(config('app.CREATE_CONTACT_URL'), 'post', $_REQUEST); $order = json_decode($order_res[0], true); if (!$order['code']) { return $this->error($order['msg']); } return $this->success(lang('contact.success')); } catch (\Exception $e) { return $this->error(lang('contact.fail')); } } }