Commit 9082e7be authored by rlgy's avatar rlgy

update

parent 9e352a3f
backend/assets
backend/runtime
backend/upload
console/runtime
console/logs
\ No newline at end of file
runtime/*
logs/*
\ No newline at end of file
runtime/*
\ No newline at end of file
main-local.php
params-local.php
\ No newline at end of file
<?php
/**
* Created by PhpStorm.
* User: rlgyzhcn
* Date: 18-5-31
* Time: 上午10:27
*/
return [
];
\ 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' => dirname(__DIR__),
'timeZone' => 'Etc/GMT-8',
'controllerNamespace' => 'api\controllers',
'bootstrap' => ['log'],
'defaultRoute' => 'site/index',
'layout' => false,
'modules' => [],
'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:31
*/
return [
'feixiaohao_domain' => 'https://www.feixiaohao.com',
'feixiaohao_page' => [
'assets' => '/assets/',//代币
'currencies' => '/currencies/',//币种详情
'coinmarket' => '/coinmarket/',//上市交易所
],
];
\ 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', '/home/rlgyzhcn/Desktop/33/token');
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
assets/*
upload/*
runtime/*
\ No newline at end of file
main-local.php
params-local.php
\ No newline at end of file
<?php
/**
* Created By Sublime Text 3
*
* @date 2018-09-07 15:55:45
* @authors rlgy <rlgyzhcn@qq.com>
*/
return [
];
<?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',
'timeZone' => 'Etc/GMT-8',
'controllerNamespace' => 'backend\controllers',
'bootstrap' => ['log'],
'defaultRoute' => 'site/index',
'layout' => 'main',
'modules' => [],
'components' => [
'request' => [
'class' => 'common\core\Request',
'baseUrl' => '/admin',
'cookieValidationKey' => 'Yr4XDePew55tutE3CVZ7vBUqVO3iorN6',
],
'session' => [
'name' => 'manage-backend',
],
'errorHandler' => [
'errorAction' => 'public/error',
],
'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:57:10
* @authors rlgy <rlgyzhcn@qq.com>
*/
return [
];
<?php
/**
* Created By Sublime Text 3
*
* @date 2018-09-07 15:56:52
* @authors rlgy <rlgyzhcn@qq.com>
*/
return [
'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', 'dev');
define('WALLET_PROJECT_PATH', '/home/rlgyzhcn/Desktop/33/token');
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();
main-local.php
params-local.php
\ No newline at end of file
<?php
/**
* Created By Sublime Text 3
*
* @date 2018-09-07 15:51:07
* @authors rlgy <rlgyzhcn@qq.com>
*/
Yii::setAlias('@api', WALLET_PROJECT_PATH . '/api');
Yii::setAlias('@common', WALLET_PROJECT_PATH . '/common');
Yii::setAlias('@backend', WALLET_PROJECT_PATH . '/backend');
Yii::setAlias('@console', WALLET_PROJECT_PATH . '/console');
Yii::setAlias('@vendor', WALLET_PROJECT_PATH . '/vendor');
<?php
/**
* Created By Sublime Text 3
*
* @date 2018-09-07 15:55:45
* @authors rlgy <rlgyzhcn@qq.com>
*/
return [
'components' => [
/**
* db config
*/
'db' => [
'class' => 'yii\db\Connection',
'dsn' => 'mysql:host=127.0.0.1;dbname=manage',
'username' => 'root',
'password' => '123456',
'charset' => 'utf8',
'tablePrefix' => 'gli_',
],
'db_pwallet' => [
'class' => 'yii\db\Connection',
'dsn' => 'mysql:host=127.0.0.1;dbname=api',
'username' => 'root',
'password' => '123456',
'charset' => 'utf8',
],
'cache' => [
'class' => 'yii\redis\Cache',
'redis' => [
'hostname' => 'localhost',
'port' => 6379,
'password' => 'jlm123456',
'database' => 0,
],
],
'redis' => [
'class' => 'yii\redis\Connection',
'hostname' => 'localhost',
'password' => 'jlm123456',
'port' => 6379,
'database' => 1,
],
'redis-queue' => [
'class' => 'yii\redis\Connection',
'hostname' => 'localhost',
'password' => 'jlm123456',
'port' => 6379,
'database' => 2,
],
'queue' => [
'class' => \yii\queue\redis\Queue::class,
'redis' => 'redis-queue', // Redis connection component or its config
'channel' => 'queue', // Queue channel key
],
'uploader' => [
'class' => 'common\components\uploader\Uploader',
'baseuri' => 'http://127.0.0.1:8900/admin/upload',
'absolute' => dirname(dirname(__DIR__)) . '/backend/upload',
],
],
];
<?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',
'aliases' => [
'@bower' => '@vendor/bower-asset',
'@npm' => '@vendor/npm-asset',
],
'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 清除缓存
],
'db' => [
'class' => 'yii\db\Connection',
'dsn' => 'mysql:host=127.0.0.1;dbname=manage',
'username' => 'root',
'password' => '12345678',
'charset' => 'utf8',
'tablePrefix' => 'gli_',
],
'db_pwallet' => [
'class' => 'yii\db\Connection',
'dsn' => 'mysql:host=127.0.0.1;dbname=api',
'username' => 'root',
'password' => '123456',
'charset' => 'utf8',
],
'p_sources' => [
'class' => 'yii\db\Connection',
'dsn' => 'mysql:host=127.0.0.1;dbname=p_sources',
'username' => 'root',
'password' => '123456',
'charset' => 'utf8',
],
'cache' => [
'class' => 'yii\redis\Cache',
'redis' => [
'hostname' => 'localhost',
'port' => 6379,
'database' => 0,
],
],
'redis' => [
'class' => 'yii\redis\Connection',
'hostname' => 'localhost',
'port' => 6379,
'database' => 1,
],
'redis-queue' => [
'class' => 'yii\redis\Connection',
'hostname' => 'localhost',
'port' => 6379,
'database' => 2,
],
'queue' => [
'class' => \yii\queue\redis\Queue::class,
'redis' => 'redis-queue', // Redis connection component or its config
'channel' => 'queue', // 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' => 'http://127.0.0.1:8900/admin/upload',
'absolute' => dirname(dirname(__DIR__)) . '/backend/upload',
],
'log' => [
'targets' => [
[
'class' => 'yii\log\FileTarget',
'levels' => ['info'],
'categories' => [
'backend\*',
'api\*',
'common\*',
'console\*',
],
'logVars' => [],
],
],
],
],
];
<?php
/**
* Created By Sublime Text 3
*
* @date 2018-09-07 15:57:10
* @authors rlgy <rlgyzhcn@qq.com>
*/
return [
];
<?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' => '末页',
],
/**
* 非小号数据爬取地址
*/
'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,
],
];
main-local.php
params-local.php
\ No newline at end of file
<?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' => dirname(__DIR__),
'timeZone' => 'Etc/GMT-8',
'bootstrap' => [
'log',
'queue'
],
'controllerNamespace' => 'console\controllers',
'aliases' => [
'@bower' => '@vendor/bower-asset',
'@npm' => '@vendor/npm-asset',
],
'components' => [
],
'params' => $params,
];
yii-queue.log
\ No newline at end of file
#!/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', '/home/rlgyzhcn/Desktop/33/token');
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