From 2c6231ea4fb279ee1de8ed614786812cb2cd764e Mon Sep 17 00:00:00 2001 From: root Date: Sun, 31 Jul 2016 18:57:36 +0800 Subject: [PATCH] up --- app/appadmin/config/appadmin.php | 19 ++++++ app/appapi/config/appapi.php | 8 +++ app/appfront/config/appfront.php | 40 ++++++++++++ app/apphtml5/config/apphtml5.php | 82 +++++++++++++++++++++++++ app/apphtml5/config/modules/.gitignore | 1 + app/apphtml5/languages/.gitignore | 1 + app/apphtml5/modules/.gitignore | 0 app/apphtml5/theme/.gitignore | 0 app/appserver/config/appserver.php | 82 +++++++++++++++++++++++++ app/appserver/config/modules/.gitignore | 1 + app/appserver/languages/.gitignore | 0 app/appserver/modules/.gitignore | 0 composer.json | 9 ++- 13 files changed, 240 insertions(+), 3 deletions(-) create mode 100644 app/apphtml5/config/apphtml5.php create mode 100644 app/apphtml5/config/modules/.gitignore create mode 100644 app/apphtml5/languages/.gitignore create mode 100644 app/apphtml5/modules/.gitignore create mode 100644 app/apphtml5/theme/.gitignore create mode 100644 app/appserver/config/appserver.php create mode 100644 app/appserver/config/modules/.gitignore create mode 100644 app/appserver/languages/.gitignore create mode 100644 app/appserver/modules/.gitignore diff --git a/app/appadmin/config/appadmin.php b/app/appadmin/config/appadmin.php index 6b5236210..d7333b37a 100644 --- a/app/appadmin/config/appadmin.php +++ b/app/appadmin/config/appadmin.php @@ -16,4 +16,23 @@ 'modules'=>$modules, /* only config in front web */ //'bootstrap' => ['store'], + 'components' => [ + 'user' => [ + 'identityClass' => 'fecadmin\models\AdminUser', + 'enableAutoLogin' => true, + ], + + 'errorHandler' => [ + 'errorAction' => 'fecadmin/error', + ], + + 'urlManager' => [ + 'class' => 'yii\web\UrlManager', + 'enablePrettyUrl' => true, + 'showScriptName' => false, + 'rules' => [ + '' => 'fecadmin/index/index', + ], + ], + ], ]; diff --git a/app/appapi/config/appapi.php b/app/appapi/config/appapi.php index c0db49ddc..66d8b67cd 100644 --- a/app/appapi/config/appapi.php +++ b/app/appapi/config/appapi.php @@ -42,6 +42,14 @@ ], ], + 'user' => [ + 'identityClass' => 'fecadmin\models\AdminUser', + 'enableAutoLogin' => true, + ], + + 'errorHandler' => [ + 'errorAction' => 'site/error', + ], ], diff --git a/app/appfront/config/appfront.php b/app/appfront/config/appfront.php index 89fbb018a..9d44d6ce0 100644 --- a/app/appfront/config/appfront.php +++ b/app/appfront/config/appfront.php @@ -38,6 +38,46 @@ ], ], ], + 'assetManager' => [ + 'forceCopy' => true, + ], + 'user' => [ + 'identityClass' => 'fecadmin\models\AdminUser', + 'enableAutoLogin' => true, + ], + + 'errorHandler' => [ + 'errorAction' => 'site/error', + ], + + + + 'urlManager' => [ + 'class' => 'yii\web\UrlManager', + 'enablePrettyUrl' => true, + 'showScriptName' => false, + 'rules' => [ + '' => 'cms/home/index', + ], + //'baseUrl' => '/fr/', + ], + + + + 'request' => [ + 'class' => 'fecshop\yii\web\Request', + /* + 'enableCookieValidation' => true, + 'enableCsrfValidation' => true, + 'cookieValidationKey' => 'O1d232trde1x-M97_7QvwPo-5QGdkLMp#@#@', + 'noCsrfRoutes' => [ + 'catalog/product/addreview', + 'favorite/product/remark', + 'paypal/ipn/index', + 'paypal/ipn', + ], + */ + ], ], ]; diff --git a/app/apphtml5/config/apphtml5.php b/app/apphtml5/config/apphtml5.php new file mode 100644 index 000000000..d32aaa98c --- /dev/null +++ b/app/apphtml5/config/apphtml5.php @@ -0,0 +1,82 @@ +$modules, + /* only config in front web */ + 'bootstrap' => ['store'], + 'params' => [ + /* appfront base theme dir */ + 'appfrontBaseTheme' => '@fecshop/app/apphtml5/theme/base/front', + 'appfrontBaseLayoutName'=> 'main.php', + ], + # language config. + 'components' => [ + 'i18n' => [ + 'translations' => [ + 'apphtml5' => [ + //'class' => 'yii\i18n\PhpMessageSource', + 'class' => 'fecshop\yii\i18n\PhpMessageSource', + 'basePaths' => [ + '@fecshop/app/apphtml5/languages', + '@apphtml5/languages', + ], + 'sourceLanguage' => 'en_US', # 如果 en_US 也想翻译,那么可以改成en_XX。 + ], + ], + ], + 'assetManager' => [ + 'forceCopy' => true, + ], + 'user' => [ + 'identityClass' => 'fecadmin\models\AdminUser', + 'enableAutoLogin' => true, + ], + + 'errorHandler' => [ + 'errorAction' => 'site/error', + ], + + + + 'urlManager' => [ + 'class' => 'yii\web\UrlManager', + 'enablePrettyUrl' => true, + 'showScriptName' => false, + 'rules' => [ + '' => 'cms/home/index', + ], + //'baseUrl' => '/fr/', + ], + + + + 'request' => [ + 'class' => 'fecshop\yii\web\Request', + /* + 'enableCookieValidation' => true, + 'enableCsrfValidation' => true, + 'cookieValidationKey' => 'O1d232trde1x-M97_7QvwPo-5QGdkLMp#@#@', + 'noCsrfRoutes' => [ + 'catalog/product/addreview', + 'favorite/product/remark', + 'paypal/ipn/index', + 'paypal/ipn', + ], + */ + ], + ], + +]; diff --git a/app/apphtml5/config/modules/.gitignore b/app/apphtml5/config/modules/.gitignore new file mode 100644 index 000000000..b722e9e13 --- /dev/null +++ b/app/apphtml5/config/modules/.gitignore @@ -0,0 +1 @@ +!.gitignore \ No newline at end of file diff --git a/app/apphtml5/languages/.gitignore b/app/apphtml5/languages/.gitignore new file mode 100644 index 000000000..b722e9e13 --- /dev/null +++ b/app/apphtml5/languages/.gitignore @@ -0,0 +1 @@ +!.gitignore \ No newline at end of file diff --git a/app/apphtml5/modules/.gitignore b/app/apphtml5/modules/.gitignore new file mode 100644 index 000000000..e69de29bb diff --git a/app/apphtml5/theme/.gitignore b/app/apphtml5/theme/.gitignore new file mode 100644 index 000000000..e69de29bb diff --git a/app/appserver/config/appserver.php b/app/appserver/config/appserver.php new file mode 100644 index 000000000..a81553e2b --- /dev/null +++ b/app/appserver/config/appserver.php @@ -0,0 +1,82 @@ +$modules, + /* only config in front web */ + 'bootstrap' => ['store'], + 'params' => [ + /* appfront base theme dir */ + //'appfrontBaseTheme' => '@fecshop/app/appfront/theme/base/front', + //'appfrontBaseLayoutName'=> 'main.php', + ], + # language config. + 'components' => [ + 'i18n' => [ + 'translations' => [ + 'appserver' => [ + //'class' => 'yii\i18n\PhpMessageSource', + 'class' => 'fecshop\yii\i18n\PhpMessageSource', + 'basePaths' => [ + '@fecshop/app/appserver/languages', + '@appserver/languages', + ], + 'sourceLanguage' => 'en_US', # 如果 en_US 也想翻译,那么可以改成en_XX。 + ], + ], + ], + 'assetManager' => [ + 'forceCopy' => true, + ], + 'user' => [ + 'identityClass' => 'fecadmin\models\AdminUser', + 'enableAutoLogin' => true, + ], + + 'errorHandler' => [ + 'errorAction' => 'site/error', + ], + + + + 'urlManager' => [ + 'class' => 'yii\web\UrlManager', + 'enablePrettyUrl' => true, + 'showScriptName' => false, + 'rules' => [ + '' => 'cms/home/index', + ], + //'baseUrl' => '/fr/', + ], + + + + 'request' => [ + 'class' => 'fecshop\yii\web\Request', + /* + 'enableCookieValidation' => true, + 'enableCsrfValidation' => true, + 'cookieValidationKey' => 'O1d232trde1x-M97_7QvwPo-5QGdkLMp#@#@', + 'noCsrfRoutes' => [ + 'catalog/product/addreview', + 'favorite/product/remark', + 'paypal/ipn/index', + 'paypal/ipn', + ], + */ + ], + ], + +]; diff --git a/app/appserver/config/modules/.gitignore b/app/appserver/config/modules/.gitignore new file mode 100644 index 000000000..b722e9e13 --- /dev/null +++ b/app/appserver/config/modules/.gitignore @@ -0,0 +1 @@ +!.gitignore \ No newline at end of file diff --git a/app/appserver/languages/.gitignore b/app/appserver/languages/.gitignore new file mode 100644 index 000000000..e69de29bb diff --git a/app/appserver/modules/.gitignore b/app/appserver/modules/.gitignore new file mode 100644 index 000000000..e69de29bb diff --git a/composer.json b/composer.json index c156ba719..d85153f58 100644 --- a/composer.json +++ b/composer.json @@ -4,11 +4,14 @@ "keywords": [ "yii2", "fecshop" , - "fancyecommerce" + "fancyecommerce" , + "shop" , + "ecommerce" , + "cart" ], "homepage": "https://github.com/fancyecommerce/yii2_fecshop", "type": "yii2-extension", - "license": "BSD-3-Clause", + "license": "OSL-3", "support": { "source": "https://github.com/fancyecommerce/yii2_fecshop" }, @@ -22,7 +25,7 @@ "require": { "php": ">=5.4.0", "yiisoft/yii2": ">=2.0.6" , - "fancyecommerce/fec_admin":"~1.3.5.8", + "fancyecommerce/fec_admin":"~1.3.5.9", "yiisoft/yii2-mongodb": "~2.0.0" , "skeeks/yii2-assets-auto-compress": "*" },