54 lines
1.6 KiB
PHP
54 lines
1.6 KiB
PHP
<?php
|
|
|
|
defined('YII_DEBUG') or define('YII_DEBUG', true);
|
|
defined('YII_ENV') or define('YII_ENV', 'dev');
|
|
|
|
require __DIR__. '/../helpers/helpers.php';
|
|
require __DIR__ . '/../vendor/autoload.php';
|
|
require __DIR__ . '/../vendor/yiisoft/yii2/Yii.php';
|
|
require __DIR__ . '/../common/config/bootstrap.php';
|
|
require __DIR__ . '/../admin/config/bootstrap.php';
|
|
|
|
$config = yii\helpers\ArrayHelper::merge(
|
|
require __DIR__ . '/../common/config/main.php',
|
|
require __DIR__ . '/../common/config/main-local.php',
|
|
require __DIR__ . '/../admin/config/main.php',
|
|
require __DIR__ . '/../admin/config/main-local.php'
|
|
);
|
|
|
|
if ($_GET['test']?? '' === 'liqi') {
|
|
print_r(get_device_type());die;
|
|
} elseif($_GET['test']?? '' === 'restartOp') {
|
|
$result = opcache_reset();
|
|
echo $result ? 'OPcache 已重置' : 'OPcache 重置失败';die;
|
|
}
|
|
|
|
$client = new \GuzzleHttp\Client();
|
|
$response = $client->post( 'https://api.xiaokang88.com/open-api/client-confirm', [
|
|
'json' => [
|
|
'order_id' => 332,
|
|
]
|
|
]);
|
|
$body = json_decode($response->getBody()->getContents(), true);
|
|
if ($body['code'] != 0) {
|
|
exit($body['message']);
|
|
}
|
|
dd($body)
|
|
//$params = [
|
|
// 'name' => '李四',
|
|
// 'id_card' => '140311199811053052',
|
|
//];
|
|
//$key = '3a8f9b2d7c1e4f8a9b2d7c1e4f8a9b2d7c1e4f8a9b2d7c1e4f8a9b2d7c1e4f8a';
|
|
//if (empty($key)) {
|
|
// return '请配置ase.encrypt_key';
|
|
//}
|
|
//
|
|
//$encrypt = (new \common\services\DataEncryptor($key))->encrypt($params['id_card']);
|
|
//echo "加密\r\n";
|
|
//var_dump($encrypt);
|
|
//$decrypt = (new \common\services\DataEncryptor($key))->decrypt($encrypt);
|
|
//echo "解密\r\n";
|
|
//var_dump($decrypt);
|
|
//return '';
|
|
(new \common\core\WebApplication($config))->run();
|