Explorar el Código

数据库整理

shish hace 6 años
padre
commit
bd3c921a67

+ 0 - 7
app/admin/config/main.php

@@ -22,13 +22,6 @@ return [
 		    ],
 		    'loginUrl' => ['main/login'],
 	    ],
-        'db' => [
-	        'class' => 'yii\db\Connection',
-	        'dsn' => 'mysql:host=47.99.122.246;dbname=huahuibao',
-	        'username' => 'root',
-	        'password' => 'zt20152008',
-	        'charset' => 'utf8',
-        ],
         'log' => [
             'traceLevel' => YII_DEBUG ? 3 : 0,
             'targets' => [

+ 0 - 7
app/api/config/main.php

@@ -45,13 +45,6 @@ return [
 		    ],
 		    'loginUrl' => ['main/login'],
 	    ],
-        'db' => [
-	        'class' => 'yii\db\Connection',
-	        'dsn' => 'mysql:host=127.0.0.1;dbname=huahuibao',
-	        'username' => 'root',
-	        'password' => '353167',
-	        'charset' => 'utf8',
-        ],
         'log' => [
             'traceLevel' => YII_DEBUG ? 3 : 0,
             'targets' => [

+ 0 - 7
app/backend/config/main.php

@@ -22,13 +22,6 @@ return [
 		    ],
 		    'loginUrl' => ['main/login'],
 	    ],
-        'db' => [
-	        'class' => 'yii\db\Connection',
-	        'dsn' => 'mysql:host=127.0.0.1;dbname=huahuibao',
-	        'username' => 'root',
-	        'password' => 'zt20152008',
-	        'charset' => 'utf8',
-        ],
         'log' => [
             'traceLevel' => YII_DEBUG ? 3 : 0,
             'targets' => [

+ 0 - 7
app/mobile/config/main.php

@@ -21,13 +21,6 @@ return [
 		    ],
 		    'loginUrl' => ['main/index'],
 	    ],
-        'db' => [
-	        'class' => 'yii\db\Connection',
-	        'dsn' => 'mysql:host=127.0.0.1;dbname=huahuibao',
-	        'username' => 'root',
-	        'password' => 'zt20152008', 
-	        'charset' => 'utf8',
-        ],
         'log' => [
             'traceLevel' => YII_DEBUG ? 3 : 0,
             'targets' => [

+ 3 - 1
app/mobile/controllers/MainController.php

@@ -1,6 +1,7 @@
 <?php
 namespace mobile\controllers;
 
+use biz\user\services\UserService;
 use common\components\token;
 use Yii;
 use yii\web\Controller;
@@ -11,7 +12,8 @@ class MainController extends PublicController{
 
 	public function actionIndex()
 	{
-		echo getenv('DB_DSN');die;
+		UserService::getById(1);
+		die;
 		echo token::create(1152);die;
 		$host = Yii::$app->request->getHostInfo();
 		return $this->renderPartial('index',['host'=>$host]);

+ 0 - 7
app/openend/config/main.php

@@ -22,13 +22,6 @@ return [
 		    ],
 		    'loginUrl' => ['main/login'],
 	    ],
-        'db' => [
-	        'class' => 'yii\db\Connection',
-	        'dsn' => 'mysql:host=127.0.0.1;dbname=huahuibao',
-	        'username' => 'root',
-	        'password' => 'zt20152008',
-	        'charset' => 'utf8',
-        ],
         'log' => [
             'traceLevel' => YII_DEBUG ? 3 : 0,
             'targets' => [

+ 0 - 7
app/platform/config/main.php

@@ -22,13 +22,6 @@ return [
 		    ],
 		    'loginUrl' => ['main/login'],
 	    ],
-        'db' => [
-	        'class' => 'yii\db\Connection',
-	        'dsn' => 'mysql:host=127.0.0.1;dbname=huahuibao',
-	        'username' => 'root',
-	        'password' => 'zt20152008',
-	        'charset' => 'utf8',
-        ],
         'log' => [
             'traceLevel' => YII_DEBUG ? 3 : 0,
             'targets' => [

+ 0 - 7
app/teach/config/main.php

@@ -22,13 +22,6 @@ return [
 		    ],
 		    'loginUrl' => ['main/login'],
 	    ],
-        'db' => [
-	        'class' => 'yii\db\Connection',
-	        'dsn' => 'mysql:host=127.0.0.1;dbname=huahuibao',
-	        'username' => 'root',
-	        'password' => 'zt20152008',
-	        'charset' => 'utf8',
-        ],
         'log' => [
             'traceLevel' => YII_DEBUG ? 3 : 0,
             'targets' => [

+ 0 - 7
app/whole/config/main.php

@@ -22,13 +22,6 @@ return [
 		    ],
 		    'loginUrl' => ['main/login'],
 	    ],
-        'db' => [
-	        'class' => 'yii\db\Connection',
-	        'dsn' => 'mysql:host=127.0.0.1;dbname=huahuibao',
-	        'username' => 'root',
-	        'password' => 'zt20152008',
-	        'charset' => 'utf8',
-        ],
         'log' => [
             'traceLevel' => YII_DEBUG ? 3 : 0,
             'targets' => [

+ 7 - 0
common/config/main.php

@@ -5,6 +5,13 @@ return [
 	    'cache' => [
 	    	'class' => 'yii\caching\FileCache',
 	    ],
+	    'db' => [
+		    'class' => 'yii\db\Connection',
+		    'dsn' => 'mysql:host=127.0.0.1;dbname=huahuibao',
+		    'username' => 'root',
+		    'password' => 'zt20152008',
+		    'charset' => 'utf8',
+	    ],
         'redis' => [
 	        'class' => 'yii\redis\Connection',
 	        'hostname' => '127.0.0.1',