Commit d8c3d9c0 authored by rlgyzhcn's avatar rlgyzhcn

online params init

parent 427e9a89
...@@ -9,15 +9,15 @@ assets/* ...@@ -9,15 +9,15 @@ assets/*
backend/assets/ backend/assets/
# web config # web config
**/main-local.php #**/main-local.php
**/params-local.php #**/params-local.php
# web run index # web run index
**/index.php #**/index.php
**/yii #**/yii
.idea/ .idea/
.setting/ .setting/
backend/upload/ backend/upload/
# visual studio code # visual studio code
.vscode .vscode
\ No newline at end of file
<?php
/**
* Created by PhpStorm.
* User: rlgyzhcn
* Date: 18-5-31
* Time: 上午10:26
*/
$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-api',
'basePath' => '@api',
'controllerNamespace' => 'api\controllers',
'defaultRoute' => 'site/index',
'layout' => false,
'components' => [
'request' => [
'baseUrl' => '/interface',
'cookieValidationKey' => '123456',
'enableCsrfValidation' => false,
'parsers' => [
'application/json' => [
'class' => 'yii\web\JsonParser',
'throwException' => false,//json格式错误不报错
],
],
],
'response' => [
'class' => 'api\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', false);
defined('YII_ENV') or define('YII_ENV', 'prod');
define('WALLET_PROJECT_PATH', '/var/www/html/token_test'); //定义框架代码的目录
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();
<?php
/**
* Created By Sublime Text 3
*
* @date 2018-09-07 15:55:20
* @authors rlgy <rlgyzhcn@qq.com>
*/
$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-backend',
'basePath' => '@backend',
'controllerNamespace' => 'backend\controllers',
'defaultRoute' => 'site/index',
'layout' => 'main',
'components' => [
'user' => [
'class' => 'yii\web\User',
'loginUrl' => ['login/login'],
'enableAutoLogin' => true,
'identityClass' => 'common\models\Admin',
'identityCookie' => [
'name' => '_identity-backend',
'httpOnly' => true,
],
],
'authManager' => [
'class' => 'common\core\rbac\DbManager',
],
'assetManager' => [
'bundles' => [
'yii\web\JqueryAsset' => [
'sourcePath' => null,
'js' => [],
'depends' => [],
],
'yii\bootstrap\BootstrapAsset' => [
'css' => [],
],
],
'linkAssets' => true, //true 清除缓存
],
'request' => [
'class' => 'common\core\Request',
'baseUrl' => '/admin',
'cookieValidationKey' => 'Yr4XDePew55tutE3CVZ7vBUqVO3iorN6',
],
'session' => [
'name' => 'manage-backend',
],
'errorHandler' => [
'errorAction' => 'public/error',
],
'log' => [
'traceLevel' => YII_DEBUG ? 3 : 0,
'targets' => [
[
'class' => 'yii\log\FileTarget',
'levels' => ['error', 'warning'],
],
],
],
'urlManager' => [
'class' => 'common\core\UrlManager',
'enablePrettyUrl' => true,
'showScriptName' => false,
'rules' => [
],
],
],
/**
* 通过配置文件附加行为,全局
*/
'as rbac' => [
'class' => 'common\behaviors\RbacBehavior',
'allowActions' => [
'login/login',
'login/logout',
'public/*',
'chat/*',
'debug/*',
'gii/*', // 不需要权限检测
],
],
/**
* 只允许一处登陆
*/
'as check' => [
'class' => 'common\filter\LoginFilter',
'filter' => false, //[true:允许单 false:允许多]
],
'params' => $params,
];
<?php
/**
* Created By Sublime Text 3
*
* @date 2018-09-07 15:56:52
* @authors rlgy <rlgyzhcn@qq.com>
*/
return [
'user.passwordResetTokenExpire' => 3600,
'admin' => 1,
/* 后台页面属性配置 */
'config_page' => [
'add' => '添加',
'delete' => '删除',
'update' => '更新',
'tool_bar' => '工具箱',
'export' => '导出Excel',
'others' => '其它',
'details' => '详情',
'color_opt' => 'btn-primary',
'color_bar' => 'btn-primary',
],
'pager' => [
'options' => ['class' => 'pagination', 'style' => 'visibility: visible;'],
'firstPageLabel' => "首页",
'prevPageLabel' => '上一页',
'nextPageLabel' => '下一页',
'lastPageLabel' => '末页',
],
'adminEmail' => 'admin@example.com',
/* 后台错误页面模板 */
'action_error' => '@backend/views/public/error.php', // 默认错误跳转对应的模板文件
'action_success' => '@backend/views/public/success.php', // 默认成功跳转对应的模板文件
];
<?php
/**
* Created By Sublime Text 3
*
* @date 2018-09-07 15:46:57
* @authors rlgy <rlgyzhcn@qq.com>
*/
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'prod');
define('WALLET_PROJECT_PATH', '/var/www/html/token_test'); //定义框架代码的目录
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();
<?php
/**
* Created By Sublime Text 3
*
* @date 2018-09-07 15:55:20
* @authors rlgy <rlgyzhcn@qq.com>
*/
return [
'vendorPath' => '@vendor',
'sourceLanguage' => 'en',
'language' => 'zh-CN',
'timeZone' => 'Etc/GMT-8',
'aliases' => [
'@bower' => '@vendor/bower-asset',
'@npm' => '@vendor/npm-asset',
],
'bootstrap' => [
'log',
'queue',
],
'components' => [
# 'request' => [
# // !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
# 'class' => 'common\base\BaseRequest',
# 'cookieValidationKey' => 'Aagb1nulB6XAxutSiagyVEUfptB_FGvu',
# 'enableCsrfValidation' => false,
# ],
'db' => [
'class' => 'yii\db\Connection',
'dsn' => 'mysql:host=rm-bp1e72v3b2ooc5e4keo.mysql.rds.aliyuncs.com;dbname=p_manage',
'username' => 'bqb',
'password' => 'l7unhjtOq0EX1zjCOfbi4fIh',
'charset' => 'utf8',
'tablePrefix' => 'gli_',
],
'db_pwallet' => [
'class' => 'yii\db\Connection',
'dsn' => 'mysql:host=rm-bp1e72v3b2ooc5e4keo.mysql.rds.aliyuncs.com;dbname=p_coin',
'username' => 'bqb',
'password' => 'l7unhjtOq0EX1zjCOfbi4fIh',
'charset' => 'utf8',
],
'p_sources' => [
'class' => 'yii\db\Connection',
'dsn' => 'mysql:host=rm-bp1e72v3b2ooc5e4keo.mysql.rds.aliyuncs.com;dbname=p_sources',
'username' => 'bqb',
'password' => 'l7unhjtOq0EX1zjCOfbi4fIh',
'charset' => 'utf8',
],
'cache' => [
'class' => 'yii\redis\Cache',
'redis' => [
'hostname' => 'localhost',
'port' => 6379,
'password' => 'fuzamei47100222198',
'database' => 1,
],
],
'redis' => [
'class' => 'yii\redis\Connection',
'hostname' => 'localhost',
'port' => 6379,
'password' => 'fuzamei47100222198',
'database' => 2,
],
'redis-queue' => [
'class' => 'yii\redis\Connection',
'hostname' => 'localhost',
'port' => 6379,
'password' => 'fuzamei47100222198',
'database' => 3,
],
'redis_app' => [
'class' => 'yii\redis\Connection',
'hostname' => 'localhost',
'port' => 6379,
'password' => 'fuzamei47100222198',
'database' => 4,
],
'queue' => [
'class' => \yii\queue\redis\Queue::class,
'redis' => 'redis-queue', // Redis connection component or its config
'channel' => 'queue_guodun', // Queue channel key
],
'i18n' => [
'translations' => [
'*' => [
'class' => 'yii\i18n\PhpMessageSource',
'basePath' => '@common/messages',
'fileMap' => [
'common' => 'common.php',
'error' => 'errorCode.php',
],
],
],
],
'uploader' => [
'class' => 'common\components\uploader\Uploader',
'baseuri' => 'https://b.biqianbao.net/admin/upload',
'absolute' => dirname(dirname(__DIR__)) . '/backend/upload',
],
'log' => [
'targets' => [
[
'class' => 'yii\log\FileTarget',
'levels' => ['info', 'warning'],
'categories' => [
'backend\*',
'api\*',
'common\*',
'console\*',
'h5\*',
],
'logVars' => [],
],
],
],
'des'=>[
'class' => 'common\components\Des',
'key' => '008f80e79e6b8c6a500e54e216e38ac2',
'method'=> 'DES-CBC',
'output'=> 'base64',
'iv' => '33878402',
'options'=> OPENSSL_RAW_DATA | OPENSSL_NO_PADDING,
],
],
];
<?php
/**
* Created By Sublime Text 3
*
* @date 2018-09-07 15:56:52
* @authors rlgy <rlgyzhcn@qq.com>
*/
return [
/**
* 非小号数据爬取地址
*/
'feixiaohao_domain' => 'https://www.feixiaohao.com',
'feixiaohao_page' => [
'assets' => '/assets/', //代币
'currencies' => '/currencies/', //币种详情
'coinmarket' => '/coinmarket/', //上市交易所
],
/**
* 爬虫数据缓存时间
*/
'curl_cache_time' => [
'exchange' => 3600 * 3 * 24,
'exchange_count' => 3600 * 3 * 24,
'quotation' => 60,
],
'http_proxy' => [
'host' => '127.0.0.1',
'port' => '8118',
'use' => true,
],
'chain' => [
'scheme' => 'http',
'host' => '39.98.51.242',
'port' => 8901,
],
'chain33' =>[
'scheme' => 'http',
'host' => '39.98.163.4',
'port' => 8801,
],
'chain_parallel' => [
'primary' => [
'scheme' => 'http',
'host' => '39.98.163.4',
'port' => 8901,
],
'secondary' => [
'scheme' => 'https',
'host' => 'beanwallet.com/api',
'port' => ''
],
'wasm' => [
'scheme' => 'http',
'host' => '39.100.69.229',
'port' => '8901'
]
],
'h5_activity' => [
'ZWG_GUESS_NEWBEE' => [
'from' => '1MNwSHugmoBcGxqfU8Gt4excUg68DA7hYE', //转币地址
'to' => '14o9MHrrLfpsXf7wu4H4YRwvy84fjd7uaj', //新手 0.001个bty投一次
'to_normal' => '1415uErzSxEVXdfcYLc9ud6G377iStd2xL', //2 个bty投一次
'amount' => 0.001,
'note' => '',
'isToken' => false,
'token' => '',
'award_normal' => 0.1,
'award_beta' => 1,
'award_isToken' => true,
'award_token' => 'ZWGYBA',
'do_award_step' => 10, //开奖区块步进
],
],
'service' => [
'ZhaobiService' => [ //找币接口
'validatecode' => [ //接口名称
'method' => 'POST',
'scheme' => 'https',
'host' => 'pcapi.zhaobi.tech',
'port' => '',
'path' => '/api/send/validatecode',
],
],
],
'bty_fee' => 0.001,
'trusteeship' => [
'node_1' => 'http://47.75.94.84',
'node_10' => 'https://api.travelservicechain.com',
]
];
<?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-console',
'basePath' => '@console',
'controllerNamespace' => 'console\controllers',
'params' => $params,
];
<?php
/**
* Created by PhpStorm.
* User: rlgyzhcn
* Date: 18-5-31
* Time: 上午10:26
*/
defined('YII_DEBUG') or define('YII_DEBUG', false);
defined('YII_ENV') or define('YII_ENV', 'prod');
define('WALLET_PROJECT_PATH', '/var/www/html/token_test'); //定义框架代码的目录
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();
<?php
/**
* Created by PhpStorm.
* User: rlgyzhcn
* Date: 18-5-31
* Time: 上午10:26
*/
$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格式错误不报错
# ],
# ],
# ],
'request' => [
// !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
'class' => 'common\base\BaseRequest',
'cookieValidationKey' => 'Aagb1nulB6XAxutSiagyVEUfptB_FGvu',
'enableCsrfValidation' => false,
],
'authManager' => [
'class' => 'common\core\rbac\DbManager',
],
'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
defined('YII_DEBUG') or define('YII_DEBUG', false);
defined('YII_ENV') or define('YII_ENV', 'prod');
define('WALLET_PROJECT_PATH', '/var/www/html/token_test'); //定义框架代码的目录
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();
#!/usr/bin/env php
<?php
/**
* Yii console bootstrap file.
*
* @link http://www.yiiframework.com/
* @copyright Copyright (c) 2008 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'dev');
define('USER_PROXY', true);
define('WALLET_PROJECT_PATH', '/var/www/html/token_test'); //定义框架代码的目录
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__ . '/console/config/main.php',
require __DIR__ . '/console/config/main-local.php'
);
$application = new yii\console\Application($config);
$exitCode = $application->run();
exit($exitCode);
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