From a210f49c001a48799a44ff3ccbc8155e86b8e32c Mon Sep 17 00:00:00 2001 From: Terry <2358269014@qq.com> Date: Fri, 2 Feb 2018 16:23:58 +0800 Subject: [PATCH] new --- .../modules/Customer/block/newsletter/Index.php | 2 ++ .../modules/Customer/controllers/TestController.php | 13 ++----------- composer.json | 2 +- services/Service.php | 2 +- services/cms/Article.php | 4 ++++ 5 files changed, 10 insertions(+), 13 deletions(-) diff --git a/app/appfront/modules/Customer/block/newsletter/Index.php b/app/appfront/modules/Customer/block/newsletter/Index.php index 34ae8036..c5d452d2 100644 --- a/app/appfront/modules/Customer/block/newsletter/Index.php +++ b/app/appfront/modules/Customer/block/newsletter/Index.php @@ -29,6 +29,8 @@ class Index $message = Yii::$service->page->translate->__('Your subscribed email was successful, You can {urlB} click Here to Home Page {urlE}, Thank You.', $arr); $param['email'] = $email; Yii::$service->email->customer->sendNewsletterSubscribeEmail($param); + } else if (is_array($message)) { + $message = implode(',', $message); } return [ diff --git a/app/appfront/modules/Customer/controllers/TestController.php b/app/appfront/modules/Customer/controllers/TestController.php index 8da70908..9a641971 100644 --- a/app/appfront/modules/Customer/controllers/TestController.php +++ b/app/appfront/modules/Customer/controllers/TestController.php @@ -11,6 +11,7 @@ namespace fecshop\app\appfront\modules\Customer\controllers; use fecshop\app\appfront\modules\AppfrontController; use Yii; +use fecshop\queue\job\SendEmailJob; /** * @author Terry Zhao <2358269014@qq.com> @@ -23,21 +24,11 @@ class TestController extends AppfrontController public $enableCsrfValidation = false; /** - * Н╦╗Долл─. + * */ public function actionIndex() { - echo json_encode([ - 'data' => - [ - ['terry','1','2','3'], - ['water','11','22','33'], - ['xxx','111','222','333'], - ] - ]); - - exit; } } diff --git a/composer.json b/composer.json index bce95b78..49716561 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,7 @@ ], "minimum-stability": "stable", "require": { - "php": ">=5.4.0", + "php": ">=7.0", "yiisoft/yii2-swiftmailer": "2.0.7", "yiisoft/yii2": ">=2.0.12" , "fancyecommerce/fec":">=1.1.3.4", diff --git a/services/Service.php b/services/Service.php index 7f482a59..f23a7cc4 100644 --- a/services/Service.php +++ b/services/Service.php @@ -224,7 +224,7 @@ class Service extends BaseObject return false; } if ($object->storagePath) { - $storagePath = '\\'.trim($object->storagePath.'\\').'\\'; + $storagePath = '\\'.trim($object->storagePath, '\\').'\\'; } else { $storagePath = '\\'.strtolower($className).'\\'; } diff --git a/services/cms/Article.php b/services/cms/Article.php index 283b59e2..1a6223b3 100644 --- a/services/cms/Article.php +++ b/services/cms/Article.php @@ -38,7 +38,9 @@ class Article extends Service { parent::init(); $currentService = $this->getStorageService($this); + $this->_article = new $currentService(); + /* if ($this->storage == 'mongodb') { $this->_article = new ArticleMongodb(); @@ -47,6 +49,8 @@ class Article extends Service } */ } + + /** * Get Url by article's url key. -- GitLab