Commit 427e9a89 authored by rlgyzhcn's avatar rlgyzhcn

online params init

parent c358089f
...@@ -13,9 +13,11 @@ Yii::setAlias('@backend', WALLET_PROJECT_PATH . '/backend'); ...@@ -13,9 +13,11 @@ Yii::setAlias('@backend', WALLET_PROJECT_PATH . '/backend');
Yii::setAlias('@console', WALLET_PROJECT_PATH . '/console'); Yii::setAlias('@console', WALLET_PROJECT_PATH . '/console');
Yii::setAlias('@vendor', WALLET_PROJECT_PATH . '/vendor'); Yii::setAlias('@vendor', WALLET_PROJECT_PATH . '/vendor');
Yii::setAlias('@h5', WALLET_PROJECT_PATH . '/h5'); Yii::setAlias('@h5', WALLET_PROJECT_PATH . '/h5');
Yii::setAlias('@wallet', WALLET_PROJECT_PATH . '/wallet');
// 运行目录别名 // 运行目录别名
Yii::setAlias('@backend/runtime', WALLET_RUNTIME_PATH . '/backend'); Yii::setAlias('@backend/runtime', WALLET_RUNTIME_PATH . '/backend');
Yii::setAlias('@console/runtime', WALLET_RUNTIME_PATH . '/console'); Yii::setAlias('@console/runtime', WALLET_RUNTIME_PATH . '/console');
Yii::setAlias('@api/runtime', WALLET_RUNTIME_PATH . '/api'); Yii::setAlias('@api/runtime', WALLET_RUNTIME_PATH . '/api');
Yii::setAlias('@h5/runtime', WALLET_RUNTIME_PATH . '/h5'); Yii::setAlias('@h5/runtime', WALLET_RUNTIME_PATH . '/h5');
Yii::setAlias('@wallet/runtime', WALLET_RUNTIME_PATH . '/wallet');
<?php
/**
* Created by PhpStorm.
* User: jiaming
* Date: 2019/6/20
* Time: 11:11
*/
return [
'global' => [
'common\behaviors\LoginStatusAuthInterceptor',
'common\behaviors\UserAuthInterceptor',
],
'default' => [
]
];
...@@ -69,5 +69,7 @@ return [ ...@@ -69,5 +69,7 @@ return [
], ],
'lottery' => require(dirname(__FILE__) . '/lottery.php'), 'lottery' => require(dirname(__FILE__) . '/lottery.php'),
'trusteeship' => require(dirname(__FILE__) . '/trusteeship.php'), 'trusteeship' => require(dirname(__FILE__) . '/trusteeship.php'),
'user_auth' => require(dirname(__FILE__) . '/user_auth.php'),
'interceptor' => require(dirname(__FILE__) . '/interceptor.php'),
'coin_quotation_disable_items' => ['WTC','ETC'] 'coin_quotation_disable_items' => ['WTC','ETC']
]; ];
...@@ -9,8 +9,10 @@ ...@@ -9,8 +9,10 @@
return [ return [
'service' => [ 'service' => [
'scheme' => 'http', 'scheme' => 'http',
'host' => '114.55.11.139', #'host' => '114.55.11.139',
'port' => 1111, #'port' => 1111,
'host' => '47.75.94.84',
'port' => 80,
], ],
'coin_getsupport' => '/v1/coin/get-support', //获取支持的币种 'coin_getsupport' => '/v1/coin/get-support', //获取支持的币种
]; ];
\ No newline at end of file
<?php
/**
* Created by PhpStorm.
* User: jiaming
* Date: 2019/6/20
* Time: 11:11
*/
return [
'auth_all' => [
[
'class' => 'wallet\controllers\UserController',
'actions' => []
],[
'class' => 'wallet\controllers\WalletController',
'actions' => []
],[
'class' => 'wallet\controllers\MonitorController',
'actions' => []
]
],
'auth_common' => [
[
#'class' => 'api\controllers\AirDropController',
#'actions' => []
]
],
'user_auth' => [
1 => [
1 => 'auth_all'
],
10 => [
31 => 'auth_all'
]
]
];
<?php
$params = array_merge(
require __DIR__ . '/../../common/config/params.php',
require __DIR__ . '/../../common/config/params-local.php',
require __DIR__ . '/params.php',
require __DIR__ . '/params-local.php'
);
return [
'id' => 'app-wallet',
'basePath' => '@wallet',
'controllerNamespace' => 'wallet\controllers',
'defaultRoute' => 'site/index',
'layout' => false,
'components' => [
'request' => [
'baseUrl' => '/api',
'cookieValidationKey' => '123456',
'enableCsrfValidation' => false,
'parsers' => [
'application/json' => [
'class' => 'yii\web\JsonParser',
'throwException' => false,//json格式错误不报错
],
],
],
'response' => [
'class' => 'wallet\base\BaseResponse',
'format' => 'json',
'charset' => 'UTF-8',
],
'errorHandler' => [
'errorAction' => 'site/error',
],
'urlManager' => [
'enablePrettyUrl' => true,
'showScriptName' => false,
],
],
'params' => $params,
];
<?php
/**
* Created by PhpStorm.
* User: rlgyzhcn
* Date: 18-5-31
* Time: 上午10:31
*/
return [
];
\ No newline at end of file
<?php
/**
* Created by PhpStorm.
* User: rlgyzhcn
* Date: 18-5-31
* Time: 上午10:26
*/
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'dev');
define('WALLET_PROJECT_PATH', '/data33/bit-wallet/token'); //定义框架代码的目录
define('WALLET_RUNTIME_PATH', dirname(__DIR__)); //定义程序运行的目录
require WALLET_PROJECT_PATH . '/vendor/autoload.php';
require WALLET_PROJECT_PATH . '/vendor/yiisoft/yii2/Yii.php';
require __DIR__ . '/../common/config/bootstrap.php';
$config = yii\helpers\ArrayHelper::merge(
require __DIR__ . '/../common/config/main.php',
require __DIR__ . '/../common/config/main-local.php',
require __DIR__ . '/config/main.php',
require __DIR__ . '/config/main-local.php'
);
(new yii\web\Application($config))->run();
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment