提交
This commit is contained in:
@@ -5,7 +5,6 @@ const UPDATE_EVUS_ORDER_URL = 'https://uniuser.jzvisa.com/home/order/updateevus'
|
||||
const CREATE_ORDER_URL = 'https://uniuser.jzvisa.com/home/order/do_apply';
|
||||
const NEWS_LIST = 'https://uniuser.jzvisa.com/home/news/lists';
|
||||
const NEWS_DETAIL = 'https://uniuser.jzvisa.com/home/news/detail';
|
||||
const YZM_URL = 'https://uniuser.jzvisa.com/home/sms/sendCode';
|
||||
|
||||
const GET_ORDER_URL = 'https://uniuser.jzvisa.com/home/order/orderList';
|
||||
|
||||
|
||||
@@ -18,9 +18,14 @@ class Auth extends Base
|
||||
}
|
||||
|
||||
$mobile = trim((string)$data['mobile']);
|
||||
$smsUrl = $this->smsUrl();
|
||||
if ($smsUrl === '') {
|
||||
return $this->fail('短信验证码接口未配置');
|
||||
}
|
||||
|
||||
$code = mt_rand(1001, 9999);
|
||||
$siteDomain = $this->currentSiteDomain();
|
||||
$response = Httpcurl::request(YZM_URL, 'post', [
|
||||
$response = Httpcurl::request($smsUrl, 'post', [
|
||||
'mobile' => $mobile,
|
||||
'code' => $code,
|
||||
'model' => MODEL,
|
||||
@@ -153,6 +158,11 @@ class Auth extends Base
|
||||
return 'miniapi_sms_code_' . md5($this->currentMiniAppCode() . '|' . $mobile);
|
||||
}
|
||||
|
||||
private function smsUrl(): string
|
||||
{
|
||||
return trim((string)config('app.yzm_url'));
|
||||
}
|
||||
|
||||
private function currentSiteDomain(): string
|
||||
{
|
||||
$domain = trim((string)($this->currentMiniApp()['site_domain'] ?? ''));
|
||||
|
||||
@@ -180,6 +180,7 @@ class Base extends BaseController
|
||||
Config::set(['download_evus_url' => $data['download_evus_url'] ?? ''], 'app');
|
||||
Config::set(['update_order_url' => $data['update_order_url'] ?? ''], 'app');
|
||||
Config::set(['LOOKUP_URL' => $data['evus_look_url'] ?? ''], 'app');
|
||||
Config::set(['yzm_url' => $data['yzm_url'] ?? ''], 'app');
|
||||
Config::set(['OCR_BASE_URL' => $data['ocr_base_url'] ?? ''], 'app');
|
||||
Config::set(['OCR_APP_ID' => $data['ocr_app_id'] ?? ''], 'app');
|
||||
Config::set(['OCR_SECRET' => $data['ocr_secret'] ?? ''], 'app');
|
||||
|
||||
Reference in New Issue
Block a user