Browse Source

Signed-off-by: MrHgx <252766929@qq.com>1

MrHgx 6 years ago
parent
commit
e01392abfd
2 changed files with 72 additions and 0 deletions
  1. 57 0
      common/config/main.php
  2. 15 0
      common/config/redis-local.php

+ 57 - 0
common/config/main.php

@@ -0,0 +1,57 @@
+<?php
+return [
+    'aliases' => [
+        '@bower' => '@vendor/bower-asset',
+        '@npm'   => '@vendor/npm-asset',
+    ],
+    'vendorPath' => dirname(dirname(__DIR__)) . '/vendor',
+	'sourceLanguage' => 'en',
+	'language' => 'zh-CN',
+    'components' => [
+		//  新添加的
+		'Amqp' => [
+			'class' => 'components\service\Amqp',
+			'host'	=> '127.0.0.1',
+			'port'	=> '5672',
+			'user'	=> 'guest',
+			'pass'	=> 'Guest',
+		],
+        'cUrl' => [
+            'class' => '\components\components\CUrl'
+        ],
+//
+//        //新增加的加密
+        'messageQueue' => [
+            'class' => '\components\components\messageQueue\MessageInterface',
+            'key' => 'QkwzrML50o1KIK5bI-HbkVBcTSA_Ehdh',
+            'protocol' => 'http',
+           'host' => '120.78.153.45'
+            //           'host' => 'ki.logsystemadmin.airent.test.com'
+        ],
+
+        'cache' => [
+            'class' => 'yii\caching\FileCache',
+        ],
+
+        'redis' => [
+            'class' => 'yii\redis\Connection',
+            'hostname'	=> '139.196.43.170',
+            'port' => 6378,
+            'database' => 0,
+            'password' => 'airent-redis~123',
+        ],
+
+		'i18n' => [
+			'translations' => [
+				'*' => [
+					'class' => 'yii\i18n\PhpMessageSource',
+					'basePath'=>'@common/messages',
+					'fileMap' => [
+						'common' => 'common.php',
+						'error'	 => 'errorCode.php',
+					],
+				],
+			],
+		],
+    ],
+];

+ 15 - 0
common/config/redis-local.php

@@ -0,0 +1,15 @@
+<?php
+
+return [
+    'class' => 'yii\redis\Connection',
+
+//    'hostname'	=> '192.168.3.10',
+//    'port' => 6379,
+//    'database' => 0,
+//    'password' => 'redis12078',
+
+    'hostname'	=> '139.196.43.170',
+    'port' => 6378,
+    'database' => 0,
+    'password' => 'airent-redis~123',
+];