From 3130062f90707e81ebbc83383cf06c84cedffa73 Mon Sep 17 00:00:00 2001 From: undefinedor <1012023498@qq.com> Date: Fri, 4 Jun 2021 00:30:51 +0800 Subject: [PATCH] Remove unused import. --- app/appadmin/modules/AppadminController.php | 13 +-- .../modules/Catalog/CatalogController.php | 3 +- .../Catalog/block/categoryupload/Manager.php | 48 +++----- .../Catalog/block/productattr/Manager.php | 11 +- .../block/productattrgroup/Manager.php | 5 +- .../Catalog/block/productbrand/Manager.php | 23 ++-- .../block/productbrandcategory/Manager.php | 16 ++- .../Catalog/block/productupload/Manager.php | 70 ++++++------ app/appadmin/modules/Cms/CmsController.php | 5 +- .../modules/Config/ConfigController.php | 5 +- .../Config/block/appfrontstore/Manager.php | 7 +- .../Config/block/apphtml5store/Manager.php | 7 +- .../block/appserverstorelang/Manager.php | 42 ++++--- .../Config/block/categorysort/Manager.php | 40 +++---- .../modules/Config/block/currency/Manager.php | 42 ++++--- .../Config/block/mutillang/Manager.php | 44 ++++---- .../controllers/AppfrontstoreController.php | 3 +- .../controllers/Apphtml5storeController.php | 3 +- .../modules/Customer/CustomerController.php | 5 +- .../modules/Fecadmin/block/log/Index.php | 33 +++--- .../modules/Fecadmin/block/logtj/Index.php | 55 +++++---- .../Fecadmin/block/myaccount/Index.php | 10 +- .../controllers/AccountController.php | 25 ++--- .../Fecadmin/controllers/CacheController.php | 10 +- .../Fecadmin/controllers/ConfigController.php | 19 ++-- .../Fecadmin/controllers/ErrorController.php | 12 +- .../Fecadmin/controllers/IndexController.php | 16 ++- .../Fecadmin/controllers/LogController.php | 9 +- .../Fecadmin/controllers/LoginController.php | 20 ++-- .../Fecadmin/controllers/LogoutController.php | 16 +-- .../Fecadmin/controllers/LogtjController.php | 7 +- .../controllers/MyaccountController.php | 7 +- .../controllers/ResourceController.php | 5 +- .../Fecadmin/controllers/RoleController.php | 3 - .../controllers/SystemlogController.php | 13 +-- .../modules/Sales/SalesController.php | 3 +- .../Sales/block/orderinfo/Manageredit.php | 47 ++++---- .../modules/System/SystemController.php | 5 +- .../System/block/adminurlkey/Manager.php | 14 +-- .../System/block/error/Manageredit.php | 10 +- .../System/block/extensiongii/Manager.php | 14 +-- .../System/block/extensionmarket/Login.php | 16 +-- .../System/block/extensionmarket/Manager.php | 62 +++++----- .../ExtensioninstalledController.php | 15 ++- .../catalog/productattr/manageredit.php | 44 ++++---- .../catalog/productattrgroup/manageredit.php | 38 +++---- .../catalog/productbrand/manageredit.php | 17 ++- .../productbrandcategory/manageredit.php | 14 +-- .../catalog/productinfo/managerbatchedit.php | 106 +++++++++--------- .../catalog/productinfo/manageredit.php | 72 ++++++------ .../catalog/productreview/manageredit.php | 34 +++--- .../base/default/cms/article/manageredit.php | 12 +- .../default/cms/staticblock/manageredit.php | 16 +-- .../config/appfrontaccount/manager.php | 18 +-- .../default/config/appfrontbase/manager.php | 18 +-- .../default/config/appfrontcache/manager.php | 18 +-- .../config/appfrontcatalog/manager.php | 18 +-- .../default/config/appfronthome/manager.php | 18 +-- .../config/appfrontpayment/manager.php | 18 +-- .../config/appfrontstore/manageredit.php | 50 ++++----- .../config/apphtml5account/manager.php | 18 +-- .../default/config/apphtml5base/manager.php | 18 +-- .../default/config/apphtml5cache/manager.php | 18 +-- .../config/apphtml5catalog/manager.php | 18 +-- .../default/config/apphtml5home/manager.php | 18 +-- .../config/apphtml5payment/manager.php | 18 +-- .../config/apphtml5store/manageredit.php | 48 ++++---- .../config/appserveraccount/manager.php | 18 +-- .../default/config/appserverbase/manager.php | 18 +-- .../default/config/appservercache/manager.php | 18 +-- .../config/appservercatalog/manager.php | 18 +-- .../default/config/appserverhome/manager.php | 18 +-- .../config/appserverpayment/manager.php | 18 +-- .../default/config/appserverstore/manager.php | 18 +-- .../config/appserverstorelang/manager.php | 60 +++++----- .../base/default/config/base/manager.php | 20 ++-- .../base/default/config/cart/manager.php | 18 +-- .../default/config/categorysort/manager.php | 44 ++++---- .../base/default/config/currency/manager.php | 38 +++---- .../base/default/config/email/manager.php | 18 +-- .../theme/base/default/config/fa/manager.php | 20 ++-- .../base/default/config/mutillang/manager.php | 60 +++++----- .../base/default/config/order/manager.php | 18 +-- .../default/config/paymentalipay/manager.php | 18 +-- .../default/config/paymentpaypal/manager.php | 18 +-- .../default/config/paymentwxpay/manager.php | 18 +-- .../base/default/config/product/manager.php | 18 +-- .../base/default/config/search/manager.php | 18 +-- .../theme/base/default/config/service/db.php | 18 +-- .../default/customer/account/manageredit.php | 18 +-- .../default/customer/contacts/manageredit.php | 20 ++-- .../default/fecadmin/account/manageredit.php | 26 ++--- .../default/fecadmin/config/manageredit.php | 16 +-- .../default/fecadmin/resource/manageredit.php | 4 +- .../default/fecadmin/role/manageredit.php | 5 +- .../theme/base/default/layouts/dashboard.php | 57 +++++----- .../theme/base/default/layouts/login.php | 26 ++--- .../base/default/sales/coupon/manageredit.php | 18 +-- .../default/sales/orderinfo/manageredit.php | 105 +++++++++-------- .../default/system/adminurlkey/manager.php | 24 ++-- .../base/default/system/error/manageredit.php | 19 ++-- .../default/system/extensiongii/manager.php | 38 +++---- .../system/extensioninstalled/manageredit.php | 14 +-- .../system/extensioninstalled/managerview.php | 16 +-- .../default/system/extensionmarket/login.php | 18 +-- app/appapi/modules/AppapiController.php | 9 +- app/appapi/modules/AppapiTokenController.php | 66 +++++------ app/appapi/modules/V1/Module.php | 3 +- .../modules/V1/controllers/HomeController.php | 7 +- .../modules/Cms/block/article/Index.php | 5 +- .../Customer/controllers/TestController.php | 59 +++++----- .../theme/base/front/site/helper/error.php | 4 +- .../base/html5/catalog/category/index.php | 38 +++---- .../base/html5/catalog/reviewproduct/add.php | 46 ++++---- .../base/html5/catalogsearch/index/index.php | 34 +++--- .../html5/customer/productfavorite/index.php | 17 ++- .../html5/customer/productreview/index.php | 18 ++- .../theme/base/html5/site/helper/error.php | 4 +- .../Database/controllers/ConfigController.php | 105 +++++++++-------- .../Database/controllers/ErrorController.php | 2 - .../Database/views/config/migratesuccess.php | 13 +-- .../modules/Database/views/config/readme.php | 47 ++++---- .../modules/Database/views/error/index.php | 4 +- .../modules/AppserverTokenController.php | 89 +++++++-------- .../controllers/ReviewproductController.php | 53 +++++---- .../Checkout/controllers/CartController.php | 2 +- .../Wx/controllers/HelperController.php | 15 ++- .../Amqp/controllers/TestController.php | 15 ++- app/console/modules/ConsoleController.php | 93 ++++++++------- app/console/modules/ConsoleModule.php | 37 +++--- .../Product/controllers/IndexController.php | 1 - 131 files changed, 1540 insertions(+), 1705 deletions(-) diff --git a/app/appadmin/modules/AppadminController.php b/app/appadmin/modules/AppadminController.php index 1a0728bed..00c97e674 100644 --- a/app/appadmin/modules/AppadminController.php +++ b/app/appadmin/modules/AppadminController.php @@ -9,7 +9,6 @@ namespace fecshop\app\appadmin\modules; -use fec\controllers\FecController; use fec\helpers\CConfig; use Yii; use yii\base\InvalidValueException; @@ -23,7 +22,7 @@ class AppadminController extends Controller { public $blockNamespace; public $enableCsrfValidation = true; - + /** * init theme component property : $fecshopThemeDir and $layoutFile * $fecshopThemeDir is appfront base theme directory. @@ -82,7 +81,7 @@ public function beforeAction($action) return false; } - + /** * @param $view|string , (only) view file name ,by this module id, this controller id , generate view relative path. @@ -117,7 +116,7 @@ public function findLayoutFile($view) } throw new InvalidValueException('layout file is not exist!'); } - + public function getFecadminBlock($blockname=''){ $_currentNameSpace = \fec\helpers\CModule::param("_currentNameSpace"); //echo $_currentNameSpace;exit; @@ -136,16 +135,16 @@ public function getFecadminBlock($blockname=''){ }else{ $url_key_arr[count($url_key_arr)-1] = ucfirst($url_key_arr[count($url_key_arr)-1]); } - + $block_space = implode("\\",$url_key_arr); $blockFile = $modulesDir.$block_space; //查找是否在rewriteMap中存在重写 //$relativeFile = Yii::mapGetName($relativeFile); $blockFile = Yii::mapGetName($blockFile); //echo $blockFile;exit; - + return new $blockFile; - + } public function getBlock($blockName = ''){ diff --git a/app/appadmin/modules/Catalog/CatalogController.php b/app/appadmin/modules/Catalog/CatalogController.php index f0498065a..07bdc470e 100644 --- a/app/appadmin/modules/Catalog/CatalogController.php +++ b/app/appadmin/modules/Catalog/CatalogController.php @@ -13,8 +13,7 @@ * @author Terry Zhao <2358269014@qq.com> * @since 1.0 */ -use fecadmin\FecadminbaseController; -use Yii; + use fecshop\app\appadmin\modules\AppadminController; class CatalogController extends AppadminController diff --git a/app/appadmin/modules/Catalog/block/categoryupload/Manager.php b/app/appadmin/modules/Catalog/block/categoryupload/Manager.php index 583a8bcc8..3ab10f0cf 100644 --- a/app/appadmin/modules/Catalog/block/categoryupload/Manager.php +++ b/app/appadmin/modules/Catalog/block/categoryupload/Manager.php @@ -9,8 +9,6 @@ namespace fecshop\app\appadmin\modules\Catalog\block\categoryupload; -use fecshop\app\appadmin\interfaces\base\AppadminbaseBlockInterface; -use fecshop\app\appadmin\modules\AppadminbaseBlock; use Yii; use yii\base\BaseObject; @@ -21,7 +19,7 @@ */ class Manager extends BaseObject { - + public $_fileFullDir; /** * init param function ,execute in construct. @@ -39,14 +37,14 @@ public function getLastData() return [ ]; } - - + + public function uploadCategory() { $fileFullDir = Yii::getAlias('@appadmin/runtime/upload/'); if ($this->saveUploadExcelFile($fileFullDir)) { //echo $this->_fileFullDir; - + $arr = \fec\helpers\CExcel::getExcelContent($this->_fileFullDir); $i = 0; if (is_array($arr) && !empty($arr)) { @@ -71,9 +69,9 @@ public function uploadCategory() ]); exit; } - + } - + public function saveCategory($one) { // 从excel中获取数据。 @@ -93,14 +91,14 @@ public function saveCategory($one) $meta_description = $one['K']; $image = $one['L']; $thumbnail_image = $one['M']; - - + + $nameLang = Yii::$service->fecshoplang->getLangAttrName('name',$language_code); $titleLang = Yii::$service->fecshoplang->getLangAttrName('title',$language_code); $metaKeywordsLang = Yii::$service->fecshoplang->getLangAttrName('meta_keywords',$language_code); $metaDescriptionLang = Yii::$service->fecshoplang->getLangAttrName('meta_description',$language_code); $descriptionLang = Yii::$service->fecshoplang->getLangAttrName('description',$language_code); - + $categoryPrimaryKey = Yii::$service->category->getPrimaryKey(); //$categoryMode = Yii::$service->category->getByPrimarykey($category_id); //$categoryPrimaryKey = Yii::$service->category->getPrimaryKey(); @@ -108,7 +106,7 @@ public function saveCategory($one) //if ($categoryMode && isset($categoryMode[$categoryPrimaryKey]) && $categoryMode[$categoryPrimaryKey]) { // $category_id = $categoryMode[$categoryPrimaryKey]; //} - + $categoryArr[$categoryPrimaryKey] = $category_id; $categoryArr['parent_id'] = $parent_id; $categoryArr['name'][$nameLang] = $category_name; @@ -121,37 +119,23 @@ public function saveCategory($one) $categoryArr['meta_description'][$metaDescriptionLang] = $meta_description; $categoryArr['image'] = $image; $categoryArr['thumbnail_image'] = $thumbnail_image; - + return Yii::$service->category->excelSave($categoryArr); } - + # 1.保存前台上传的文件。 public function saveUploadExcelFile($fileFullDir){ - + $name = $_FILES["file"]["name"]; $fileFullDir .= 'category_'.time().'_'.rand(1000,9999); if(strstr($name,'.xlsx')){ $fileFullDir .='.xlsx'; } else if (strstr($name,'.xls')){ $fileFullDir .='.xls'; - } - $this->_fileFullDir = $fileFullDir; + } + $this->_fileFullDir = $fileFullDir; $result = @move_uploaded_file($_FILES["file"]["tmp_name"],$fileFullDir); - + return $result; } - - - - - - - - - - - - - - } diff --git a/app/appadmin/modules/Catalog/block/productattr/Manager.php b/app/appadmin/modules/Catalog/block/productattr/Manager.php index e001e9ea6..3f54ddf38 100644 --- a/app/appadmin/modules/Catalog/block/productattr/Manager.php +++ b/app/appadmin/modules/Catalog/block/productattr/Manager.php @@ -10,7 +10,6 @@ namespace fecshop\app\appadmin\modules\Catalog\block\productattr; use fec\helpers\CUrl; -use fec\helpers\CRequest; use fecshop\app\appadmin\interfaces\base\AppadminbaseBlockInterface; use fecshop\app\appadmin\modules\AppadminbaseBlock; use Yii; @@ -81,7 +80,7 @@ public function getSearchArr() 2 => Yii::$service->page->translate->__('Disable'), ], ], - + ]; return $data; @@ -112,7 +111,7 @@ public function getTableFieldArr() 'width' => '110', 'align' => 'left', ], - + [ 'orderField' => 'status', 'label' => Yii::$service->page->translate->__('Status'), @@ -123,14 +122,14 @@ public function getTableFieldArr() 2 => Yii::$service->page->translate->__('Disable'), ], ], - + [ 'orderField' => 'db_type', 'label' => Yii::$service->page->translate->__('Db Type'), 'width' => '110', 'align' => 'center', ], - + [ 'orderField' => 'show_as_img', 'label' => Yii::$service->page->translate->__('Show As Img'), @@ -141,7 +140,7 @@ public function getTableFieldArr() 2 => Yii::$service->page->translate->__('No'), ], ], - + [ 'orderField' => 'display_type', 'label' => Yii::$service->page->translate->__('Display Type'), diff --git a/app/appadmin/modules/Catalog/block/productattrgroup/Manager.php b/app/appadmin/modules/Catalog/block/productattrgroup/Manager.php index ff0c493d0..c8e5f19b6 100644 --- a/app/appadmin/modules/Catalog/block/productattrgroup/Manager.php +++ b/app/appadmin/modules/Catalog/block/productattrgroup/Manager.php @@ -10,7 +10,6 @@ namespace fecshop\app\appadmin\modules\Catalog\block\productattrgroup; use fec\helpers\CUrl; -use fec\helpers\CRequest; use fecshop\app\appadmin\interfaces\base\AppadminbaseBlockInterface; use fecshop\app\appadmin\modules\AppadminbaseBlock; use Yii; @@ -81,7 +80,7 @@ public function getSearchArr() 2 => Yii::$service->page->translate->__('Disable'), ], ], - + ]; return $data; @@ -115,7 +114,7 @@ public function getTableFieldArr() 2 => Yii::$service->page->translate->__('Disable'), ], ], - + [ 'orderField' => 'created_at', 'label' => Yii::$service->page->translate->__('Created At'), diff --git a/app/appadmin/modules/Catalog/block/productbrand/Manager.php b/app/appadmin/modules/Catalog/block/productbrand/Manager.php index 81c17d9fc..3c1a51d3c 100644 --- a/app/appadmin/modules/Catalog/block/productbrand/Manager.php +++ b/app/appadmin/modules/Catalog/block/productbrand/Manager.php @@ -9,7 +9,6 @@ namespace fecshop\app\appadmin\modules\Catalog\block\productbrand; -use fec\helpers\CUrl; use fec\helpers\CRequest; use fecshop\app\appadmin\interfaces\base\AppadminbaseBlockInterface; use fecshop\app\appadmin\modules\AppadminbaseBlock; @@ -82,7 +81,7 @@ public function getSearchArr() 2 => Yii::$service->page->translate->__('Disable'), ], ], - + [ // 时间区间类型搜索 'type' => 'inputdatefilter', 'name' => 'created_at', @@ -102,9 +101,9 @@ public function getSearchArr() */ public function getTableFieldArr() { - $brandCategorys = Yii::$service->product->brandcategory->getBrandCategoryIdAndNames(); + $brandCategorys = Yii::$service->product->brandcategory->getBrandCategoryIdAndNames(); $brandStatus = Yii::$service->product->brandcategory->getStatusArr(); - + $table_th_bar = [ [ 'orderField' => $this->_primaryKey, @@ -140,7 +139,7 @@ public function getTableFieldArr() 'width' => '110', 'align' => 'center', ], - + [ 'orderField' => 'status', 'label' => Yii::$service->page->translate->__('Status'), @@ -148,8 +147,8 @@ public function getTableFieldArr() 'align' => 'center', 'display' => $brandStatus, ], - - + + [ 'orderField' => 'created_at', 'label' => Yii::$service->page->translate->__('Created At'), @@ -168,9 +167,9 @@ public function getTableFieldArr() return $table_th_bar; } - - - + + + public function getTableTbodyHtml($data) { $fields = $this->getTableFieldArr(); @@ -250,6 +249,6 @@ public function getTableTbodyHtml($data) return $str; } - - + + } diff --git a/app/appadmin/modules/Catalog/block/productbrandcategory/Manager.php b/app/appadmin/modules/Catalog/block/productbrandcategory/Manager.php index d9169d76a..a8292ffda 100644 --- a/app/appadmin/modules/Catalog/block/productbrandcategory/Manager.php +++ b/app/appadmin/modules/Catalog/block/productbrandcategory/Manager.php @@ -9,8 +9,6 @@ namespace fecshop\app\appadmin\modules\Catalog\block\productbrandcategory; -use fec\helpers\CUrl; -use fec\helpers\CRequest; use fecshop\app\appadmin\interfaces\base\AppadminbaseBlockInterface; use fecshop\app\appadmin\modules\AppadminbaseBlock; use Yii; @@ -82,7 +80,7 @@ public function getSearchArr() 2 => Yii::$service->page->translate->__('Disable'), ], ], - + [ // 时间区间类型搜索 'type' => 'inputdatefilter', 'name' => 'created_at', @@ -102,9 +100,9 @@ public function getSearchArr() */ public function getTableFieldArr() { - $brandCategorys = Yii::$service->product->brandcategory->getBrandCategoryIdAndNames(); + $brandCategorys = Yii::$service->product->brandcategory->getBrandCategoryIdAndNames(); $brandStatus = Yii::$service->product->brandcategory->getStatusArr(); - + $table_th_bar = [ [ 'orderField' => $this->_primaryKey, @@ -125,8 +123,8 @@ public function getTableFieldArr() 'width' => '110', 'align' => 'center', ], - - + + [ 'orderField' => 'status', 'label' => Yii::$service->page->translate->__('Status'), @@ -134,8 +132,8 @@ public function getTableFieldArr() 'align' => 'center', 'display' => $brandStatus, ], - - + + [ 'orderField' => 'created_at', 'label' => Yii::$service->page->translate->__('Created At'), diff --git a/app/appadmin/modules/Catalog/block/productupload/Manager.php b/app/appadmin/modules/Catalog/block/productupload/Manager.php index 78e7b33af..81ed87050 100644 --- a/app/appadmin/modules/Catalog/block/productupload/Manager.php +++ b/app/appadmin/modules/Catalog/block/productupload/Manager.php @@ -9,8 +9,6 @@ namespace fecshop\app\appadmin\modules\Catalog\block\productupload; -use fecshop\app\appadmin\interfaces\base\AppadminbaseBlockInterface; -use fecshop\app\appadmin\modules\AppadminbaseBlock; use Yii; /** @@ -20,7 +18,7 @@ */ class Manager extends \yii\base\BaseObject { - + public $_fileFullDir; public function getLastData() @@ -28,14 +26,14 @@ public function getLastData() return [ ]; } - - + + public function uploadProduct() { $fileFullDir = Yii::getAlias('@appadmin/runtime/upload/'); if ($this->saveUploadExcelFile($fileFullDir)) { //echo $this->_fileFullDir; - + $arr = \fec\helpers\CExcel::getExcelContent($this->_fileFullDir); $i = 0; if (is_array($arr) && !empty($arr)) { @@ -59,9 +57,9 @@ public function uploadProduct() ]); exit; } - + } - + public function saveProduct($one) { // 从excel中获取数据。 @@ -83,28 +81,28 @@ public function saveProduct($one) $meta_title = $one['P']; $meta_keywords = $one['Q']; $meta_description = $one['R']; - + $short_description = $one['S']; $description = $one['T']; $main_image = $one['U']; $gallery_image = $one['V']; $group_attr_name = $one['W']; $group_attrs = $one['X']; - + $nameLang = Yii::$service->fecshoplang->getLangAttrName('name',$language_code); $titleLang = Yii::$service->fecshoplang->getLangAttrName('meta_title',$language_code); $metaKeywordsLang = Yii::$service->fecshoplang->getLangAttrName('meta_keywords',$language_code); $metaDescriptionLang = Yii::$service->fecshoplang->getLangAttrName('meta_description',$language_code); $shortDescriptionLang = Yii::$service->fecshoplang->getLangAttrName('short_description',$language_code); $descriptionLang = Yii::$service->fecshoplang->getLangAttrName('description',$language_code); - + $productMode = Yii::$service->product->getBySku($sku); $productPrimaryKey = Yii::$service->product->getPrimaryKey(); $product_id = ''; if ($productMode && isset($productMode['sku']) && $productMode['sku']) { $product_id = $productMode[$productPrimaryKey]; } - + $productArr['name'][$nameLang] = $product_name; $productArr['spu'] = $spu; $productArr['sku'] = $sku; @@ -124,8 +122,8 @@ public function saveProduct($one) $productArr['meta_description'][$metaDescriptionLang] = $meta_description; $productArr['short_description'][$shortDescriptionLang] = $short_description; $productArr['description'][$descriptionLang] = $description; - - + + $productArr['image']['main'] = [ 'image' => $main_image, 'label' => '', @@ -147,9 +145,9 @@ public function saveProduct($one) } } } - + $productArr['attr_group'] = $group_attr_name; - + if ($group_attrs) { $group_attr_info = json_decode($group_attrs, true); if (is_array($group_attr_info)) { @@ -158,37 +156,37 @@ public function saveProduct($one) } } } - + return Yii::$service->product->excelSave($productArr); } - + # 1.保存前台上传的文件。 public function saveUploadExcelFile($fileFullDir){ - + $name = $_FILES["file"]["name"]; $fileFullDir .= 'product_'.time().'_'.rand(1000,9999); if(strstr($name,'.xlsx')){ $fileFullDir .='.xlsx'; } else if (strstr($name,'.xls')){ $fileFullDir .='.xls'; - } - $this->_fileFullDir = $fileFullDir; + } + $this->_fileFullDir = $fileFullDir; $result = @move_uploaded_file($_FILES["file"]["tmp_name"],$fileFullDir); - + return $result; } - - - - - - - - - - - - - - + + + + + + + + + + + + + + } diff --git a/app/appadmin/modules/Cms/CmsController.php b/app/appadmin/modules/Cms/CmsController.php index 4a017c244..4fe1876dd 100644 --- a/app/appadmin/modules/Cms/CmsController.php +++ b/app/appadmin/modules/Cms/CmsController.php @@ -13,14 +13,13 @@ * @author Terry Zhao <2358269014@qq.com> * @since 1.0 */ -use fecadmin\FecadminbaseController; -use Yii; + use fecshop\app\appadmin\modules\AppadminController; class CmsController extends AppadminController { public $enableCsrfValidation = false; - + //public function getViewPath() //{ // return Yii::getAlias('@fecshop/app/appadmin/modules/Cms/views') . DIRECTORY_SEPARATOR . $this->id; diff --git a/app/appadmin/modules/Config/ConfigController.php b/app/appadmin/modules/Config/ConfigController.php index 6ff2108a8..92449f54b 100644 --- a/app/appadmin/modules/Config/ConfigController.php +++ b/app/appadmin/modules/Config/ConfigController.php @@ -13,14 +13,13 @@ * @author Terry Zhao <2358269014@qq.com> * @since 1.0 */ -use fecadmin\FecadminbaseController; -use Yii; + use fecshop\app\appadmin\modules\AppadminController; class ConfigController extends AppadminController { public $enableCsrfValidation = false; - + //public function getViewPath() //{ // return Yii::getAlias('@fecshop/app/appadmin/modules/Cms/views') . DIRECTORY_SEPARATOR . $this->id; diff --git a/app/appadmin/modules/Config/block/appfrontstore/Manager.php b/app/appadmin/modules/Config/block/appfrontstore/Manager.php index ef3131cbd..e634480d2 100644 --- a/app/appadmin/modules/Config/block/appfrontstore/Manager.php +++ b/app/appadmin/modules/Config/block/appfrontstore/Manager.php @@ -10,7 +10,6 @@ namespace fecshop\app\appadmin\modules\Config\block\appfrontstore; use fec\helpers\CUrl; -use fec\helpers\CRequest; use fecshop\app\appadmin\interfaces\base\AppadminbaseBlockInterface; use fecshop\app\appadmin\modules\AppadminbaseBlock; use Yii; @@ -139,7 +138,7 @@ public function getTableFieldArr() 2 => Yii::$service->page->translate->__('Disable'), ], ], - + [ 'orderField' => 'created_at', 'label' => Yii::$service->page->translate->__('Created At'), @@ -158,7 +157,7 @@ public function getTableFieldArr() return $table_th_bar; } - + /** * list table body. */ @@ -184,5 +183,5 @@ public function getTableTbody() return $this->getTableTbodyHtml($data); } - + } diff --git a/app/appadmin/modules/Config/block/apphtml5store/Manager.php b/app/appadmin/modules/Config/block/apphtml5store/Manager.php index 8ede01466..8b3356b1c 100644 --- a/app/appadmin/modules/Config/block/apphtml5store/Manager.php +++ b/app/appadmin/modules/Config/block/apphtml5store/Manager.php @@ -10,7 +10,6 @@ namespace fecshop\app\appadmin\modules\Config\block\apphtml5store; use fec\helpers\CUrl; -use fec\helpers\CRequest; use fecshop\app\appadmin\interfaces\base\AppadminbaseBlockInterface; use fecshop\app\appadmin\modules\AppadminbaseBlock; use Yii; @@ -139,7 +138,7 @@ public function getTableFieldArr() 2 => Yii::$service->page->translate->__('Disable'), ], ], - + [ 'orderField' => 'created_at', 'label' => Yii::$service->page->translate->__('Created At'), @@ -158,7 +157,7 @@ public function getTableFieldArr() return $table_th_bar; } - + /** * list table body. */ @@ -184,5 +183,5 @@ public function getTableTbody() return $this->getTableTbodyHtml($data); } - + } diff --git a/app/appadmin/modules/Config/block/appserverstorelang/Manager.php b/app/appadmin/modules/Config/block/appserverstorelang/Manager.php index 542c57a36..a9cececcc 100644 --- a/app/appadmin/modules/Config/block/appserverstorelang/Manager.php +++ b/app/appadmin/modules/Config/block/appserverstorelang/Manager.php @@ -9,10 +9,6 @@ namespace fecshop\app\appadmin\modules\Config\block\appserverstorelang; -use fec\helpers\CUrl; -use fec\helpers\CRequest; -use fecshop\app\appadmin\interfaces\base\AppadminbaseBlockEditInterface; -use fecshop\app\appadmin\modules\AppadminbaseBlockEdit; use Yii; /** @@ -27,10 +23,10 @@ class Manager extends \yii\base\BaseObject public $_key = 'appserver_store_lang'; protected $_one; protected $_service; - + public function init() { - + // 需要配置 $this->_saveUrl = Yii::$service->url->getUrl('config/appserverstorelang/managersave'); $this->setService(); @@ -41,20 +37,20 @@ public function init() $this->_one['value'] = unserialize($this->_one['value']); } } - - - + + + // 传递给前端的数据 显示编辑form public function getLastData() { - $id = ''; + $id = ''; if (isset($this->_one['id'])) { $id = $this->_one['id']; - } + } $configLangs = Yii::$service->fecshoplang->getLangAndCodeArr(); $configLangsSelect = $this->getLangSelect($configLangs); return [ - 'id' => $id, + 'id' => $id, 'configLangs' => $configLangs, 'configLangsSelect' => $configLangsSelect, 'langs' => $this->_one['value'], @@ -70,15 +66,15 @@ public function getLangSelect($configLangs) } } $str .= ''; - + return $str; } public function setService() { $this->_service = Yii::$service->storeBaseConfig; } - - + + public function getEditParam($langs) { $arr = []; @@ -89,7 +85,7 @@ public function getEditParam($langs) if ($one) { list($lang_name, $lang_code) = explode('##', $one); if ($lang_name && $lang_code) { - $lang_code_name = isset($configLangs[$lang_code]) ? $configLangs[$lang_code] : ''; + $lang_code_name = isset($configLangs[$lang_code]) ? $configLangs[$lang_code] : ''; if (in_array($lang_code, $langCodes)) { continue; } @@ -101,9 +97,9 @@ public function getEditParam($langs) ]; } } - + } - + return [ 'key' => $this->_key, 'value' => $arr, @@ -116,7 +112,7 @@ public function save() { $editFormData = Yii::$app->request->post('editFormData'); $langs = $editFormData['langs']; - + $saveData = $this->getEditParam($langs); /* * if attribute is date or date time , db storage format is int ,by frontend pass param is int , @@ -124,7 +120,7 @@ public function save() */ // 设置 bdmin_user_id 为 当前的user_id $this->_service->saveConfig($saveData); - + $errors = Yii::$service->helper->errors->get(); if (!$errors) { echo json_encode([ @@ -140,6 +136,6 @@ public function save() exit; } } - - -} \ No newline at end of file + + +} diff --git a/app/appadmin/modules/Config/block/categorysort/Manager.php b/app/appadmin/modules/Config/block/categorysort/Manager.php index cee5a6d16..be84e11b1 100644 --- a/app/appadmin/modules/Config/block/categorysort/Manager.php +++ b/app/appadmin/modules/Config/block/categorysort/Manager.php @@ -9,10 +9,6 @@ namespace fecshop\app\appadmin\modules\Config\block\categorysort; -use fec\helpers\CUrl; -use fec\helpers\CRequest; -use fecshop\app\appadmin\interfaces\base\AppadminbaseBlockEditInterface; -use fecshop\app\appadmin\modules\AppadminbaseBlockEdit; use Yii; /** @@ -27,10 +23,10 @@ class Manager extends \yii\base\BaseObject public $_key = 'category_sort'; protected $_one; protected $_service; - + public function init() { - + // 需要配置 $this->_saveUrl = Yii::$service->url->getUrl('config/categorysort/managersave'); $this->setService(); @@ -42,16 +38,16 @@ public function init() $this->_one['value'] = unserialize($this->_one['value']); } } - - - + + + // 传递给前端的数据 显示编辑form public function getLastData() { - $id = ''; + $id = ''; if (isset($this->_one['id'])) { $id = $this->_one['id']; - } + } $sort_directions = $this->getSortDirection(); $sort_directions_select = $this->getSortSelect($sort_directions); return [ @@ -71,23 +67,23 @@ public function getSortSelect($sort_directions) } } $str .= ''; - + return $str; } public function getSortDirection() { $sort_direction = [ - 'desc' , 'asc' + 'desc' , 'asc' ]; return $sort_direction; } - + public function setService() { $this->_service = Yii::$service->storeBaseConfig; } - - + + public function getEditParam($category_sorts) { $arr = []; @@ -106,7 +102,7 @@ public function getEditParam($category_sorts) } } } - + return [ 'key' => $this->_key, 'value' => $arr, @@ -119,7 +115,7 @@ public function save() { $editFormData = Yii::$app->request->post('editFormData'); $category_sorts = $editFormData['category_sorts']; - + $saveData = $this->getEditParam($category_sorts); //var_dump($saveData); /* @@ -128,7 +124,7 @@ public function save() */ // 设置 bdmin_user_id 为 当前的user_id $this->_service->saveConfig($saveData); - + $errors = Yii::$service->helper->errors->get(); if (!$errors) { echo json_encode([ @@ -144,6 +140,6 @@ public function save() exit; } } - - -} \ No newline at end of file + + +} diff --git a/app/appadmin/modules/Config/block/currency/Manager.php b/app/appadmin/modules/Config/block/currency/Manager.php index 65223695d..30dd440b9 100644 --- a/app/appadmin/modules/Config/block/currency/Manager.php +++ b/app/appadmin/modules/Config/block/currency/Manager.php @@ -9,10 +9,6 @@ namespace fecshop\app\appadmin\modules\Config\block\currency; -use fec\helpers\CUrl; -use fec\helpers\CRequest; -use fecshop\app\appadmin\interfaces\base\AppadminbaseBlockEditInterface; -use fecshop\app\appadmin\modules\AppadminbaseBlockEdit; use Yii; /** @@ -27,10 +23,10 @@ class Manager extends \yii\base\BaseObject public $_key = 'currency'; protected $_one; protected $_service; - + public function init() { - + // 需要配置 $this->_saveUrl = Yii::$service->url->getUrl('config/currency/managersave'); $this->setService(); @@ -41,16 +37,16 @@ public function init() $this->_one['value'] = unserialize($this->_one['value']); } } - - - + + + // 传递给前端的数据 显示编辑form public function getLastData() { - $id = ''; + $id = ''; if (isset($this->_one['id'])) { $id = $this->_one['id']; - } + } return [ 'id' => $id, 'currencys' => $this->_one['value'], @@ -61,8 +57,8 @@ public function setService() { $this->_service = Yii::$service->storeBaseConfig; } - - + + public function getEditParam($currencys) { $arr = []; @@ -78,9 +74,9 @@ public function getEditParam($currencys) ]; } } - + } - + return [ 'key' => $this->_key, 'value' => $arr, @@ -93,7 +89,7 @@ public function save() { $editFormData = Yii::$app->request->post('editFormData'); $currencys = $editFormData['currencys']; - + $saveData = $this->getEditParam($currencys); // 得到baseCurrencyCode $base_currency = Yii::$app->store->get('base_info', 'base_currency'); @@ -116,16 +112,16 @@ public function save() ]); exit; } - } + } /* * if attribute is date or date time , db storage format is int ,by frontend pass param is int , * you must convert string datetime to time , use strtotime function. */ // 设置 bdmin_user_id 为 当前的user_id $this->_service->saveConfig($saveData); - - - + + + $errors = Yii::$service->helper->errors->get(); if (!$errors) { echo json_encode([ @@ -141,6 +137,6 @@ public function save() exit; } } - - -} \ No newline at end of file + + +} diff --git a/app/appadmin/modules/Config/block/mutillang/Manager.php b/app/appadmin/modules/Config/block/mutillang/Manager.php index 1bcc5d189..bb4a61d29 100644 --- a/app/appadmin/modules/Config/block/mutillang/Manager.php +++ b/app/appadmin/modules/Config/block/mutillang/Manager.php @@ -9,10 +9,6 @@ namespace fecshop\app\appadmin\modules\Config\block\mutillang; -use fec\helpers\CUrl; -use fec\helpers\CRequest; -use fecshop\app\appadmin\interfaces\base\AppadminbaseBlockEditInterface; -use fecshop\app\appadmin\modules\AppadminbaseBlockEdit; use Yii; /** @@ -27,10 +23,10 @@ class Manager extends \yii\base\BaseObject public $_key = 'mutil_lang'; protected $_one; protected $_service; - + public function init() { - + // 需要配置 $this->_saveUrl = Yii::$service->url->getUrl('config/mutillang/managersave'); $this->setService(); @@ -41,20 +37,20 @@ public function init() $this->_one['value'] = unserialize($this->_one['value']); } } - - - + + + // 传递给前端的数据 显示编辑form public function getLastData() { - $id = ''; + $id = ''; if (isset($this->_one['id'])) { $id = $this->_one['id']; - } + } $search_engines = Yii::$service->search->getAllChildServiceName(); $search_engines_select = $this->getSearchSelect($search_engines); return [ - 'id' => $id, + 'id' => $id, 'search_engines' => $search_engines, 'search_engines_select' => $search_engines_select, 'langs' => $this->_one['value'], @@ -70,15 +66,15 @@ public function getSearchSelect($search_engines) } } $str .= ''; - + return $str; } public function setService() { $this->_service = Yii::$service->storeBaseConfig; } - - + + public function getEditParam($langs) { $arr = []; @@ -94,9 +90,9 @@ public function getEditParam($langs) ]; } } - + } - + return [ 'key' => $this->_key, 'value' => $arr, @@ -109,7 +105,7 @@ public function save() { $editFormData = Yii::$app->request->post('editFormData'); $langs = $editFormData['langs']; - + $saveData = $this->getEditParam($langs); // 得到defaultLangCode $default_lang = Yii::$app->store->get('base_info', 'default_lang'); @@ -132,15 +128,15 @@ public function save() ]); exit; } - } - + } + /* * if attribute is date or date time , db storage format is int ,by frontend pass param is int , * you must convert string datetime to time , use strtotime function. */ // 设置 bdmin_user_id 为 当前的user_id $this->_service->saveConfig($saveData); - + $errors = Yii::$service->helper->errors->get(); if (!$errors) { echo json_encode([ @@ -156,6 +152,6 @@ public function save() exit; } } - - -} \ No newline at end of file + + +} diff --git a/app/appadmin/modules/Config/controllers/AppfrontstoreController.php b/app/appadmin/modules/Config/controllers/AppfrontstoreController.php index 370ee96c7..63a0a2979 100644 --- a/app/appadmin/modules/Config/controllers/AppfrontstoreController.php +++ b/app/appadmin/modules/Config/controllers/AppfrontstoreController.php @@ -10,7 +10,6 @@ namespace fecshop\app\appadmin\modules\Config\controllers; use fecshop\app\appadmin\modules\Config\ConfigController; -use Yii; /** * @author Terry Zhao <2358269014@qq.com> @@ -44,6 +43,6 @@ public function actionManagerdelete() $this->getBlock('manageredit')->delete(); } - + } diff --git a/app/appadmin/modules/Config/controllers/Apphtml5storeController.php b/app/appadmin/modules/Config/controllers/Apphtml5storeController.php index 1bdb89fef..7d8cd9516 100644 --- a/app/appadmin/modules/Config/controllers/Apphtml5storeController.php +++ b/app/appadmin/modules/Config/controllers/Apphtml5storeController.php @@ -10,7 +10,6 @@ namespace fecshop\app\appadmin\modules\Config\controllers; use fecshop\app\appadmin\modules\Config\ConfigController; -use Yii; /** * @author Terry Zhao <2358269014@qq.com> @@ -44,6 +43,6 @@ public function actionManagerdelete() $this->getBlock('manageredit')->delete(); } - + } diff --git a/app/appadmin/modules/Customer/CustomerController.php b/app/appadmin/modules/Customer/CustomerController.php index 8d29edfd7..91ce3f1ff 100644 --- a/app/appadmin/modules/Customer/CustomerController.php +++ b/app/appadmin/modules/Customer/CustomerController.php @@ -13,14 +13,13 @@ * @author Terry Zhao <2358269014@qq.com> * @since 1.0 */ -use fecadmin\FecadminbaseController; -use Yii; + use fecshop\app\appadmin\modules\AppadminController; class CustomerController extends AppadminController { public $enableCsrfValidation = false; - + //public function getViewPath() //{ // return Yii::getAlias('@fecshop/app/appadmin/modules/Customer/views') . DIRECTORY_SEPARATOR . $this->id; diff --git a/app/appadmin/modules/Fecadmin/block/log/Index.php b/app/appadmin/modules/Fecadmin/block/log/Index.php index 711db4bc0..427d2e6e4 100755 --- a/app/appadmin/modules/Fecadmin/block/log/Index.php +++ b/app/appadmin/modules/Fecadmin/block/log/Index.php @@ -8,7 +8,6 @@ */ namespace fecshop\app\appadmin\modules\Fecadmin\block\log; -use fec\helpers\CUrl; use fecshop\app\appadmin\interfaces\base\AppadminbaseBlockInterface; use fecshop\app\appadmin\modules\AppadminbaseBlock; use Yii; @@ -26,11 +25,11 @@ public function init() $this->_service = Yii::$service->admin->systemLog; parent::init(); } - + public function getLastData(){ # 返回数据的函数 # 隐藏部分 - $pagerForm = $this->getPagerForm(); + $pagerForm = $this->getPagerForm(); # 搜索部分 $searchBar = $this->getSearchBar(); # 编辑 删除 按钮部分 @@ -40,8 +39,8 @@ public function getLastData(){ # 表内容部分 $tbody = $this->getTableTbody(); # 分页部分 - $toolBar = $this->getToolBar($this->_param['numCount'],$this->_param['pageNum'],$this->_param['numPerPage']); - + $toolBar = $this->getToolBar($this->_param['numCount'],$this->_param['pageNum'],$this->_param['numPerPage']); + return [ 'pagerForm' => $pagerForm, 'searchBar' => $searchBar, @@ -87,38 +86,38 @@ public function getSearchArr(){ # 定义表格显示部分的配置 public function getTableFieldArr(){ $table_th_bar = [ - [ + [ 'orderField' => 'id', 'label' => Yii::$service->page->translate->__('Id'), 'width' => '70', 'align' => 'center', - + ], - [ + [ 'orderField' => 'account', 'label' => Yii::$service->page->translate->__('Account'), 'width' => '70', 'align' => 'center', ], - [ + [ 'orderField' => 'person', 'label' => Yii::$service->page->translate->__('User Name'), 'width' => '70', 'align' => 'left', ], - [ + [ 'orderField' => 'menu', 'label' => Yii::$service->page->translate->__('Resource'), 'width' => '70', 'align' => 'left', ], - [ + [ 'orderField' => 'url', 'label' => Yii::$service->page->translate->__('Url'), 'width' => '220', 'align' => 'left', ], - [ + [ 'orderField' => 'created_at', 'label' => Yii::$service->page->translate->__('Created At'), 'width' => '130', @@ -128,7 +127,7 @@ public function getTableFieldArr(){ ]; return $table_th_bar ; } - + # table 内容部分 public function getTableTbodyHtml($data){ $fileds = $this->getTableFieldArr(); @@ -180,7 +179,7 @@ public function getTableTbodyHtml($data){ } $str .= ''; } - + return $str ; } # table 表 标题 1 @@ -192,7 +191,7 @@ public function getTableTheadHtml($table_th_bar){ foreach ($table_th_bar as $k => $field) { if ($field['orderField'] == $this->_param['orderField']) { $table_th_bar[$k]['class'] = $this->_param['orderDirection']; - } + } } $str = ''; $str .= ''; @@ -205,9 +204,9 @@ public function getTableTheadHtml($table_th_bar){ $str .= ''.$label.''; } $str .= ''; - + return $str; } - + } diff --git a/app/appadmin/modules/Fecadmin/block/logtj/Index.php b/app/appadmin/modules/Fecadmin/block/logtj/Index.php index 3f577390a..6ad9e4293 100644 --- a/app/appadmin/modules/Fecadmin/block/logtj/Index.php +++ b/app/appadmin/modules/Fecadmin/block/logtj/Index.php @@ -8,7 +8,6 @@ */ namespace fecshop\app\appadmin\modules\Fecadmin\block\logtj; -use fec\helpers\CUrl; use fec\helpers\CDate; use fec\helpers\CRequest; use fecshop\app\appadmin\interfaces\base\AppadminbaseBlockInterface; @@ -30,11 +29,11 @@ public function init() $this->_param['created_at_lt'] || $this->_param['created_at_lt'] = date('Y-m-d',strtotime(CDate::getCurrentDate().' +1 day ')); $this->_param['created_at_gte'] || $this->_param['created_at_gte'] = date('Y-m-d',strtotime($this->_param['created_at_gte'].' -1 month ')); } - + public function getLastData(){ # 返回数据的函数 # 隐藏部分 - $pagerForm = $this->getPagerForm(); + $pagerForm = $this->getPagerForm(); # 搜索部分 $searchBar = $this->getSearchBar(); # 编辑 删除 按钮部分 @@ -44,8 +43,8 @@ public function getLastData(){ # 表内容部分 $tbody = $this->getTableTbody(); # 分页部分 - $toolBar = $this->getToolBar($this->_param['numCount'],$this->_param['pageNum'],$this->_param['numPerPage']); - + $toolBar = $this->getToolBar($this->_param['numCount'],$this->_param['pageNum'],$this->_param['numPerPage']); + return [ 'pagerForm' => $pagerForm, 'searchBar' => $searchBar, @@ -55,7 +54,7 @@ public function getLastData(){ 'toolBar' => $toolBar, ]; } - + # 定义搜索部分字段格式 public function getSearchArr(){ $data = [ @@ -72,7 +71,7 @@ public function getSearchArr(){ 'columns_type' => 'string' ], [ # selecit的Int 类型 - 'type' => 'select', + 'type' => 'select', 'title' => Yii::$service->page->translate->__('Type'), 'name' => 'tj_type', 'columns_type' => 'int', # int使用标准匹配, string使用模糊查询 @@ -93,41 +92,41 @@ public function getSearchArr(){ ]; return $data; } - + # 定义表格显示部分的配置 public function getTableFieldArr(){ $table_th_bar = [ - [ + [ 'orderField' => 'account', 'label' => Yii::$service->page->translate->__('Account'), 'width' => '70', 'align' => 'center', ], - [ + [ 'orderField' => 'person', 'label' => Yii::$service->page->translate->__('Name'), 'width' => '70', 'align' => 'left', ], - //[ + //[ // 'orderField' => 'menu', // 'label' => '操作菜单', // 'width' => '70', // 'align' => 'left', //], - [ + [ 'orderField' => 'click_count', 'label' => Yii::$service->page->translate->__('Count'), 'width' => '220', 'align' => 'left', ], ]; - + return $table_th_bar ; } - # 得到表格的内容部分 + # 得到表格的内容部分 public function getTableTbody(){ - + $obj = Yii::$service->admin->systemLog->getSystemLogModel(); $offset = ($this->_param['pageNum'] -1)*$this->_param['numPerPage'] ; $limit = $this->_param['numPerPage']; @@ -147,7 +146,7 @@ public function getTableTbody(){ $where []= " menu = 'login' "; $group .= " ,menu "; } - + if($created_at_lt) $where []= " created_at < '$created_at_lt' "; if($created_at_gte) @@ -157,24 +156,24 @@ public function getTableTbody(){ }else{ $where = ''; } - + $table = $obj::tableName(); - + $db = \Yii::$app->db; - - # 得到 总数。 - $sql = "select count(*) as count from (select account,person,menu ,count(*) as click_count + + # 得到 总数。 + $sql = "select count(*) as count from (select account,person,menu ,count(*) as click_count from $table $where group by $group ) as t "; $data_count = $db->createCommand($sql,[])->queryOne(); $this->_param['numCount'] = $data_count['count']; # 得到数据 - $sql = "select account,person,menu ,count(*) as click_count + $sql = "select account,person,menu ,count(*) as click_count from $table $where group by $group order by click_count DESC $limit "; $data = $db->createCommand($sql,[])->queryAll(); return $this->getTableTbodyHtml($data); } - + # table 内容部分 public function getTableTbodyHtml($data){ $fileds = $this->getTableFieldArr(); @@ -221,7 +220,7 @@ public function getTableTbodyHtml($data){ } $str .= ''; } - + return $str ; } # table 表 标题 1 @@ -233,7 +232,7 @@ public function getTableTheadHtml($table_th_bar){ foreach ($table_th_bar as $k => $field) { if ($field['orderField'] == $this->_param['orderField']) { $table_th_bar[$k]['class'] = $this->_param['orderDirection']; - } + } } $str = ''; //$str .= ''; @@ -246,8 +245,8 @@ public function getTableTheadHtml($table_th_bar){ $str .= ''.$label.''; } $str .= ''; - + return $str; } - -} \ No newline at end of file + +} diff --git a/app/appadmin/modules/Fecadmin/block/myaccount/Index.php b/app/appadmin/modules/Fecadmin/block/myaccount/Index.php index b2e622b99..b7f445cbd 100644 --- a/app/appadmin/modules/Fecadmin/block/myaccount/Index.php +++ b/app/appadmin/modules/Fecadmin/block/myaccount/Index.php @@ -11,7 +11,7 @@ use Yii; use fec\helpers\CUrl; use fec\helpers\CRequest; -use fecadmin\models\AdminUser\AdminUserResetPassword; + /** * @author Terry Zhao <2358269014@qq.com> * @since 1.0 @@ -21,7 +21,7 @@ class Index extends \yii\base\BaseObject public function getLastData(){ $data = CRequest::param("updatepass"); if($data){ - // ajax update + // ajax update $resetStatus = Yii::$service->adminUser->adminUser->resetCurrentPassword($data); if (!$resetStatus) { $errors = Yii::$service->helper->errors->get(); @@ -38,11 +38,11 @@ public function getLastData(){ $adminUser = \Yii::$app->user->identity; $current_account = $adminUser->username; $editUrl = CUrl::getUrl("fecadmin/myaccount/index"); - + return [ 'current_account' => $current_account, 'editUrl' => $editUrl, ]; } - -} \ No newline at end of file + +} diff --git a/app/appadmin/modules/Fecadmin/controllers/AccountController.php b/app/appadmin/modules/Fecadmin/controllers/AccountController.php index f2bf41b13..288e4eeee 100644 --- a/app/appadmin/modules/Fecadmin/controllers/AccountController.php +++ b/app/appadmin/modules/Fecadmin/controllers/AccountController.php @@ -7,9 +7,6 @@ * @license http://www.fecshop.com/license/ */ namespace fecshop\app\appadmin\modules\Fecadmin\controllers; -use Yii; -use fec\helpers\CRequest; -use fecadmin\FecadminbaseController; use fecshop\app\appadmin\modules\AppadminController; /** * @author Terry Zhao <2358269014@qq.com> @@ -19,20 +16,20 @@ class AccountController extends AppadminController { public $enableCsrfValidation = true; public $blockNamespace = 'fecshop\\app\\appadmin\\modules\\Fecadmin\\block'; - + public function init() { // Yii::$service->page->theme->layoutFile = 'dashboard.php'; - parent::init(); + parent::init(); } - + # 我的账户 //public function actionIndex() //{ // $data = $this->getBlock()->getLastData(); // return $this->render($this->action->id,$data); //} - + # 我的账户 public function actionManager() { @@ -40,31 +37,31 @@ public function actionManager() $data = $this->getBlock()->getLastData(); return $this->render($this->action->id,$data); } - - + + public function actionManageredit() { //echo $this->action->id ;exit; $data = $this->getBlock()->getLastData(); return $this->render($this->action->id,$data); } - + public function actionManagereditsave() { - + //echo $this->action->id ;exit; $data = $this->getBlock("manageredit")->save(); //return $this->render($this->action->id,$data); } - + public function actionManagerdelete() { //echo $this->action->id ;exit; $this->getBlock("manageredit")->delete(); - + } - + } diff --git a/app/appadmin/modules/Fecadmin/controllers/CacheController.php b/app/appadmin/modules/Fecadmin/controllers/CacheController.php index a3903fff4..93acc7ce2 100644 --- a/app/appadmin/modules/Fecadmin/controllers/CacheController.php +++ b/app/appadmin/modules/Fecadmin/controllers/CacheController.php @@ -7,9 +7,7 @@ * @license http://www.fecshop.com/license/ */ namespace fecshop\app\appadmin\modules\Fecadmin\controllers; -use Yii; use fec\helpers\CRequest; -use fecadmin\FecadminbaseController; use fecshop\app\appadmin\modules\AppadminController; /** * @author Terry Zhao <2358269014@qq.com> @@ -29,10 +27,10 @@ public function actionIndex() $data = $block->getLastData(); return $this->render($this->action->id,$data); } - - - - + + + + } diff --git a/app/appadmin/modules/Fecadmin/controllers/ConfigController.php b/app/appadmin/modules/Fecadmin/controllers/ConfigController.php index 3c8cc6d2d..1708364c4 100644 --- a/app/appadmin/modules/Fecadmin/controllers/ConfigController.php +++ b/app/appadmin/modules/Fecadmin/controllers/ConfigController.php @@ -7,9 +7,6 @@ * @license http://www.fecshop.com/license/ */ namespace fecshop\app\appadmin\modules\Fecadmin\controllers; -use Yii; -use fec\helpers\CRequest; -use fecadmin\FecadminbaseController; use fecshop\app\appadmin\modules\AppadminController; /** * @author Terry Zhao <2358269014@qq.com> @@ -19,37 +16,37 @@ class ConfigController extends AppadminController { public $blockNamespace = 'fecshop\\app\\appadmin\\modules\\Fecadmin\\block'; public $enableCsrfValidation = true; - + public function actionManager() { $data = $this->getBlock()->getLastData(); return $this->render($this->action->id,$data); } - - + + public function actionManageredit() { //echo $this->action->id ;exit; $data = $this->getBlock()->getLastData(); return $this->render($this->action->id,$data); } - + public function actionManagereditsave() { - + //echo $this->action->id ;exit; $data = $this->getBlock("manageredit")->save(); //return $this->render($this->action->id,$data); } - + public function actionManagerdelete() { //echo $this->action->id ;exit; $this->getBlock("manageredit")->delete(); - + } - + } diff --git a/app/appadmin/modules/Fecadmin/controllers/ErrorController.php b/app/appadmin/modules/Fecadmin/controllers/ErrorController.php index 5cf80e1bf..592ef090a 100644 --- a/app/appadmin/modules/Fecadmin/controllers/ErrorController.php +++ b/app/appadmin/modules/Fecadmin/controllers/ErrorController.php @@ -8,8 +8,6 @@ */ namespace fecshop\app\appadmin\modules\Fecadmin\controllers; use Yii; -use fec\helpers\CRequest; -use fecadmin\FecadminbaseController; use fecshop\app\appadmin\modules\AppadminController; /** * @author Terry Zhao <2358269014@qq.com> @@ -18,7 +16,7 @@ class ErrorController extends AppadminController { public $enableCsrfValidation = true; - + # 刷新缓存 public function actionIndex() { @@ -27,10 +25,10 @@ public function actionIndex() "; exit; } - - - - + + + + } diff --git a/app/appadmin/modules/Fecadmin/controllers/IndexController.php b/app/appadmin/modules/Fecadmin/controllers/IndexController.php index b7f96315c..90ecc1ae7 100644 --- a/app/appadmin/modules/Fecadmin/controllers/IndexController.php +++ b/app/appadmin/modules/Fecadmin/controllers/IndexController.php @@ -8,8 +8,6 @@ */ namespace fecshop\app\appadmin\modules\Fecadmin\controllers; use Yii; -use fec\helpers\CRequest; -use fecadmin\FecadminbaseController; use fecshop\app\appadmin\modules\AppadminController; /** * @author Terry Zhao <2358269014@qq.com> @@ -18,21 +16,21 @@ class IndexController extends AppadminController { public $enableCsrfValidation = true; - + public function init() { Yii::$service->page->theme->layoutFile = 'dashboard.php'; - parent::init(); + parent::init(); } - + public function actionIndex() { return $this->render('index'); } - - - - + + + + } diff --git a/app/appadmin/modules/Fecadmin/controllers/LogController.php b/app/appadmin/modules/Fecadmin/controllers/LogController.php index eca5dd0bc..af66a8e1a 100644 --- a/app/appadmin/modules/Fecadmin/controllers/LogController.php +++ b/app/appadmin/modules/Fecadmin/controllers/LogController.php @@ -7,9 +7,6 @@ * @license http://www.fecshop.com/license/ */ namespace fecshop\app\appadmin\modules\Fecadmin\controllers; -use Yii; -use fec\helpers\CRequest; -use fecadmin\FecadminbaseController; use fecshop\app\appadmin\modules\AppadminController; /** * @author Terry Zhao <2358269014@qq.com> @@ -19,14 +16,14 @@ class LogController extends AppadminController { public $enableCsrfValidation = true; public $blockNamespace = 'fecshop\\app\\appadmin\\modules\\Fecadmin\\block'; - + public function actionIndex() - { + { $data = $this->getBlock()->getLastData(); return $this->render($this->action->id,$data); } - + } diff --git a/app/appadmin/modules/Fecadmin/controllers/LoginController.php b/app/appadmin/modules/Fecadmin/controllers/LoginController.php index 31e70506f..3d18e2dca 100644 --- a/app/appadmin/modules/Fecadmin/controllers/LoginController.php +++ b/app/appadmin/modules/Fecadmin/controllers/LoginController.php @@ -9,12 +9,8 @@ namespace fecshop\app\appadmin\modules\Fecadmin\controllers; use Yii; use fec\helpers\CConfig; -use fecadmin\FecadminbaseController; -use fecshop\app\appadmin\modules\AppadminController; -use yii\helpers\Url; use fec\helpers\CModel; -use fec\helpers\CDate; use fecadmin\models\AdminUser\AdminUserLogin; /** @@ -25,7 +21,7 @@ class LoginController extends \fecadmin\controllers\LoginController { public $enableCsrfValidation = true; public $blockNamespace; - + /** * init theme component property : $fecshopThemeDir and $layoutFile * $fecshopThemeDir is appfront base theme directory. @@ -49,9 +45,9 @@ public function init() * set i18n translate category. */ Yii::$service->page->translate->category = 'appadmin'; - Yii::$service->page->theme->layoutFile = 'login.php'; + Yii::$service->page->theme->layoutFile = 'login.php'; } - + public function actionIndex() { $langCode = Yii::$app->request->get('lang'); @@ -87,7 +83,7 @@ public function actionIndex() 'error' => $errors, ]); } - + public function actionChangelang(){ $langCode = Yii::$app->request->get('lang'); if ($langCode) { @@ -98,14 +94,14 @@ public function actionChangelang(){ ]); exit; } - } - + } + echo json_encode([ 'status' => 'fail' ]); exit; } - + /** * @param $view|string , (only) view file name ,by this module id, this controller id , generate view relative path. * @param $params|Array, @@ -139,7 +135,7 @@ public function findLayoutFile($view) } throw new InvalidValueException('layout file is not exist!'); } - + } diff --git a/app/appadmin/modules/Fecadmin/controllers/LogoutController.php b/app/appadmin/modules/Fecadmin/controllers/LogoutController.php index 6e8ed7cee..55a2c8e25 100644 --- a/app/appadmin/modules/Fecadmin/controllers/LogoutController.php +++ b/app/appadmin/modules/Fecadmin/controllers/LogoutController.php @@ -9,13 +9,7 @@ namespace fecshop\app\appadmin\modules\Fecadmin\controllers; use Yii; use fec\helpers\CConfig; -use fecadmin\FecadminbaseController; -use fecshop\app\appadmin\modules\AppadminController; use yii\web\Controller; -use yii\helpers\Url; -use fec\helpers\CModel; -use fec\helpers\CDate; -use fecadmin\models\AdminUser\AdminUserLogin; /** * @author Terry Zhao <2358269014@qq.com> @@ -25,8 +19,8 @@ class LogoutController extends Controller { public $enableCsrfValidation = true; public $blockNamespace; - - + + /** * init theme component property : $fecshopThemeDir and $layoutFile * $fecshopThemeDir is appfront base theme directory. @@ -54,7 +48,7 @@ public function init() * 自定义Yii::$classMap,用于重写 */ } - + public function actionIndex() { $currentLang = Yii::$service->admin->getCurrentLangCode(); @@ -74,7 +68,7 @@ public function actionIndex() // Yii::$app->getResponse()->redirect()->send(); //$this->redirect("/fecadmin/login/index",200)->send(); } - + /** * @param $view|string , (only) view file name ,by this module id, this controller id , generate view relative path. * @param $params|Array, @@ -108,7 +102,7 @@ public function findLayoutFile($view) } throw new InvalidValueException('layout file is not exist!'); } - + } diff --git a/app/appadmin/modules/Fecadmin/controllers/LogtjController.php b/app/appadmin/modules/Fecadmin/controllers/LogtjController.php index caeea3f65..4d02ba25f 100644 --- a/app/appadmin/modules/Fecadmin/controllers/LogtjController.php +++ b/app/appadmin/modules/Fecadmin/controllers/LogtjController.php @@ -7,9 +7,6 @@ * @license http://www.fecshop.com/license/ */ namespace fecshop\app\appadmin\modules\Fecadmin\controllers; -use Yii; -use fec\helpers\CRequest; -use fecadmin\FecadminbaseController; use fecshop\app\appadmin\modules\AppadminController; /** * @author Terry Zhao <2358269014@qq.com> @@ -19,14 +16,14 @@ class LogtjController extends AppadminController { public $enableCsrfValidation = true; public $blockNamespace = 'fecshop\\app\\appadmin\\modules\\Fecadmin\\block'; - + public function actionIndex() { $data = $this->getBlock()->getLastData(); return $this->render($this->action->id,$data); } - + } diff --git a/app/appadmin/modules/Fecadmin/controllers/MyaccountController.php b/app/appadmin/modules/Fecadmin/controllers/MyaccountController.php index 3f966d9e9..ca0ff0c59 100644 --- a/app/appadmin/modules/Fecadmin/controllers/MyaccountController.php +++ b/app/appadmin/modules/Fecadmin/controllers/MyaccountController.php @@ -7,9 +7,6 @@ * @license http://www.fecshop.com/license/ */ namespace fecshop\app\appadmin\modules\Fecadmin\controllers; -use Yii; -use fec\helpers\CRequest; -use fecadmin\FecadminbaseController; use fecshop\app\appadmin\modules\AppadminController; /** * @author Terry Zhao <2358269014@qq.com> @@ -19,14 +16,14 @@ class MyaccountController extends AppadminController { public $enableCsrfValidation = true; public $blockNamespace = 'fecshop\\app\\appadmin\\modules\\Fecadmin\\block'; - + # 我的账户 public function actionIndex() { $data = $this->getBlock()->getLastData(); return $this->render($this->action->id,$data); } - + } diff --git a/app/appadmin/modules/Fecadmin/controllers/ResourceController.php b/app/appadmin/modules/Fecadmin/controllers/ResourceController.php index aaba037f2..139ebce53 100644 --- a/app/appadmin/modules/Fecadmin/controllers/ResourceController.php +++ b/app/appadmin/modules/Fecadmin/controllers/ResourceController.php @@ -7,9 +7,6 @@ * @license http://www.fecshop.com/license/ */ namespace fecshop\app\appadmin\modules\Fecadmin\controllers; -use Yii; -use fec\helpers\CRequest; -use fecadmin\FecadminbaseController; use fecshop\app\appadmin\modules\AppadminController; /** * @author Terry Zhao <2358269014@qq.com> @@ -64,7 +61,7 @@ public function actionManagerdelete() } - + } diff --git a/app/appadmin/modules/Fecadmin/controllers/RoleController.php b/app/appadmin/modules/Fecadmin/controllers/RoleController.php index 28cfe9008..fed4c82b8 100644 --- a/app/appadmin/modules/Fecadmin/controllers/RoleController.php +++ b/app/appadmin/modules/Fecadmin/controllers/RoleController.php @@ -7,9 +7,6 @@ * @license http://www.fecshop.com/license/ */ namespace fecshop\app\appadmin\modules\Fecadmin\controllers; -use Yii; -use fec\helpers\CRequest; -use fecadmin\FecadminbaseController; use fecshop\app\appadmin\modules\AppadminController; /** * @author Terry Zhao <2358269014@qq.com> diff --git a/app/appadmin/modules/Fecadmin/controllers/SystemlogController.php b/app/appadmin/modules/Fecadmin/controllers/SystemlogController.php index db8deeb3e..d91e56748 100644 --- a/app/appadmin/modules/Fecadmin/controllers/SystemlogController.php +++ b/app/appadmin/modules/Fecadmin/controllers/SystemlogController.php @@ -7,9 +7,6 @@ * @license http://www.fecshop.com/license/ */ namespace fecshop\app\appadmin\modules\Fecadmin\controllers; -use Yii; -use fec\helpers\CRequest; -use fecadmin\FecadminbaseController; use fecshop\app\appadmin\modules\AppadminController; /** * @author Terry Zhao <2358269014@qq.com> @@ -18,16 +15,16 @@ class SystemlogController extends AppadminController { public $enableCsrfValidation = true; - + # 刷新缓存 public function actionManager() { echo '
该功能废弃
'; } - - - - + + + + } diff --git a/app/appadmin/modules/Sales/SalesController.php b/app/appadmin/modules/Sales/SalesController.php index 12db8502c..91df661b2 100644 --- a/app/appadmin/modules/Sales/SalesController.php +++ b/app/appadmin/modules/Sales/SalesController.php @@ -13,8 +13,7 @@ * @author Terry Zhao <2358269014@qq.com> * @since 1.0 */ -use fecadmin\FecadminbaseController; -use Yii; + use fecshop\app\appadmin\modules\AppadminController; class SalesController extends AppadminController diff --git a/app/appadmin/modules/Sales/block/orderinfo/Manageredit.php b/app/appadmin/modules/Sales/block/orderinfo/Manageredit.php index 8fa3bb872..e4cf5f691 100644 --- a/app/appadmin/modules/Sales/block/orderinfo/Manageredit.php +++ b/app/appadmin/modules/Sales/block/orderinfo/Manageredit.php @@ -9,7 +9,6 @@ namespace fecshop\app\appadmin\modules\Sales\block\orderinfo; -use fec\helpers\CUrl; use Yii; use yii\base\BaseObject; @@ -42,13 +41,13 @@ public function getLastData() 'saveUrl' => Yii::$service->url->getUrl('sales/orderinfo/managereditsave'), ]; } - + public function getViewOrderInfo($order_info){ // 订单状态部分 $orderStatusArr = Yii::$service->order->getStatusArr(); //var_dump($orderStatusArr);exit; $order_info['order_status_options'] = $this->getOptions($orderStatusArr,$order_info['order_status']); - + // 货币部分 $currencys = Yii::$service->page->currency->getCurrencys(); $currencyArr = []; @@ -62,7 +61,7 @@ public function getViewOrderInfo($order_info){ $checkTypeArr = Yii::$service->order->getCheckoutTypeArr(); $order_info['checkout_method_options'] = $this->getOptions($checkTypeArr,$order_info['checkout_method']); // 游客下单 - $customerOrderArr = [ + $customerOrderArr = [ 1 => Yii::$service->page->translate->__('Yes'), 2 => Yii::$service->page->translate->__('No'), ]; @@ -74,10 +73,10 @@ public function getViewOrderInfo($order_info){ // 支付方式label 货运方式label $order_info['shipping_method_label'] = Yii::$service->shipping->getShippingLabelByMethod($order_info['shipping_method']); $order_info['payment_method_label'] = Yii::$service->payment->getPaymentLabelByMethod($order_info['payment_method']); - + return $order_info; } - + public function getOptions($orderStatusArr,$order_status){ $str = ''; if (is_array($orderStatusArr)) { @@ -89,10 +88,10 @@ public function getOptions($orderStatusArr,$order_status){ } } } - + return $str; } - + public function save(){ $editForm = Yii::$app->request->post('editForm'); $order_id = $editForm['order_id']; @@ -102,7 +101,7 @@ public function save(){ if ($orderModel->hasAttribute($k)) { $orderModel[$k] = $v; } - } + } $orderModel->save(); } echo json_encode([ @@ -111,7 +110,7 @@ public function save(){ ]); exit; } - + public function exportExcel(){ $order_ids = Yii::$app->request->post('order_ids'); $order_arr = explode(',', $order_ids); @@ -123,7 +122,7 @@ public function exportExcel(){ Yii::$service->page->translate->__('Created At'), Yii::$service->page->translate->__('Update At'), Yii::$service->page->translate->__('Base Grand Total'), - Yii::$service->page->translate->__('Customer Id'), + Yii::$service->page->translate->__('Customer Id'), Yii::$service->page->translate->__('Order Email'), Yii::$service->page->translate->__('First Name') , Yii::$service->page->translate->__('Last Name'), @@ -184,25 +183,25 @@ public function exportExcel(){ if (isset($orderCollArr[$order_id])) { $order = $orderCollArr[$order_id]; $excelArr[] = [ - $order['order_id'], $order['increment_id'], $order['order_status'], - $order['store'], date('Y-m-d H:i:s', $order['created_at']), date('Y-m-d H:i:s', $order['updated_at']), - $order['base_grand_total'], $order['customer_id'], $order['customer_email'], - $order['customer_firstname'], $order['customer_lastname'], $order['customer_is_guest'] == 1 ? '是' : '否', - $order['coupon_code'], $order['payment_method'], $order['shipping_method'], - $order['base_shipping_total'], $order['customer_telephone'], $order['customer_address_country'], - $order['customer_address_state'], $order['customer_address_city'], $order['customer_address_zip'], - $order['customer_address_street1'], $order['customer_address_street2'], $order['order_remark'], - - $orderItem['product_id'], $orderItem['sku'], $orderItem['name'], - $orderItem['custom_option_sku'], $orderItem['weight'], + $order['order_id'], $order['increment_id'], $order['order_status'], + $order['store'], date('Y-m-d H:i:s', $order['created_at']), date('Y-m-d H:i:s', $order['updated_at']), + $order['base_grand_total'], $order['customer_id'], $order['customer_email'], + $order['customer_firstname'], $order['customer_lastname'], $order['customer_is_guest'] == 1 ? '是' : '否', + $order['coupon_code'], $order['payment_method'], $order['shipping_method'], + $order['base_shipping_total'], $order['customer_telephone'], $order['customer_address_country'], + $order['customer_address_state'], $order['customer_address_city'], $order['customer_address_zip'], + $order['customer_address_street1'], $order['customer_address_street2'], $order['order_remark'], + + $orderItem['product_id'], $orderItem['sku'], $orderItem['name'], + $orderItem['custom_option_sku'], $orderItem['weight'], $orderItem['qty'], $orderItem['base_price'], ]; } } } } - + \fec\helpers\CExcel::downloadExcelFileByArray($excelArr); } - + } diff --git a/app/appadmin/modules/System/SystemController.php b/app/appadmin/modules/System/SystemController.php index a5372a060..3e618ef52 100644 --- a/app/appadmin/modules/System/SystemController.php +++ b/app/appadmin/modules/System/SystemController.php @@ -13,14 +13,13 @@ * @author Terry Zhao <2358269014@qq.com> * @since 1.0 */ -use fecadmin\FecadminbaseController; -use Yii; + use fecshop\app\appadmin\modules\AppadminController; class SystemController extends AppadminController { public $enableCsrfValidation = false; - + //public function getViewPath() //{ // return Yii::getAlias('@fecshop/app/appadmin/modules/System/views') . DIRECTORY_SEPARATOR . $this->id; diff --git a/app/appadmin/modules/System/block/adminurlkey/Manager.php b/app/appadmin/modules/System/block/adminurlkey/Manager.php index 37f77bc37..2aca3bb9c 100644 --- a/app/appadmin/modules/System/block/adminurlkey/Manager.php +++ b/app/appadmin/modules/System/block/adminurlkey/Manager.php @@ -9,10 +9,6 @@ namespace fecshop\app\appadmin\modules\System\block\adminurlkey; -use fec\helpers\CUrl; -use fec\helpers\CRequest; -use fecshop\app\appadmin\interfaces\base\AppadminbaseBlockEditInterface; -use fecshop\app\appadmin\modules\AppadminbaseBlockEdit; use Yii; /** @@ -20,21 +16,21 @@ * @author Terry Zhao <2358269014@qq.com> * @since 1.0 */ -class Manager +class Manager { - - + + // 传递给前端的数据 显示编辑form public function getLastData($developer_info) { $addon_author = isset($developer_info['addon_author']) ? $developer_info['addon_author'] : ''; $package = isset($developer_info['package']) ? $developer_info['package'] : ''; - + return [ 'addon_author' => $addon_author, 'package' => $package, 'saveUrl' => Yii::$service->url->getUrl('system/adminurlkey/manager'), ]; } - + } diff --git a/app/appadmin/modules/System/block/error/Manageredit.php b/app/appadmin/modules/System/block/error/Manageredit.php index c1b4fbef7..b3045f053 100644 --- a/app/appadmin/modules/System/block/error/Manageredit.php +++ b/app/appadmin/modules/System/block/error/Manageredit.php @@ -9,10 +9,6 @@ namespace fecshop\app\appadmin\modules\System\block\error; -use fec\helpers\CRequest; -use fec\helpers\CUrl; -use fecshop\app\appadmin\interfaces\base\AppadminbaseBlockEditInterface; -use fecshop\app\appadmin\modules\AppadminbaseBlockEdit; use Yii; /** @@ -22,7 +18,7 @@ */ class Manageredit extends \yii\base\BaseObject { - + // 传递给前端的数据 显示编辑form public function getLastData() { @@ -30,8 +26,8 @@ public function getLastData() $primaryVal = Yii::$app->request->get($primaryKey); $errorHander = Yii::$service->helper->errorHandler->getByPrimaryKey($primaryVal); return $errorHander->attributes; - + } - + } diff --git a/app/appadmin/modules/System/block/extensiongii/Manager.php b/app/appadmin/modules/System/block/extensiongii/Manager.php index 9038b8307..37d2b7da4 100644 --- a/app/appadmin/modules/System/block/extensiongii/Manager.php +++ b/app/appadmin/modules/System/block/extensiongii/Manager.php @@ -9,10 +9,6 @@ namespace fecshop\app\appadmin\modules\System\block\extensiongii; -use fec\helpers\CUrl; -use fec\helpers\CRequest; -use fecshop\app\appadmin\interfaces\base\AppadminbaseBlockEditInterface; -use fecshop\app\appadmin\modules\AppadminbaseBlockEdit; use Yii; /** @@ -20,21 +16,21 @@ * @author Terry Zhao <2358269014@qq.com> * @since 1.0 */ -class Manager +class Manager { - - + + // 传递给前端的数据 显示编辑form public function getLastData($developer_info) { $addon_author = isset($developer_info['addon_author']) ? $developer_info['addon_author'] : ''; $package = isset($developer_info['package']) ? $developer_info['package'] : ''; - + return [ 'addon_author' => $addon_author, 'package' => $package, 'saveUrl' => Yii::$service->url->getUrl('system/extensiongii/manager'), ]; } - + } diff --git a/app/appadmin/modules/System/block/extensionmarket/Login.php b/app/appadmin/modules/System/block/extensionmarket/Login.php index 26ceecddc..fa73635e3 100644 --- a/app/appadmin/modules/System/block/extensionmarket/Login.php +++ b/app/appadmin/modules/System/block/extensionmarket/Login.php @@ -9,10 +9,6 @@ namespace fecshop\app\appadmin\modules\System\block\extensionmarket; -use fec\helpers\CUrl; -use fec\helpers\CRequest; -use fecshop\app\appadmin\interfaces\base\AppadminbaseBlockInterface; -use fecshop\app\appadmin\modules\AppadminbaseBlock; use Yii; /** @@ -34,11 +30,11 @@ public function init() public function getLastData() { - + return [ ]; } - + public function login($param) { // 进行远程登陆 @@ -49,14 +45,14 @@ public function login($param) ]); exit; } - + echo json_encode([ 'statusCode' => '200', 'message' => Yii::$service->page->translate->__('Login Success'), ]); - exit; - - + exit; + + } } diff --git a/app/appadmin/modules/System/block/extensionmarket/Manager.php b/app/appadmin/modules/System/block/extensionmarket/Manager.php index 08e4a6c0c..6bfbcd729 100644 --- a/app/appadmin/modules/System/block/extensionmarket/Manager.php +++ b/app/appadmin/modules/System/block/extensionmarket/Manager.php @@ -9,10 +9,6 @@ namespace fecshop\app\appadmin\modules\System\block\extensionmarket; -use fec\helpers\CUrl; -use fec\helpers\CRequest; -use fecshop\app\appadmin\interfaces\base\AppadminbaseBlockInterface; -use fecshop\app\appadmin\modules\AppadminbaseBlock; use Yii; /** @@ -22,7 +18,7 @@ */ class Manager extends \yii\base\BaseObject { - + public $installedNameSpaceArr; public $versionArr; public $_param = []; @@ -44,7 +40,7 @@ public function getLastData($param, $info) $this->initInstalledExtensions(); $toolBar = $this->getToolBar($count, $this->_param['pageNum'], $this->_param['numPerPage']); $pagerForm = $this->getPagerForm(); - + $can_hand_install_extensions = $this->canHandInstallExtensions($coll); $can_hand_upgrade_extensions = $this->canHandUpgradeExtensions($coll); //var_dump( $can_hand_install_extensions); @@ -58,7 +54,7 @@ public function getLastData($param, $info) 'can_hand_upgrade_extensions' => $can_hand_upgrade_extensions, 'versionArr' => $this->versionArr, 'localCreatedArr' => $this->localCreatedArr , - + ]; } /** @@ -74,7 +70,7 @@ public function canHandUpgradeExtensions($addon_list) foreach ($addon_list as $addon) { $packageName = isset($addon['addon_info']['package']) ? $addon['addon_info']['package'] : ''; $folderName = isset($addon['addon_info']['folder']) ? $addon['addon_info']['folder'] : ''; - $namespaceName = isset($addon['addon_info']['namespace']) ? $addon['addon_info']['namespace'] : ''; //$addon['namespace']; + $namespaceName = isset($addon['addon_info']['namespace']) ? $addon['addon_info']['namespace'] : ''; //$addon['namespace']; // 如果应用没安装 if (!in_array($namespaceName, $this->installedNameSpaceArr)) { continue; @@ -86,11 +82,11 @@ public function canHandUpgradeExtensions($addon_list) // 文件检测 $filePath = Yii::$service->extension->remoteService->getExtensionZipFilePath($packageName, $folderName); if (file_exists($filePath) && is_executable($filePath)) { - + $arr[] = $namespaceName; } } - + return $arr; } /** @@ -106,21 +102,21 @@ public function canHandInstallExtensions($addon_list) foreach ($addon_list as $addon) { $packageName = isset($addon['addon_info']['package']) ? $addon['addon_info']['package'] : ''; $folderName = isset($addon['addon_info']['folder']) ? $addon['addon_info']['folder'] : ''; - $namespaceName = isset($addon['addon_info']['namespace']) ? $addon['addon_info']['namespace'] : ''; //$addon['namespace']; + $namespaceName = isset($addon['addon_info']['namespace']) ? $addon['addon_info']['namespace'] : ''; //$addon['namespace']; // 如果应用已经安装 if (in_array($namespaceName, $this->installedNameSpaceArr)) { continue; } $filePath = Yii::$service->extension->remoteService->getExtensionZipFilePath($packageName, $folderName); if (file_exists($filePath) && is_executable($filePath)) { - + $arr[] = $namespaceName; } } - + return $arr; } - + public function getPagerForm() { $str = ''; @@ -147,7 +143,7 @@ public function getToolBar($numCount, $pageNum, $numPerPage) '; } - + // namespace public function initInstalledExtensions() { @@ -169,7 +165,7 @@ public function initInstalledExtensions() if (Yii::$service->extension->isTypeLocalCreated($one['type'])) { $localCreatedArr[] = $namespace; } - + $versionArr[$namespace] = $one['installed_version']; } } @@ -177,23 +173,23 @@ public function initInstalledExtensions() $this->versionArr = $versionArr; $this->installedNameSpaceArr = $installedArr; $this->localCreatedArr = $localCreatedArr; - + } - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + } diff --git a/app/appadmin/modules/System/controllers/ExtensioninstalledController.php b/app/appadmin/modules/System/controllers/ExtensioninstalledController.php index 84fdab2ac..397f6b080 100644 --- a/app/appadmin/modules/System/controllers/ExtensioninstalledController.php +++ b/app/appadmin/modules/System/controllers/ExtensioninstalledController.php @@ -10,7 +10,6 @@ namespace fecshop\app\appadmin\modules\System\controllers; use fecshop\app\appadmin\modules\System\SystemController; -use Yii; /** * @author Terry Zhao <2358269014@qq.com> @@ -33,27 +32,27 @@ public function actionManageredit() return $this->render($this->action->id, $data); } - + public function actionManagerview() { $data = $this->getBlock()->getLastData(); return $this->render($this->action->id, $data); } - + public function actionManagerenable() { $data = $this->getBlock('manageredit')->extensionEnable(); } - + public function actionManagerdisable() { $data = $this->getBlock('manageredit')->extensionDisable(); } - - - - + + + + public function actionManagereditsave() { $data = $this->getBlock('manageredit')->save(); diff --git a/app/appadmin/theme/base/default/catalog/productattr/manageredit.php b/app/appadmin/theme/base/default/catalog/productattr/manageredit.php index 8ff3527e9..60e62ae96 100644 --- a/app/appadmin/theme/base/default/catalog/productattr/manageredit.php +++ b/app/appadmin/theme/base/default/catalog/productattr/manageredit.php @@ -6,10 +6,10 @@ * @copyright Copyright (c) 2016 FecShop Software LLC * @license http://www.fecshop.com/license/ */ -use yii\helpers\Html; + use fec\helpers\CRequest; -use fecadmin\models\AdminRole; -/** + +/** * @author Terry Zhao <2358269014@qq.com> * @since 1.0 */ @@ -26,7 +26,7 @@ function thissubmit(thiss){ var fill = true; items_input = ""; - + var display_type_select = $(".display_type_select").val(); if (display_type_select == 'select' || display_type_select == 'editSelect') { $(".pageContent .items table tbody tr").each(function(){ @@ -51,9 +51,9 @@ function thissubmit(thiss){ -
+
- +
@@ -62,28 +62,28 @@ function thissubmit(thiss){
- +
page->translate->__('Attr Display') ?>

- + - +

@@ -111,12 +111,12 @@ function thissubmit(thiss){ - + page->translate->__('Add Items') ?> - - - + + + -
+
- +
@@ -54,10 +54,10 @@ function thissubmit(thiss){
- + - +
@@ -65,10 +65,10 @@ function thissubmit(thiss){ - + - + @@ -79,7 +79,7 @@ function thissubmit(thiss){ - - + - + - + @@ -126,7 +126,7 @@ function thissubmit(thiss){ - + \ No newline at end of file + diff --git a/app/appadmin/theme/base/default/catalog/productbrand/manageredit.php b/app/appadmin/theme/base/default/catalog/productbrand/manageredit.php index 41f3eb157..247f6cc65 100644 --- a/app/appadmin/theme/base/default/catalog/productbrand/manageredit.php +++ b/app/appadmin/theme/base/default/catalog/productbrand/manageredit.php @@ -6,12 +6,11 @@ * @copyright Copyright (c) 2016 FecShop Software LLC * @license http://www.fecshop.com/license/ */ -use yii\helpers\Html; + use fec\helpers\CRequest; -use fecadmin\models\AdminRole; use fec\helpers\CUrl; -/** +/** * @author Terry Zhao <2358269014@qq.com> * @since 1.0 */ @@ -22,9 +21,9 @@ .dialog .pageContent .pageFormContent{background:none;} -
+
- +
@@ -61,7 +60,7 @@
-
+
+ diff --git a/app/appadmin/theme/base/default/catalog/productbrandcategory/manageredit.php b/app/appadmin/theme/base/default/catalog/productbrandcategory/manageredit.php index 6cd12cb72..e6246d67d 100644 --- a/app/appadmin/theme/base/default/catalog/productbrandcategory/manageredit.php +++ b/app/appadmin/theme/base/default/catalog/productbrandcategory/manageredit.php @@ -6,10 +6,10 @@ * @copyright Copyright (c) 2016 FecShop Software LLC * @license http://www.fecshop.com/license/ */ -use yii\helpers\Html; + use fec\helpers\CRequest; -use fecadmin\models\AdminRole; -/** + +/** * @author Terry Zhao <2358269014@qq.com> * @since 1.0 */ @@ -20,9 +20,9 @@ .dialog .pageContent .pageFormContent{background:none;} -
+
- +
@@ -32,7 +32,7 @@
- +
@@ -47,4 +47,4 @@
-
+ diff --git a/app/appadmin/theme/base/default/catalog/productinfo/managerbatchedit.php b/app/appadmin/theme/base/default/catalog/productinfo/managerbatchedit.php index b24500a0c..853c83132 100644 --- a/app/appadmin/theme/base/default/catalog/productinfo/managerbatchedit.php +++ b/app/appadmin/theme/base/default/catalog/productinfo/managerbatchedit.php @@ -6,11 +6,11 @@ * @copyright Copyright (c) 2016 FecShop Software LLC * @license http://www.fecshop.com/license/ */ -use yii\helpers\Html; + use fec\helpers\CRequest; use fec\helpers\CUrl; -use fecadmin\models\AdminRole; -/** + +/** * @author Terry Zhao <2358269014@qq.com> * @since 1.0 */ @@ -83,12 +83,12 @@ }); -function getCategoryData(product_id,i){ +function getCategoryData(product_id,i){ $.ajax({ url:'$product_id]); ?>', async:false, timeout: 80000, - dataType: 'json', + dataType: 'json', type:'get', data:{ 'product_id':product_id, @@ -136,7 +136,7 @@ function thissubmit(thiss){ image_gallery += gallery_image_image+'#####'+gallery_image_label+'#####'+gallery_image_sort_order +'#####'+gallery_image_is_thumbnails +'#####'+gallery_image_is_detail+'|||||'; } }); - + $(".tabsContent .image_gallery").val(image_gallery); //custom_option //i = 0; @@ -145,7 +145,7 @@ function thissubmit(thiss){ // option_header = new Object(); // $(this).find("td").each(function(){ // rel = $(this).attr("rel"); - // + // // if(rel != 'image'){ // if(rel){ // option_header[rel] = $(this).attr('val'); @@ -154,31 +154,31 @@ function thissubmit(thiss){ // rel = $(this).find("img").attr("rel"); // option_header['image'] = rel; // } - // + // // }); // custom_option[i] = option_header; // i++; //}); - // + // //custom_option = JSON.stringify(custom_option); //alert(custom_option); //jQuery(".custom_option_value").val(custom_option); - + cate_str = ""; jQuery(".category_tree div.ckbox.checked").each(function(){ cate_id = jQuery(this).find("input").val(); cate_str += cate_id+","; }); - - - + + + jQuery(".category_tree div.ckbox.indeterminate").each(function(){ cate_id = jQuery(this).find("input").val(); cate_str += cate_id+","; }); - + jQuery(".inputcategory").val(cate_str); - + tier_price_str = ""; $(".tier_price table tbody tr").each(function(){ tier_qty = $(this).find(".tier_qty").val(); @@ -187,7 +187,7 @@ function thissubmit(thiss){ tier_price_str += tier_qty+'##'+tier_price+"||"; } }); - + spuStr = ''; isSkuPriceQtyEmpty = false; $(".sell-sku-body-table tr ").each(function(){ @@ -212,10 +212,10 @@ function thissubmit(thiss){ spuStr += skuStr + '***'; } else { isSkuPriceQtyEmpty = true; - + } } - + }); if (isSkuPriceQtyEmpty) { alert("sku,价格,库存不能为空"); @@ -233,9 +233,9 @@ function thissubmit(thiss){ } -
- +
page->translate->__('Product attribute group switching: Please switch the product attribute group before editing') ?>
@@ -307,12 +307,12 @@ function thissubmit(thiss){
- - + + +
Sort Order属性名称 属性类型状态 数据类型 图片显示
name="ids" value="" type="checkbox"> page->translate->__($attr['attr_type']); ?>page->translate->__('Enable') : Yii::$service->page->translate->__('Disable') ?> page->translate->__('Yes') : Yii::$service->page->translate->__('No') ?> page->translate->__('Yes') : Yii::$service->page->translate->__('No') ?>
+ page->translate->__('Add Tier Price') ?> - -
@@ -343,14 +343,14 @@ function thissubmit(thiss){
- +
- +
@@ -362,7 +362,7 @@ function thissubmit(thiss){ //jQuery(".delete_img").click(function(){ // jQuery //}); - + //响应文件添加成功事件 $("#inputfile").change(function(){ //创建FormData对象 @@ -377,7 +377,7 @@ function thissubmit(thiss){ //alert(thisindex); var data = new FormData(); data.append('thisindex', thisindex); - + //为FormData对象添加数据 $.each($('#inputfile')[0].files, function(i, file) { data.append('upload_file'+i, file); @@ -390,7 +390,7 @@ function thissubmit(thiss){ type:'POST', data:data, async:false, - dataType: 'json', + dataType: 'json', timeout: 80000, cache: false, contentType: false, //不可缺参数 @@ -420,11 +420,11 @@ function thissubmit(thiss){
@@ -442,7 +442,7 @@ function thissubmit(thiss){
- + page->translate->__('Add') ?> @@ -496,10 +496,10 @@ function thissubmit(thiss){ htmlStr += ''; i = 0; hStr = ''; - htmlStr += getTableStr(attrArr, i, hStr); + htmlStr += getTableStr(attrArr, i, hStr); $(".sell-sku-body-table tbody").html(htmlStr); }); - + function getTableStr(attrArr, i, hStr) { var attrObj = attrArr[i]; var htmlStr = ''; @@ -512,13 +512,13 @@ function getTableStr(attrArr, i, hStr) { ii = i + 1; if ( ii >= attrArr.length) { if (j > 0) { - reallyDo = 'sell-sku-cell-text'; + reallyDo = 'sell-sku-cell-text'; replaceWith = "sell-sku-cell-text hide"; shStr = shStr.replace(new RegExp(reallyDo, 'g'), replaceWith); } } else if(ii != 1){ if (j > 0) { - reallyDo = 'sell-sku-cell-text'; + reallyDo = 'sell-sku-cell-text'; replaceWith = "sell-sku-cell-text hide"; shStr = shStr.replace(new RegExp(reallyDo, 'g'), replaceWith); } @@ -560,10 +560,10 @@ function getTableStr(attrArr, i, hStr) { htmlStr += ''; } } - + return htmlStr; } - + $(".dialog").on("click",".add_spu_attr",function(){ var rel = $(this).attr('rel'); var str1 = ".spu_attr_input_" + rel; @@ -588,9 +588,9 @@ function getTableStr(attrArr, i, hStr) { $(str2).append(appendStr); } } - + }); - + }); @@ -603,16 +603,16 @@ function getTableStr(attrArr, i, hStr) { - +
-
+
- +
- +
@@ -629,7 +629,7 @@ function getTableStr(attrArr, i, hStr) {
- + -
+
- +
- + - +
page->translate->__('Edit Info') ?>
- +

- +

- + - +

- +

- +

- +
- +
  • - +
-
+
diff --git a/app/appadmin/theme/base/default/cms/article/manageredit.php b/app/appadmin/theme/base/default/cms/article/manageredit.php index b7b073245..ed5c6f458 100644 --- a/app/appadmin/theme/base/default/cms/article/manageredit.php +++ b/app/appadmin/theme/base/default/cms/article/manageredit.php @@ -6,10 +6,10 @@ * @copyright Copyright (c) 2016 FecShop Software LLC * @license http://www.fecshop.com/license/ */ -use yii\helpers\Html; + use fec\helpers\CRequest; -use fecadmin\models\AdminRole; -/** + +/** * @author Terry Zhao <2358269014@qq.com> * @since 1.0 */ @@ -20,9 +20,9 @@ .dialog .pageContent .pageFormContent{background:none;} -
+
- +
@@ -46,4 +46,4 @@
-
+
diff --git a/app/appadmin/theme/base/default/cms/staticblock/manageredit.php b/app/appadmin/theme/base/default/cms/staticblock/manageredit.php index 94bd5261c..65b260b99 100644 --- a/app/appadmin/theme/base/default/cms/staticblock/manageredit.php +++ b/app/appadmin/theme/base/default/cms/staticblock/manageredit.php @@ -6,10 +6,10 @@ * @copyright Copyright (c) 2016 FecShop Software LLC * @license http://www.fecshop.com/license/ */ -use yii\helpers\Html; + use fec\helpers\CRequest; -use fecadmin\models\AdminRole; -/** + +/** * @author Terry Zhao <2358269014@qq.com> * @since 1.0 */ @@ -20,9 +20,9 @@ .dialog .pageContent .pageFormContent{background:none;} -
+
- +
@@ -36,12 +36,12 @@
page->translate->__('Help') ?>
- {{homeUrl}}: page->translate->__('Refer to home page url') ?>
+ {{homeUrl}}: page->translate->__('Refer to home page url') ?>
{{imgBaseUrl}}: page->translate->__('Refer to image base url') ?>
- +
    @@ -54,5 +54,5 @@
-
+
diff --git a/app/appadmin/theme/base/default/config/appfrontaccount/manager.php b/app/appadmin/theme/base/default/config/appfrontaccount/manager.php index 824f2ee4b..7cb362997 100644 --- a/app/appadmin/theme/base/default/config/appfrontaccount/manager.php +++ b/app/appadmin/theme/base/default/config/appfrontaccount/manager.php @@ -6,10 +6,10 @@ * @copyright Copyright (c) 2016 FecMall Software LLC * @license http://www.fecmall.com/license */ -use yii\helpers\Html; + use fec\helpers\CRequest; -use fecadmin\models\AdminRole; -/** + +/** * @author Terry Zhao <2358269014@qq.com> * @since 1.0 */ @@ -20,13 +20,13 @@ .dialog .pageContent .pageFormContent{background:none;} -
+
- +
- + - +
page->translate->__('Appfront Account Config') ?>
@@ -36,7 +36,7 @@
- +
    @@ -49,7 +49,7 @@
-
+
-
+
- +
- + - +
page->translate->__('Appfront Base Config') ?>
@@ -38,7 +38,7 @@
- +
    @@ -51,7 +51,7 @@
-
+
-
+
- +
- + - +
page->translate->__('Appfront Cache Config') ?>
@@ -36,7 +36,7 @@
- +
    @@ -49,7 +49,7 @@
-
+
-
+
- +
- + - +
page->translate->__('Appfront Catalog Config') ?>
@@ -36,7 +36,7 @@
- +
    @@ -49,7 +49,7 @@
-
+
-
+
- +
- + - +
page->translate->__('Appfront Home Config') ?>
@@ -36,7 +36,7 @@
- +
    @@ -49,7 +49,7 @@
-
+
-
+
- +
- + - +
page->translate->__('Appfront Payment Config') ?>
@@ -36,7 +36,7 @@
- +
    @@ -49,7 +49,7 @@
-
+
-
+
- +
@@ -36,40 +36,40 @@
page->translate->__('Example') ?>

- page->translate->__('Store Key') ?>: + page->translate->__('Store Key') ?>: fecshop.appfront.fancyecommerce.com,fecshop.appfront.fancyecommerce.com/fr

page->translate->__('Language Name') ?>: Example: English, Français,中文

page->translate->__('Local Theme Dir') ?>: Example: @appfront/theme/terry/theme01

page->translate->__('Third Theme Dir') ?>: Example: @mmm/theme/terry/theme01,@mmm/theme/terry/theme02

page->translate->__('Mobile Enable') ?>: 移动设备访问pc端(appfront),是否开启跳转?到手机入口 - +

page->translate->__('Mobile Condition') ?>: Example: phone,tablet。 phone 代表手机,tablet代表平板,当都填写,代表手机和平板都会进行跳转

page->translate->__('Mobile Redirect Domain') ?>: Example: demo.fancyecommerce.com . // 如果是移动设备访问进行域名跳转,这里填写的值为store key

page->translate->__('Mobile Https Enable') ?>: 跳转到的网址,是否是https

page->translate->__('Mobile Type') ?>: 填写值选择:[apphtml5, appserver],如果是 apphtml5 , 则表示跳转到html5入口,如果是appserver,则表示跳转到vue这种appserver对应的入口

page->translate->__('Https Enable') ?>: 当前的store,是否是https

page->translate->__('Sitemap Dir') ?>: sitemap文件地址,例子:@appfront/web/sitemap.xml -

- - - - - - - - - - - - - - - +

+ + + + + + + + + + + + + + +
- +
    @@ -82,5 +82,5 @@
-
+
diff --git a/app/appadmin/theme/base/default/config/apphtml5account/manager.php b/app/appadmin/theme/base/default/config/apphtml5account/manager.php index fc1c3e6d9..e57ea7a89 100644 --- a/app/appadmin/theme/base/default/config/apphtml5account/manager.php +++ b/app/appadmin/theme/base/default/config/apphtml5account/manager.php @@ -6,10 +6,10 @@ * @copyright Copyright (c) 2016 FecMall Software LLC * @license http://www.fecmall.com/license */ -use yii\helpers\Html; + use fec\helpers\CRequest; -use fecadmin\models\AdminRole; -/** + +/** * @author Terry Zhao <2358269014@qq.com> * @since 1.0 */ @@ -20,13 +20,13 @@ .dialog .pageContent .pageFormContent{background:none;} -
+
- +
- + - +
page->translate->__('Apphtml5 Account Config') ?>
@@ -36,7 +36,7 @@
- +
    @@ -49,7 +49,7 @@
-
+
-
+
- +
- + - +
page->translate->__('Apphtml5 Base Config') ?>
@@ -38,7 +38,7 @@
- +
    @@ -51,7 +51,7 @@
-
+
-
+
- +
- + - +
page->translate->__('Apphtml5 Cache Config') ?>
@@ -36,7 +36,7 @@
- +
    @@ -49,7 +49,7 @@
-
+
-
+
- +
- + - +
page->translate->__('Apphtml5 Catalog Config') ?>
@@ -36,7 +36,7 @@
- +
    @@ -49,7 +49,7 @@
-
+
-
+
- +
- + - +
page->translate->__('Apphtml5 Home Config') ?>
@@ -36,7 +36,7 @@
- +
    @@ -49,7 +49,7 @@
-
+
-
+
- +
- + - +
page->translate->__('Apphtml5 Payment Config') ?>
@@ -36,7 +36,7 @@
- +
    @@ -49,7 +49,7 @@
-
+
-
+
- +
@@ -36,7 +36,7 @@
page->translate->__('Example') ?>

- page->translate->__('Store Key') ?>: + page->translate->__('Store Key') ?>: Example:fecshop.appfront.fancyecommerce.com,fecshop.appfront.fancyecommerce.com/fr

page->translate->__('Language Name') ?>: Example: English, Français,中文 @@ -44,26 +44,26 @@

page->translate->__('Third Theme Dir') ?>: Example: @mmm/theme/terry/theme01,@mmm/theme/terry/theme02。 多个用逗号隔开

page->translate->__('Https Enable') ?>: 当前的store,是否是https

page->translate->__('Sitemap Dir') ?>: sitemap文件地址,例子:@appfront/web/sitemap.xml -

- - - - - - - - - - - - - - - +

+ + + + + + + + + + + + + + +
- +
    @@ -76,5 +76,5 @@
-
+
diff --git a/app/appadmin/theme/base/default/config/appserveraccount/manager.php b/app/appadmin/theme/base/default/config/appserveraccount/manager.php index 1bd226fca..299f11d2a 100644 --- a/app/appadmin/theme/base/default/config/appserveraccount/manager.php +++ b/app/appadmin/theme/base/default/config/appserveraccount/manager.php @@ -6,10 +6,10 @@ * @copyright Copyright (c) 2016 FecMall Software LLC * @license http://www.fecmall.com/license */ -use yii\helpers\Html; + use fec\helpers\CRequest; -use fecadmin\models\AdminRole; -/** + +/** * @author Terry Zhao <2358269014@qq.com> * @since 1.0 */ @@ -20,13 +20,13 @@ .dialog .pageContent .pageFormContent{background:none;} -
+
- +
- + - +
page->translate->__('Appserver Account Config') ?>
@@ -36,7 +36,7 @@
- +
    @@ -49,7 +49,7 @@
-
+
-
+
- +
- + - +
page->translate->__('Appserver Base Config') ?>
@@ -36,7 +36,7 @@
- +
    @@ -49,7 +49,7 @@
-
+
-
+
- +
- + - +
page->translate->__('Appserver Cache Config') ?>
@@ -36,7 +36,7 @@
- +
    @@ -49,7 +49,7 @@
-
+
-
+
- +
- + - +
page->translate->__('Appserver Catalog Config') ?>
@@ -36,7 +36,7 @@
- +
    @@ -49,7 +49,7 @@
-
+
-
+
- +
- + - +
page->translate->__('Appserver Home Config') ?>
@@ -36,7 +36,7 @@
- +
    @@ -49,7 +49,7 @@
-
+
-
+
- +
- + - +
page->translate->__('Appserver Payment Config') ?>
@@ -36,7 +36,7 @@
- +
    @@ -49,7 +49,7 @@
-
+
-
+
- +
- + - +
page->translate->__('Appserver Store Config') ?>
@@ -36,7 +36,7 @@
- +
    @@ -49,7 +49,7 @@
-
+
-
+
- +
- + - +
page->translate->__('Base Config') ?>
@@ -36,7 +36,7 @@
- +
    @@ -49,7 +49,7 @@
-
+
diff --git a/app/appadmin/theme/base/default/config/cart/manager.php b/app/appadmin/theme/base/default/config/cart/manager.php index 69d7052b9..2f07b6db1 100644 --- a/app/appadmin/theme/base/default/config/cart/manager.php +++ b/app/appadmin/theme/base/default/config/cart/manager.php @@ -6,10 +6,10 @@ * @copyright Copyright (c) 2016 FecMall Software LLC * @license http://www.fecmall.com/license */ -use yii\helpers\Html; + use fec\helpers\CRequest; -use fecadmin\models\AdminRole; -/** + +/** * @author Terry Zhao <2358269014@qq.com> * @since 1.0 */ @@ -20,13 +20,13 @@ .dialog .pageContent .pageFormContent{background:none;} -
+
- +
- + - +
page->translate->__('Cart Config') ?>
@@ -36,7 +36,7 @@
- +
    @@ -49,7 +49,7 @@
-
+
-
+
- +
- + - +
page->translate->__('Email Config') ?>
@@ -39,7 +39,7 @@
- +
    @@ -52,7 +52,7 @@
-
+
-
+
- +
- + - +
page->translate->__('Base Config') ?>
@@ -36,7 +36,7 @@
- +
    @@ -49,7 +49,7 @@
-
+
diff --git a/app/appadmin/theme/base/default/config/mutillang/manager.php b/app/appadmin/theme/base/default/config/mutillang/manager.php index 82eef47d8..f31e01b9a 100644 --- a/app/appadmin/theme/base/default/config/mutillang/manager.php +++ b/app/appadmin/theme/base/default/config/mutillang/manager.php @@ -6,10 +6,10 @@ * @copyright Copyright (c) 2016 FecMall Software LLC * @license http://www.fecmall.com/license */ -use yii\helpers\Html; + use fec\helpers\CRequest; -use fecadmin\models\AdminRole; -/** + +/** * @author Terry Zhao <2358269014@qq.com> * @since 1.0 */ @@ -24,7 +24,7 @@ function thissubmit(thiss){ - + var fill = true; langs_input = ""; $(".langs table tbody tr").each(function(){ @@ -47,11 +47,11 @@ function thissubmit(thiss){ } -
+
- +
- +
@@ -79,16 +79,16 @@ function thissubmit(thiss){ @@ -100,12 +100,12 @@ function thissubmit(thiss){ - + page->translate->__('Add Language') ?> - - - + + +
- +
-

+

1.此处为语言编辑部分,可以添加或者编辑语言,并为每个语言指定相应的搜索引擎, 您可以在搜索引擎配置部分,开启相应搜索引擎。 -

-

+

+

2.保存后,在Store设置中,为Store指定相应的语言,因为语言和搜索引擎是绑定的,因此 在指定语言的同时,也指定了相应的搜索引擎 -

-

+

+

3.更改设置后,您需要跑一下同步数据的脚本 ./vendor/fancyecommerce/fecshop/shell/search/fullSearchSync.sh -

-

+

+

4.如果是xunsearch,里面有一些其他的历史数据,您可以通过脚本 ./vendor/fancyecommerce/fecshop/shell/search/deleteXunSearchAllData.sh 来清空xunsearch里面的数据。 -

-

+

+

5.如果您没有安装mongodb和xunsearch,那么您只能使用mysql搜索,mysql的搜索使用的是like的模糊匹配。

- +
- +
    @@ -164,9 +164,9 @@ function thissubmit(thiss){
- - -
+ + +
diff --git a/app/appadmin/theme/base/default/config/order/manager.php b/app/appadmin/theme/base/default/config/order/manager.php index 26702afa0..e2879b557 100644 --- a/app/appadmin/theme/base/default/config/order/manager.php +++ b/app/appadmin/theme/base/default/config/order/manager.php @@ -6,10 +6,10 @@ * @copyright Copyright (c) 2016 FecMall Software LLC * @license http://www.fecmall.com/license */ -use yii\helpers\Html; + use fec\helpers\CRequest; -use fecadmin\models\AdminRole; -/** + +/** * @author Terry Zhao <2358269014@qq.com> * @since 1.0 */ @@ -20,13 +20,13 @@ .dialog .pageContent .pageFormContent{background:none;} -
+
- +
- + - +
page->translate->__('Order Config') ?>
@@ -36,7 +36,7 @@
- +
    @@ -49,7 +49,7 @@
-
+
-
+
- +
- + - +
page->translate->__('Payment Alipay Config') ?>
@@ -36,7 +36,7 @@
- +
    @@ -49,7 +49,7 @@
-
+
-
+
- +
- + - +
page->translate->__('Payment Paypal Config') ?>
@@ -36,7 +36,7 @@
- +
    @@ -49,7 +49,7 @@
-
+
-
+
- +
- + - +
page->translate->__('Payment Wxpay Config') ?>
@@ -36,7 +36,7 @@
- +
    @@ -49,7 +49,7 @@
-
+
-
+
- +
- + - +
page->translate->__('Appfront Base Config') ?>
@@ -36,7 +36,7 @@
- +
    @@ -49,7 +49,7 @@
-
+
-
+
- +
- + - +
page->translate->__('Search Engine Config') ?>
@@ -36,7 +36,7 @@
- +
    @@ -49,7 +49,7 @@
-
+
-
+
- +
- + - +
page->translate->__('Service Databse Config') ?>
@@ -36,7 +36,7 @@
- +
    @@ -49,7 +49,7 @@
-
+
-
+
- +
- + - +
page->translate->__('Edit Info') ?>
@@ -36,7 +36,7 @@
- +
    @@ -49,5 +49,5 @@
-
+
diff --git a/app/appadmin/theme/base/default/customer/contacts/manageredit.php b/app/appadmin/theme/base/default/customer/contacts/manageredit.php index 175034e08..2c7b9eabf 100644 --- a/app/appadmin/theme/base/default/customer/contacts/manageredit.php +++ b/app/appadmin/theme/base/default/customer/contacts/manageredit.php @@ -6,10 +6,10 @@ * @copyright Copyright (c) 2016 FecShop Software LLC * @license http://www.fecshop.com/license/ */ -use yii\helpers\Html; + use fec\helpers\CRequest; -use fecadmin\models\AdminRole; -/** + +/** * @author Terry Zhao <2358269014@qq.com> * @since 1.0 */ @@ -20,13 +20,13 @@ .dialog .pageContent .pageFormContent{background:none;} -
+
- +
- + - +
page->translate->__('Edit Info') ?>
@@ -36,15 +36,15 @@
- +
    - +
-
+
diff --git a/app/appadmin/theme/base/default/fecadmin/account/manageredit.php b/app/appadmin/theme/base/default/fecadmin/account/manageredit.php index 15a10eb34..2505db70a 100644 --- a/app/appadmin/theme/base/default/fecadmin/account/manageredit.php +++ b/app/appadmin/theme/base/default/fecadmin/account/manageredit.php @@ -6,7 +6,7 @@ * @copyright Copyright (c) 2016 FecShop Software LLC * @license http://www.fecshop.com/license/ */ -use yii\helpers\Html; + use fec\helpers\CRequest; use fecadmin\models\AdminRole; ?> @@ -16,27 +16,27 @@ .dialog .pageContent .pageFormContent{background:none;} -
+
- +
- + - +
page->translate->__('Edit Info'); ?>
- +
page->translate->__('Role Info'); ?> - +
- +
- $label){ $checked = ''; @@ -52,22 +52,22 @@ + ?>
- +
  • - +
-
+
diff --git a/app/appadmin/theme/base/default/fecadmin/config/manageredit.php b/app/appadmin/theme/base/default/fecadmin/config/manageredit.php index 263e15606..cacb5f02c 100644 --- a/app/appadmin/theme/base/default/fecadmin/config/manageredit.php +++ b/app/appadmin/theme/base/default/fecadmin/config/manageredit.php @@ -6,20 +6,20 @@ * @copyright Copyright (c) 2016 FecShop Software LLC * @license http://www.fecshop.com/license/ */ -use yii\helpers\Html; + use fec\helpers\CRequest; ?> -
+
- +
- + - +
page->translate->__('Edit Info') ?>
@@ -27,17 +27,17 @@
- +
  • - +
-
+
diff --git a/app/appadmin/theme/base/default/fecadmin/resource/manageredit.php b/app/appadmin/theme/base/default/fecadmin/resource/manageredit.php index 093eaad14..fc56f06af 100644 --- a/app/appadmin/theme/base/default/fecadmin/resource/manageredit.php +++ b/app/appadmin/theme/base/default/fecadmin/resource/manageredit.php @@ -6,9 +6,9 @@ * @copyright Copyright (c) 2016 FecShop Software LLC * @license http://www.fecshop.com/license/ */ -use yii\helpers\Html; + use fec\helpers\CRequest; -use fecadmin\models\AdminRole; + /** * @author Terry Zhao <2358269014@qq.com> * @since 1.0 diff --git a/app/appadmin/theme/base/default/fecadmin/role/manageredit.php b/app/appadmin/theme/base/default/fecadmin/role/manageredit.php index 6cfe88c7e..e723bd345 100644 --- a/app/appadmin/theme/base/default/fecadmin/role/manageredit.php +++ b/app/appadmin/theme/base/default/fecadmin/role/manageredit.php @@ -6,8 +6,7 @@ * @copyright Copyright (c) 2016 FecShop Software LLC * @license http://www.fecshop.com/license/ */ -use yii\helpers\Html; -use yii\widgets\ActiveForm; + use backend\models\core\helper\Producthelper; use backend\models\core\helper\Base; use backend\models\core\Url; @@ -101,4 +100,4 @@ function thissubmit(thiss){
-
\ No newline at end of file +
diff --git a/app/appadmin/theme/base/default/layouts/dashboard.php b/app/appadmin/theme/base/default/layouts/dashboard.php index 94c418067..7811c046f 100644 --- a/app/appadmin/theme/base/default/layouts/dashboard.php +++ b/app/appadmin/theme/base/default/layouts/dashboard.php @@ -11,13 +11,10 @@ use yii\helpers\Html; use yii\bootstrap\Nav; use yii\bootstrap\NavBar; -use yii\widgets\Breadcrumbs; use fecadmin\myassets\AppAsset; use fecadmin\myassets\AppZhAsset; use common\widgets\Alert; -use fec\helpers\CUrl; use fec\helpers\CRequest; -use fecadmin\views\layouts\Head; $currentLangCode = Yii::$service->admin->getCurrentLangCode(); if ($currentLangCode == 'zh') { @@ -42,18 +39,18 @@ 'options' => [ 'position' => \yii\web\View::POS_END, //POS_HEAD, ], - + ], [ 'js' =>[ 'js/echarts.min.js', - + ], // js 放到尾部 'options' => [ 'position' => \yii\web\View::POS_HEAD, //POS_HEAD, ], - + ], # js config 2 //[ @@ -84,7 +81,7 @@ ], ]; \Yii::$service->page->asset->jsOptions = \yii\helpers\ArrayHelper::merge($jsOptions, \Yii::$service->page->asset->jsOptions); -\Yii::$service->page->asset->cssOptions = \yii\helpers\ArrayHelper::merge($cssOptions, \Yii::$service->page->asset->cssOptions); +\Yii::$service->page->asset->cssOptions = \yii\helpers\ArrayHelper::merge($cssOptions, \Yii::$service->page->asset->cssOptions); \Yii::$service->page->asset->register($this); $logoPath = $this->assetManager->publish('@fecshop/app/appadmin/theme/base/default/assets/images/blue_logo.png'); ?> @@ -98,9 +95,9 @@ <?= $this->title ? Html::encode($this->title) : Yii::$service->page->translate->__('Fecmall Admin Manager System') ?> - + head() ?> - + beginBody() ?>
- +
- +
page->translate->__('Hello'); ?>: @@ -176,7 +173,7 @@ page->translate->__('Logout'); ?>
- + @@ -237,8 +234,8 @@
-
- +
+
@@ -292,10 +289,10 @@
-
- +
+ - + order->getPreMonthOrder($day); ?>
@@ -304,7 +301,7 @@ helper->echart->getLine($orderAmount, true); ?>

- +
page->translate->__('Trends in the number of orders in the last month'); ?> @@ -318,7 +315,7 @@
customer->getPreMonthCustomer($day); ?> helper->echart->getLine($customerRegisterCount, false); ?> -
+







@@ -339,7 +336,7 @@
endBody() ?> - - + }); + }); + + + diff --git a/app/appadmin/theme/base/default/layouts/login.php b/app/appadmin/theme/base/default/layouts/login.php index 2d1c88241..fbbb06018 100644 --- a/app/appadmin/theme/base/default/layouts/login.php +++ b/app/appadmin/theme/base/default/layouts/login.php @@ -9,10 +9,8 @@ use yii\helpers\Html; use yii\bootstrap\Nav; use yii\bootstrap\NavBar; -use yii\widgets\Breadcrumbs; -use fecadmin\myassets\LoginAsset; use common\widgets\Alert; -use fec\helpers\CUrl; + # css config $cssOptions = [ # css config 1. @@ -45,8 +43,8 @@ admin->getLangArr() ?> - +
+ endBody() ?> - - + }); + + }); + + endPage() ?> diff --git a/app/appadmin/theme/base/default/sales/coupon/manageredit.php b/app/appadmin/theme/base/default/sales/coupon/manageredit.php index 3491d11d2..af345e0d3 100644 --- a/app/appadmin/theme/base/default/sales/coupon/manageredit.php +++ b/app/appadmin/theme/base/default/sales/coupon/manageredit.php @@ -6,10 +6,10 @@ * @copyright Copyright (c) 2016 FecShop Software LLC * @license http://www.fecshop.com/license/ */ -use yii\helpers\Html; + use fec\helpers\CRequest; -use fecadmin\models\AdminRole; -/** + +/** * @author Terry Zhao <2358269014@qq.com> * @since 1.0 */ @@ -20,13 +20,13 @@ .dialog .pageContent .pageFormContent{background:none;} -
+
- +
- + - +
page->translate->__('Edit Info'); ?>
@@ -36,7 +36,7 @@
- +
  • @@ -48,5 +48,5 @@
-
+
diff --git a/app/appadmin/theme/base/default/sales/orderinfo/manageredit.php b/app/appadmin/theme/base/default/sales/orderinfo/manageredit.php index 96377c520..cc5d75bf1 100644 --- a/app/appadmin/theme/base/default/sales/orderinfo/manageredit.php +++ b/app/appadmin/theme/base/default/sales/orderinfo/manageredit.php @@ -6,11 +6,10 @@ * @copyright Copyright (c) 2016 FecShop Software LLC * @license http://www.fecshop.com/license/ */ -use yii\helpers\Html; + use fec\helpers\CRequest; -use fecadmin\models\AdminRole; use fecshop\app\appfront\helper\Format; -/** +/** * @author Terry Zhao <2358269014@qq.com> * @since 1.0 */ @@ -21,13 +20,13 @@ .dialog .pageContent .pageFormContent{background:none;} -
+
- +
- + - +
page->translate->__('Order Info') ?>
@@ -35,31 +34,31 @@

- +

- +

- +

- +

- - - + + +

@@ -74,7 +73,7 @@

- +
  • - +
  • -
    +
    diff --git a/app/appadmin/theme/base/default/system/adminurlkey/manager.php b/app/appadmin/theme/base/default/system/adminurlkey/manager.php index 181570cd8..4f1bb926f 100644 --- a/app/appadmin/theme/base/default/system/adminurlkey/manager.php +++ b/app/appadmin/theme/base/default/system/adminurlkey/manager.php @@ -6,10 +6,10 @@ * @copyright Copyright (c) 2016 FecShop Software LLC * @license http://www.fecshop.com/license/ */ -use yii\helpers\Html; + use fec\helpers\CRequest; -use fecadmin\models\AdminRole; -/** + +/** * @author Terry Zhao <2358269014@qq.com> * @since 1.0 */ @@ -20,9 +20,9 @@ -
    +
    - +
    - +
    • @@ -46,7 +46,7 @@
    -
    +
    @@ -125,21 +125,21 @@ var packageName = $(this).attr('packageName'); var addonName = $(this).attr('addonName'); var folderName = $(this).attr('folderName'); - + var url = "url->getUrl("system/extensionmarket/install"); ?>"; url += '?namespace=' + namespace; url += '&packageName=' + packageName; url += '&folderName=' + folderName; url += '&addonName=' + encodeURIComponent(addonName); - + $.ajax({ url: url, async: true, timeout: 800000, - dataType: 'json', + dataType: 'json', type: 'get', success:function(data, textStatus){ - + if(data.statusCode == 200){ //alert(data.statusCode); message = data.message; @@ -154,12 +154,12 @@ // }, error:function(){ - + } }); - + }); - + }); diff --git a/app/appadmin/theme/base/default/system/extensioninstalled/manageredit.php b/app/appadmin/theme/base/default/system/extensioninstalled/manageredit.php index 2786e5bcd..c5ac35aee 100644 --- a/app/appadmin/theme/base/default/system/extensioninstalled/manageredit.php +++ b/app/appadmin/theme/base/default/system/extensioninstalled/manageredit.php @@ -6,10 +6,10 @@ * @copyright Copyright (c) 2016 FecShop Software LLC * @license http://www.fecshop.com/license/ */ -use yii\helpers\Html; + use fec\helpers\CRequest; -use fecadmin\models\AdminRole; -/** + +/** * @author Terry Zhao <2358269014@qq.com> * @since 1.0 */ @@ -20,9 +20,9 @@ .dialog .pageContent .pageFormContent{background:none;} -
    +
    - +
    @@ -33,7 +33,7 @@
    - +
      @@ -47,7 +47,7 @@
    -
    +
    -
    +
    - +
    @@ -33,11 +33,11 @@
    - +
    - +
    -
    +