-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
root
authored and
root
committed
Jul 3, 2016
1 parent
c36c3c3
commit 0fb17b4
Showing
40 changed files
with
586 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<?php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
# 本文件在app/web/index.php 处引入。 | ||
|
||
# fecshop的核心模块 | ||
$modules = []; | ||
foreach (glob(__DIR__ . '/fecshop_local_modules/*.php') as $filename){ | ||
$modules = array_merge($modules,require($filename)); | ||
} | ||
# 服务器组件 | ||
$services = []; | ||
foreach (glob(__DIR__ . '/fecshop_local_services/*.php') as $filename){ | ||
$services = array_merge($services,require($filename)); | ||
} | ||
|
||
|
||
return [ | ||
'modules'=>$modules, | ||
'components' => $services, | ||
//'bootstrap' => ['store'], | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
* | ||
!.gitignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
* | ||
!.gitignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
<?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-html5', | ||
'basePath' => dirname(__DIR__), | ||
//'bootstrap' => ['log'], | ||
'controllerNamespace' => 'apphtml5\controllers', | ||
# compress css and js to one file, | ||
//'bootstrap' => ['assetsAutoCompress'], | ||
'components' => [ | ||
/* | ||
# compress css and js to one file, | ||
'assetsAutoCompress' => | ||
[ | ||
'class' => '\skeeks\yii2\assetsAuto\AssetsAutoCompressComponent', | ||
'enabled' => true, | ||
'jsCompress' => true, | ||
'cssFileCompile' => true, | ||
'jsFileCompile' => true, | ||
], | ||
*/ | ||
|
||
|
||
|
||
'session' => [ | ||
# use mongodb storage session data | ||
//'class' => 'yii\mongodb\Session', | ||
//'db' => 'mongodb', | ||
//'sessionCollection' => 'session', | ||
# use redis storage session data | ||
'class' => 'yii\redis\Session', | ||
# session time out time. | ||
'timeout' => 6000, | ||
|
||
], | ||
|
||
'cache' => [ | ||
'class' => 'yii\redis\Cache', | ||
'keyPrefix' => 'apphtml5', | ||
], | ||
|
||
|
||
|
||
'urlManager' => [ | ||
'class' => 'yii\web\UrlManager', | ||
'enablePrettyUrl' => true, | ||
'showScriptName' => false, | ||
], | ||
|
||
'request' => [ | ||
'class' => 'fecshop\services\Request', | ||
/* | ||
'enableCookieValidation' => true, | ||
'enableCsrfValidation' => true, | ||
'noCsrfRoutes' => [ | ||
'catalog/product/addreview', | ||
'favorite/product/remark', | ||
'paypal/ipn/index', | ||
'paypal/ipn', | ||
], | ||
*/ | ||
], | ||
|
||
/* | ||
'view' => [ | ||
'theme' => [ | ||
'pathMap' => ['@app/views' => '@app/themes/adminlte'], | ||
'baseUrl' => '@web/themes/adminlte', | ||
], | ||
], | ||
//添加js,css; | ||
'assetManager' => [ | ||
//'converter' => [ | ||
// 'forceConversion' => true, | ||
//], | ||
'bundles' => [ | ||
'yii\bootstrap\BootstrapAsset' => [ | ||
'basePath' => '@webroot', | ||
'baseUrl' => '@web', | ||
'css' => ['assets/176d11b6/css/bootstrap.css'], | ||
'js' => ['js/web.js','js/My97DatePicker/WdatePicker.js'], | ||
], | ||
], | ||
], | ||
*/ | ||
], | ||
# 自定义参数 | ||
'params' => $params, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?php | ||
return [ | ||
'adminEmail' => '[email protected]', | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
* | ||
!.gitignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
* | ||
!.gitignore |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
User-agent: * | ||
Disallow: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<?php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
# 本文件在app/web/index.php 处引入。 | ||
|
||
# fecshop的核心模块 | ||
$modules = []; | ||
foreach (glob(__DIR__ . '/fecshop_local_modules/*.php') as $filename){ | ||
$modules = array_merge($modules,require($filename)); | ||
} | ||
# 服务器组件 | ||
$services = []; | ||
foreach (glob(__DIR__ . '/fecshop_local_services/*.php') as $filename){ | ||
$services = array_merge($services,require($filename)); | ||
} | ||
|
||
|
||
return [ | ||
'modules'=>$modules, | ||
'components' => $services, | ||
//'bootstrap' => ['store'], | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
* | ||
!.gitignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
* | ||
!.gitignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
<?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-server', | ||
'basePath' => dirname(__DIR__), | ||
//'bootstrap' => ['log'], | ||
'controllerNamespace' => 'appserver\controllers', | ||
# compress css and js to one file, | ||
//'bootstrap' => ['assetsAutoCompress'], | ||
'components' => [ | ||
/* | ||
# compress css and js to one file, | ||
'assetsAutoCompress' => | ||
[ | ||
'class' => '\skeeks\yii2\assetsAuto\AssetsAutoCompressComponent', | ||
'enabled' => true, | ||
'jsCompress' => true, | ||
'cssFileCompile' => true, | ||
'jsFileCompile' => true, | ||
], | ||
*/ | ||
|
||
|
||
|
||
'session' => [ | ||
# use mongodb storage session data | ||
//'class' => 'yii\mongodb\Session', | ||
//'db' => 'mongodb', | ||
//'sessionCollection' => 'session', | ||
# use redis storage session data | ||
'class' => 'yii\redis\Session', | ||
# session time out time. | ||
'timeout' => 6000, | ||
|
||
], | ||
|
||
'cache' => [ | ||
'class' => 'yii\redis\Cache', | ||
'keyPrefix' => 'appserver', | ||
], | ||
|
||
|
||
|
||
'urlManager' => [ | ||
'class' => 'yii\web\UrlManager', | ||
'enablePrettyUrl' => true, | ||
'showScriptName' => false, | ||
], | ||
|
||
'request' => [ | ||
'class' => 'fecshop\services\Request', | ||
/* | ||
'enableCookieValidation' => true, | ||
'enableCsrfValidation' => true, | ||
'noCsrfRoutes' => [ | ||
'catalog/product/addreview', | ||
'favorite/product/remark', | ||
'paypal/ipn/index', | ||
'paypal/ipn', | ||
], | ||
*/ | ||
], | ||
|
||
/* | ||
'view' => [ | ||
'theme' => [ | ||
'pathMap' => ['@app/views' => '@app/themes/adminlte'], | ||
'baseUrl' => '@web/themes/adminlte', | ||
], | ||
], | ||
//添加js,css; | ||
'assetManager' => [ | ||
//'converter' => [ | ||
// 'forceConversion' => true, | ||
//], | ||
'bundles' => [ | ||
'yii\bootstrap\BootstrapAsset' => [ | ||
'basePath' => '@webroot', | ||
'baseUrl' => '@web', | ||
'css' => ['assets/176d11b6/css/bootstrap.css'], | ||
'js' => ['js/web.js','js/My97DatePicker/WdatePicker.js'], | ||
], | ||
], | ||
], | ||
*/ | ||
], | ||
# 自定义参数 | ||
'params' => $params, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?php | ||
return [ | ||
'adminEmail' => '[email protected]', | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
* | ||
!.gitignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
* | ||
!.gitignore |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
User-agent: * | ||
Disallow: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
|
||
$config = [ | ||
'components' => [ | ||
'request' => [ | ||
// !!! insert a secret key in the following (if it is empty) - this is required by cookie validation | ||
'cookieValidationKey' => '', | ||
], | ||
'redis' => [ | ||
'class' => 'yii\redis\Connection', | ||
'hostname' => 'localhost', | ||
'port' => 6379, | ||
'database' => '1', | ||
# connect redis with unix Stock | ||
//'unixSocket' => '/var/run/redis/redis.sock', | ||
# redis password | ||
#'password' => 'xxxx', | ||
|
||
], | ||
], | ||
]; | ||
|
||
if (!YII_ENV_TEST) { | ||
// configuration adjustments for 'dev' environment | ||
$config['bootstrap'][] = 'debug'; | ||
$config['modules']['debug'] = [ | ||
'class' => 'yii\debug\Module', | ||
]; | ||
|
||
$config['bootstrap'][] = 'gii'; | ||
$config['modules']['gii'] = [ | ||
'class' => 'yii\gii\Module', | ||
]; | ||
} | ||
|
||
return $config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<?php | ||
return [ | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
// NOTE: Make sure this file is not accessible when deployed to production | ||
if (!in_array(@$_SERVER['REMOTE_ADDR'], ['127.0.0.1', '::1'])) { | ||
die('You are not allowed to access this file.'); | ||
} | ||
|
||
defined('YII_DEBUG') or define('YII_DEBUG', true); | ||
defined('YII_ENV') or define('YII_ENV', 'test'); | ||
|
||
require(__DIR__ . '/../../vendor/autoload.php'); | ||
require(__DIR__ . '/../../vendor/yiisoft/yii2/Yii.php'); | ||
require(__DIR__ . '/../../common/config/bootstrap.php'); | ||
require(__DIR__ . '/../config/bootstrap.php'); | ||
|
||
|
||
$config = require(__DIR__ . '/../../tests/codeception/config/backend/acceptance.php'); | ||
|
||
(new yii\web\Application($config))->run(); |
Oops, something went wrong.