333
This commit is contained in:
parent
d0e47ea732
commit
a320630bb0
|
|
@ -23,7 +23,7 @@ class CorsMiddleware
|
|||
header('Access-Control-Allow-Origin: *');
|
||||
header('Access-Control-Max-Age: 1800');
|
||||
header('Access-Control-Allow-Methods: GET, POST, PATCH, PUT, DELETE');
|
||||
header('Access-Control-Allow-Headers: Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since, X-CSRF-TOKEN, X-Requested-With,access-token,token,client,platform,version,clickid,device,device_info,adid');
|
||||
header('Access-Control-Allow-Headers: Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since, X-CSRF-TOKEN, X-Requested-With,access-token,token,client,platform,version,clickid,device,device_info,adid,os');
|
||||
|
||||
// 继续执行下一个中间件
|
||||
$response = $next($request);
|
||||
|
|
|
|||
|
|
@ -32,6 +32,8 @@ class AppPlatform extends BasePlatform
|
|||
{
|
||||
// 获取订单编号
|
||||
$version = Request::param('version', '1.0.0');
|
||||
$os = Request::header('os', 'ios');
|
||||
|
||||
$versionNumber = (int) preg_replace('/[^0-9]/', '', $version);
|
||||
$config = [
|
||||
'isWebPay' => false,
|
||||
|
|
@ -40,16 +42,19 @@ class AppPlatform extends BasePlatform
|
|||
'userAgreement' => "https://zfunbox.cn?_p=cb20xad0e35094521ae46a1d1fb0ddd1&time=" . time()
|
||||
];
|
||||
$is_env_test = EnvHelper::getIsTest();
|
||||
|
||||
if ($is_env_test) {
|
||||
$config['userAgreement'] = "https://testweb.zfunbox.cn?_p=cb20xad0e35094521ae46a1d1fb0ddd1&time=" . time();
|
||||
}
|
||||
// $config['userAgreement'] = " https://192.168.1.21:3001?_p=cb20xad0e35094521ae46a1d1fb0ddd1&time=" . time();
|
||||
$configVersion = (int) preg_replace('/[^0-9]/', '', $config['version']);
|
||||
if ($versionNumber >= $configVersion) {
|
||||
$config['buildVersion'] = '105';
|
||||
// $config['isCheck'] = true;
|
||||
$config['userAgreement'] = "https://zfunbox.cn/pages/guize/guize?type=4";
|
||||
if ($os == 'ios') {
|
||||
// $config['userAgreement'] = " https://192.168.1.21:3001?_p=cb20xad0e35094521ae46a1d1fb0ddd1&time=" . time();
|
||||
$configVersion = (int) preg_replace('/[^0-9]/', '', $config['version']);
|
||||
if ($versionNumber >= $configVersion) {
|
||||
$config['buildVersion'] = '105';
|
||||
// $config['isCheck'] = true;
|
||||
$config['userAgreement'] = "https://zfunbox.cn/pages/guize/guize?type=4";
|
||||
|
||||
}
|
||||
}
|
||||
return $config;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user