chengwl 5 år sedan
incheckning
9ae862052a
100 ändrade filer med 2213 tillägg och 0 borttagningar
  1. 3 0
      .bowerrc
  2. 52 0
      .gitignore
  3. 10 0
      LICENSE.md
  4. 187 0
      README.md
  5. 72 0
      Vagrantfile
  6. 2 0
      appadmin/.gitignore
  7. 2 0
      appadmin/config/.gitignore
  8. 6 0
      appadmin/config/YiiClassMap.php
  9. 10 0
      appadmin/config/YiiRewriteMap.php
  10. 1 0
      appadmin/config/bootstrap.php
  11. 40 0
      appadmin/config/fecshop_local.php
  12. 3 0
      appadmin/config/fecshop_local_modules/.gitignore
  13. 30 0
      appadmin/config/fecshop_local_modules/Fecadmin.php
  14. 40 0
      appadmin/config/fecshop_local_services/Admin.php
  15. 52 0
      appadmin/config/fecshop_local_services/FecshopLang.php
  16. 75 0
      appadmin/config/fecshop_local_services/Page.php
  17. 31 0
      appadmin/config/fecshop_third.php
  18. 62 0
      appadmin/config/main.php
  19. 12 0
      appadmin/config/params.php
  20. 1 0
      appadmin/languages/.gitignore
  21. 11 0
      appadmin/languages/de_DE/appadmin.php
  22. 11 0
      appadmin/languages/en_US/appadmin.php
  23. 11 0
      appadmin/languages/es_ES/appadmin.php
  24. 12 0
      appadmin/languages/fr_FR/appadmin.php
  25. 11 0
      appadmin/languages/it_IT/appadmin.php
  26. 11 0
      appadmin/languages/nl_NL/appadmin.php
  27. 11 0
      appadmin/languages/pt_PT/appadmin.php
  28. 11 0
      appadmin/languages/ru_RU/appadmin.php
  29. 85 0
      appadmin/languages/zh_CN/appadmin.php
  30. 1 0
      appadmin/local/local_components/.gitignore
  31. 1 0
      appadmin/local/local_events/.gitignore
  32. 1 0
      appadmin/local/local_interfaces/.gitignore
  33. 1 0
      appadmin/local/local_migrations/.gitignore
  34. 1 0
      appadmin/local/local_models/.gitignore
  35. 63 0
      appadmin/local/local_models/mongodb/Category.php
  36. 3 0
      appadmin/local/local_modules/.gitignore
  37. 1 0
      appadmin/local/local_services/.gitignore
  38. 1 0
      appadmin/local/local_yii/.gitignore
  39. 2 0
      appadmin/runtime/.gitignore
  40. 1 0
      appadmin/theme/local/theme01/.gitignore
  41. 1 0
      appadmin/theme/local/theme01/layouts/.gitignore
  42. BIN
      appadmin/uploads/product/product_1492501121_product.xlsx
  43. BIN
      appadmin/uploads/product/product_1492501160_product.xlsx
  44. 1 0
      appadmin/views/layouts/main_ajax.php
  45. 6 0
      appadmin/web/.gitignore
  46. 2 0
      appadmin/web/assets/.gitignore
  47. BIN
      appadmin/web/favicon.ico
  48. 3 0
      appadmin/web/skin/.gitignore
  49. 3 0
      appadmin/web/skin/default/.gitignore
  50. 3 0
      appadmin/web/skin/default/images/.gitignore
  51. BIN
      appadmin/web/skin/default/images/blue_logo.png
  52. 1 0
      appapi/.gitignore
  53. 2 0
      appapi/config/.gitignore
  54. 6 0
      appapi/config/YiiClassMap.php
  55. 10 0
      appapi/config/YiiRewriteMap.php
  56. 1 0
      appapi/config/bootstrap.php
  57. 38 0
      appapi/config/fecshop_local.php
  58. 1 0
      appapi/config/fecshop_local_modules/.gitignore
  59. 15 0
      appapi/config/fecshop_local_modules/V1.php
  60. 1 0
      appapi/config/fecshop_local_services/.gitignore
  61. 29 0
      appapi/config/fecshop_local_services/Session.php
  62. 31 0
      appapi/config/fecshop_third.php
  63. 67 0
      appapi/config/main.php
  64. 5 0
      appapi/config/params.php
  65. 1 0
      appapi/local/local_components/.gitignore
  66. 1 0
      appapi/local/local_events/.gitignore
  67. 1 0
      appapi/local/local_interfaces/.gitignore
  68. 1 0
      appapi/local/local_migrations/.gitignore
  69. 1 0
      appapi/local/local_models/.gitignore
  70. 1 0
      appapi/local/local_modules/.gitignore
  71. 28 0
      appapi/local/local_modules/V1/controllers/CustomerController.php
  72. 1 0
      appapi/local/local_services/.gitignore
  73. 1 0
      appapi/local/local_yii/.gitignore
  74. 2 0
      appapi/runtime/.gitignore
  75. 3 0
      appapi/web/.gitignore
  76. 2 0
      appapi/web/assets/.gitignore
  77. 1 0
      appfront/.gitignore
  78. 2 0
      appfront/components/.gitignore
  79. 2 0
      appfront/config/.gitignore
  80. 6 0
      appfront/config/YiiClassMap.php
  81. 15 0
      appfront/config/YiiRewriteMap.php
  82. 1 0
      appfront/config/bootstrap.php
  83. 40 0
      appfront/config/fecshop_local.php
  84. 1 0
      appfront/config/fecshop_local_modules/.gitignore
  85. 119 0
      appfront/config/fecshop_local_modules/Catalog.php
  86. 56 0
      appfront/config/fecshop_local_modules/Catalogsearch.php
  87. 41 0
      appfront/config/fecshop_local_modules/Cms.php
  88. 14 0
      appfront/config/fecshop_local_modules/Mytest.php
  89. 1 0
      appfront/config/fecshop_local_services/.gitignore
  90. 58 0
      appfront/config/fecshop_local_services/Cache.php
  91. 23 0
      appfront/config/fecshop_local_services/Event.php
  92. 45 0
      appfront/config/fecshop_local_services/FecshopLang.php
  93. 226 0
      appfront/config/fecshop_local_services/Page.php
  94. 32 0
      appfront/config/fecshop_local_services/Payment.php
  95. 16 0
      appfront/config/fecshop_local_services/Search.php
  96. 164 0
      appfront/config/fecshop_local_services/Store.php
  97. 14 0
      appfront/config/fecshop_local_services/Url.php
  98. 31 0
      appfront/config/fecshop_third.php
  99. 95 0
      appfront/config/main.php
  100. 0 0
      appfront/config/params.php

+ 3 - 0
.bowerrc

@@ -0,0 +1,3 @@
+{
+    "directory" : "vendor/bower"
+}

+ 52 - 0
.gitignore

@@ -0,0 +1,52 @@
+# doc file
+.a.updateBefore.md
+
+/feepackage
+
+recp.sh
+
+# yii console command
+/yii
+
+# phpstorm project files
+.idea
+
+# netbeans project files
+nbproject
+
+# zend studio for eclipse project files
+.buildpath
+.project
+.settings
+
+# windows thumbnail cache
+Thumbs.db
+
+# composer vendor dir
+/vendor
+
+/packages
+
+# composer itself is not needed
+composer.phar
+
+# Mac DS_Store Files
+.DS_Store
+
+# phpunit itself is not needed
+phpunit.phar
+# local phpunit config
+/phpunit.xml
+
+# vagrant runtime
+/.vagrant
+
+/backend
+/doc
+/frontend
+doc.sh
+cp.sh
+myreadme.txt
+
+composer.lock
+

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 10 - 0
LICENSE.md


+ 187 - 0
README.md

@@ -0,0 +1,187 @@
+<p>
+  <a href="http://fecshop.appfront.fancyecommerce.com/">
+    <img src="http://img.appfront.fancyecommerce.com/custom/logo.png">
+  </a>
+</p>
+<br/>
+
+
+
+
+[![Latest Stable Version](https://poser.pugx.org/fancyecommerce/fecshop/v/stable)](https://packagist.org/packages/fancyecommerce/fecshop) [![Total Downloads](https://poser.pugx.org/fancyecommerce/fecshop/downloads)](https://packagist.org/packages/fancyecommerce/fecshop) [![Latest Unstable Version](https://poser.pugx.org/fancyecommerce/fecshop/v/unstable)](https://packagist.org/packages/fancyecommerce/fecshop)
+
+
+
+
+项目状态:
+
+> 正式版本已经出来,后台(appadmin)和pc端(appfront),wap端(apphtml5)
+,vue端(appserver)已经完成,完成了一些基本的api。
+
+
+
+1、Fecshop介绍
+------------
+
+[Fecshop](http://www.fecshop.com) 全称为Fancy ECommerce Shop,是基于php Yii2框架之上开发的一款优秀的开源电商系统,
+Fecshop支持多语言,多货币,架构上支持pc,手机web,手机app,和erp对接等入口,您可以免费快速的定制和部署属于您的电商系统。
+
+详细参看地址:[Fecshop介绍](http://www.fecshop.com/doc/fecshop-guide/develop/cn-1.0/guide-fecshop-about-description.html)
+
+[Fecshop](http://www.fecshop.com) 官网:http://www.fecshop.com ,您可以在这里提交bug,问题咨询等等。
+
+[Fecshop](http://www.fecshop.com) 【已完成】PC Web Demo :http://fecshop.appfront.fancyecommerce.com/
+
+[Fecshop](http://www.fecshop.com) 【已完成】Mobile Web Demo(WAP):http://fecshop.apphtml5.fancyecommerce.com
+
+[Fecshop](http://www.fecshop.com) 【已完成】Mobile VUE Demo(Appserver,前后端彻底分离模式):http://demo.fancyecommerce.com/#/
+
+[Fecshop](http://www.fecshop.com) 【已完成】微信小程序(Appserver,前后端彻底分离模式):微信小程序搜索:Fecmall查看demo,或者扫下面的小程序码:
+
+![wx_xiaochengxu_fecmall](wx_xiaochengxu_fecmall.png)
+
+
+[Fecshop](http://www.fecshop.com) 后台演示地址:加QQ群,在群公告里面有后台演示地址,账号密码等信息
+
+[Fecshop](http://www.fecshop.com) QQ群:186604851 ,入群验证:fecshop
+
+
+作者, Terry QQ Email:2358269014@qq.com
+
+[Fecshop](http://www.fecshop.com) Github地址: https://github.com/fancyecommerce/yii2_fecshop
+
+开源协议:[Fecshop 授权协议](http://www.fecshop.com/license)
+
+2、Fecshop文档和视频
+------------
+
+**二开以及安装文档:** [Fecshop 安装开发文档](http://www.fecshop.com/doc/fecshop-guide/develop/cn-1.0/guide-README.html)【撰写完成】
+
+**使用帮助说明文档:** [Fecshop 使用帮助文档](http://www.fecshop.com/doc/fecshop-guide/instructions/cn-1.0/guide-README.html)【撰写完成】
+
+**安装开发帮助视频:** [Fecshop 安装开发视频](http://www.fecshop.com/doc/fecshop-guide/instructions/cn-1.0/guide-fecshop_video_install.html)【撰写完成】
+
+**前后端分离模式Api:** [Appserver VUE Api文档](http://www.fecshop.com/doc/fecshop-guide/develop/cn-1.0/guide-fecshop-server.html)【撰写完成】
+
+
+3、安装Fecshop
+------------
+
+> 请务必按照说明安装,自己来配置环境安装吧.
+
+从基础linux一步一步的配置的方式,详细参看文档: [Fecshop 安装](http://www.fecshop.com/doc/fecshop-guide/develop/cn-1.0/guide-fecshop-about-hand-install.html)
+
+
+4、Fecshop 配置:
+----------------
+
+配置详细参看:[Fecshop 配置](http://www.fecshop.com/doc/fecshop-guide/develop/cn-1.0/guide-fecshop-about-config.html)
+
+如果您使用vagrant box的安装方式,上面的这些步骤,在box都配置好了。
+
+5、架构特色
+-----------
+
+架构特色:参看详细介绍:[Fecshop 架构特色](http://www.fecshop.com/doc/fecshop-guide/develop/cn-1.0/guide-fecshop-about-framework.html)
+
+下面是简叙:
+
+Fecshop 全称为Fancy ECommerce Shop,是一款优秀的开源电商系统,遵循BSD-3-Clause协议(和Yii2框架一样的开源协议),
+目的是为了方便yii2用户快速的
+开发商城,Fecshop作为一款可以持续性发展的商城系统,
+在框架层面有以下特性:
+
+1. 由于商城系统的复杂性,原始的框架MVC结构,显的有点力不从心,Fecshop框架
+加入了Block层,
+Controller层只负责调度, Model只负责数据库映射,中间的处理逻辑由block来完成,View层
+负责显示,这样各司其职, 以免造成controller文件过于庞大。
+
+2. 加入独立功能块,有点类似Yii2的Widget,目的是为了让一些侧栏公用块
+可以通过配置的方式
+添加,同时,还可以具有设置缓存的功能,譬如分类侧栏的产品推荐,
+newsletter等独立显示块可能在很多
+页面用到,通过独立功能块可以配置方便的载入。
+
+3. 在Model层的上层加入服务层Services,这样,Controller,Block,View 层,在原则上
+不能直接调用model,必须通过Services层以及子Services层,然后Services访问各个
+model,组织数据,事务处理等操作,
+将数据结果返回给上层,这种设计可以方便以后业务
+发展后,进而根据业务特点进行重构,或者以后如果出现新技术,新方式,
+都重构成自己想要的样子,譬如,
+将某个底层由mysql换成mongodb,或者为了应付高并发读写并且多事务性的功能部分,
+进行分库分表的设计方式。
+
+4. [Fecshop](http://www.fecshop.com)多模板系统,[Fecshop](http://www.fecshop.com)设置了多个模板路径,各个模板路径下的文件被加载
+的优先级不同,其中,Fecshop的模板路径下的文件最全面,但是优先级最低,
+,第三方模板路径优先级其次,用户本地模板路径优先级最高,
+用户可以通过
+复制相应路径下的view或者js,css文件到本地模板路径,存在于高优先级
+模板路径的文件会被优先加载,这样用户可以通过多模板系统的原理进行模板的
+制作,同时,不影响[Fecshop](http://www.fecshop.com)模板的升级,如果[Fecshop](http://www.fecshop.com) view文件升级后被修改,
+那么用户可以比对本地模板文件与升级模板文件的代码的不同,
+复制更改的代码到本地模板路径
+即可。第三方的模板路径的优先级介于本地模板路径和Fecshop
+模板路径之间。
+
+5. 重写机制,[Fecshop](http://www.fecshop.com)的功能基本都可以被用户重写,包括servies层,Modules,
+Controller,Block,Views,View Layout,
+以及Js Css Img等,都可以被用户重写,其中 Js,Css,Img,Views,View Layout
+ 是通过多模板
+路径优先级来实现的,其他的是通过配置文件的覆盖更改来实现重写,这样,用户
+就可以很方便重构[Fecshop](http://www.fecshop.com)或者第三方的功能和模板。
+
+6. 升级最小化干扰,[Fecshop](http://www.fecshop.com)的核心文件是放到vendor/fancyecommerce/fecshop
+路径下面,和第三方扩展,用户二次开发路径完全隔离开,
+Fecshop可以通过composer进行核心功能的升级,用户只需要通过composer升级
+即可。
+
+7. 快速高效,Fecshop Servises遵循Yii2的懒加载方式,只初始化使用到的组件服务,
+缓存方面有整页缓存,block部分缓存,动态数据ajax加载等方式,让您的网站快速响应。
+
+8. [Fecshop](http://www.fecshop.com) 多入口模式,分为 appadmin(后台), appfront(PC前端),apphtml5(手机web),
+appserver(手机app服务),appapi(erp,或者其他接口对接),
+不同的业务,不同的设备,进入不同的入口,各个入口共用服务层services,
+但是modules部分独立,这样相互干扰最小,可以相互独立开发。
+
+9. 后台封装化,fec_admin扩展可以快速的实现增删改查类型的表单列表,
+方便用户快速的做增删改查。
+
+鉴于以上特点,您可以下载安装[Fecshop](http://www.fecshop.com),然后更改[Fecshop](http://www.fecshop.com)的模板和功能,扩展自己想要
+的功能,或者安装第三方开发好了的扩展或者模板,来快速的组建起来您的网站。
+
+6、捐赠
+-----------
+
+如果您认为这是一个不错的项目,对您有帮助,你可以通过下面的方式进行捐赠,
+这里感谢您对开源项目的支持。
+
+支付宝:
+
+![](http://www.fecshop.com/alipay.png)
+
+微信:
+
+![](http://www.fecshop.com/weixin.png)
+
+
+[捐赠历史](http://www.fecshop.com/donate):(捐助,建议写一下留言)
+
+| 捐赠人        | 金额      |  时间            |  方式           | 账户                  | 捐助者留言      |
+| --------------| ----------| -------------    | -----------     | ----------------------| ----------|
+| (*)         | ¥6.60    | 2017-12-21       |   微信          | -                     | -     |
+| 水哥          | ¥99.99   | 2017-12-20       |   支付宝        | dd_***@sohu.com       | 祝fecshop发展永久|
+| (*)         | ¥9.90    | 2017-12-11       |   微信          | -                     | 希望长久!|
+| (*)         | ¥100.00  | 2017-10-21       |   微信          | -                     | 希望你坚持下去成为更多人的榜样|
+| (*)         | ¥100.00  | 2017-09-27       |   微信          | -                     | -     |
+| (*)         | ¥2.00    | 2017-09-18       |   微信          | -                     | 赞一个|
+| (*)         | ¥1.00    | 2017-09-15       |   微信          | -                     | -     |
+
+
+
+
+
+
+
+
+
+

+ 72 - 0
Vagrantfile

@@ -0,0 +1,72 @@
+require 'yaml'
+require 'fileutils'
+
+domains = {
+  frontend: 'y2aa-frontend.dev',
+  backend:  'y2aa-backend.dev'
+}
+
+config = {
+  local: './vagrant/config/vagrant-local.yml',
+  example: './vagrant/config/vagrant-local.example.yml'
+}
+
+# copy config from example if local config not exists
+FileUtils.cp config[:example], config[:local] unless File.exist?(config[:local])
+# read config
+options = YAML.load_file config[:local]
+
+# check github token
+if options['github_token'].nil? || options['github_token'].to_s.length != 40
+  puts "You must place REAL GitHub token into configuration:\n/yii2-app-advancded/vagrant/config/vagrant-local.yml"
+  exit
+end
+
+# vagrant configurate
+Vagrant.configure(2) do |config|
+  # select the box
+  config.vm.box = 'ubuntu/trusty64'
+
+  # should we ask about box updates?
+  config.vm.box_check_update = options['box_check_update']
+
+  config.vm.provider 'virtualbox' do |vb|
+    # machine cpus count
+    vb.cpus = options['cpus']
+    # machine memory size
+    vb.memory = options['memory']
+    # machine name (for VirtualBox UI)
+    vb.name = options['machine_name']
+  end
+
+  # machine name (for vagrant console)
+  config.vm.define options['machine_name']
+
+  # machine name (for guest machine console)
+  config.vm.hostname = options['machine_name']
+
+  # network settings
+  config.vm.network 'private_network', ip: options['ip']
+
+  # sync: folder 'yii2-app-advanced' (host machine) -> folder '/app' (guest machine)
+  config.vm.synced_folder './', '/app', owner: 'vagrant', group: 'vagrant'
+
+  # disable folder '/vagrant' (guest machine)
+  config.vm.synced_folder '.', '/vagrant', disabled: true
+
+  # hosts settings (host machine)
+  config.vm.provision :hostmanager
+  config.hostmanager.enabled            = true
+  config.hostmanager.manage_host        = true
+  config.hostmanager.ignore_private_ip  = false
+  config.hostmanager.include_offline    = true
+  config.hostmanager.aliases            = domains.values
+
+  # provisioners
+  config.vm.provision 'shell', path: './vagrant/provision/once-as-root.sh', args: [options['timezone']]
+  config.vm.provision 'shell', path: './vagrant/provision/once-as-vagrant.sh', args: [options['github_token']], privileged: false
+  config.vm.provision 'shell', path: './vagrant/provision/always-as-root.sh', run: 'always'
+
+  # post-install message (vagrant console)
+  config.vm.post_up_message = "Frontend URL: http://#{domains[:frontend]}\nBackend URL: http://#{domains[:backend]}"
+end

+ 2 - 0
appadmin/.gitignore

@@ -0,0 +1,2 @@
+assets/
+controllers/

+ 2 - 0
appadmin/config/.gitignore

@@ -0,0 +1,2 @@
+main-local.php
+params-local.php

+ 6 - 0
appadmin/config/YiiClassMap.php

@@ -0,0 +1,6 @@
+<?php
+
+return [
+    //'fecshop\app\appfront\helper\test\My' => '@appfront/helper/My.php',
+    //"fecshop\models\mongodb\Category"=>"@appadmin/local/local_models/mongodb/Category.php",
+];

+ 10 - 0
appadmin/config/YiiRewriteMap.php

@@ -0,0 +1,10 @@
+<?php
+
+return [
+    /**
+     * \fecshop\models\mongodb\Category 为原来的类
+     * \appfront\local\local_models\mongodb\Category 为重写后的类
+     * 重写后的类可以集成原来的类。
+     */
+    //'\fecshop\models\mongodb\Category'  => '\appfront\local\local_models\mongodb\Category',
+];

+ 1 - 0
appadmin/config/bootstrap.php

@@ -0,0 +1 @@
+<?php

+ 40 - 0
appadmin/config/fecshop_local.php

@@ -0,0 +1,40 @@
+<?php
+
+// 本文件在app/web/index.php 处引入。
+
+// fecshop的核心模块
+$modules = [];
+foreach (glob(__DIR__.'/fecshop_local_modules/*.php') as $filename) {
+    $modules = array_merge($modules, require($filename));
+}
+// services
+$services = [];
+foreach (glob(__DIR__.'/fecshop_local_services/*.php') as $filename) {
+    $services = array_merge($services, require($filename));
+}
+// 组件
+$components = [
+    'i18n' => [
+        'translations' => [
+            'appadmin' => [
+                'basePaths' => [
+                    '@appadmin/languages',
+                ],
+                // base language code
+                'sourceLanguage' => 'en_US',
+                /**
+                 * @var bool whether to force message translation when the source and target languages are the same.
+                 * Defaults to false, meaning translation is only performed when source and target languages are different.
+                 * see: @yii/i18n/MessageSource.php  @property $forceTranslation
+                 */
+                'forceTranslation' => true,
+            ],
+        ],
+    ],
+];
+
+return [
+    'modules'  => $modules,
+    'services' => $services,
+    'components' => $components,
+];

+ 3 - 0
appadmin/config/fecshop_local_modules/.gitignore

@@ -0,0 +1,3 @@
+Person.php
+Blog.php
+!.gitignore

+ 30 - 0
appadmin/config/fecshop_local_modules/Fecadmin.php

@@ -0,0 +1,30 @@
+<?php
+/**
+ * FecShop file.
+ *
+ * @link http://www.fecshop.com/
+ * @copyright Copyright (c) 2016 FecShop Software LLC
+ * @license http://www.fecshop.com/license/
+ */
+return [
+    'fecadmin' => [
+        'params' => [
+            /**
+             * Fecshop缓存是基于redis,下面是各个入口redis配置所在的文件路径
+             * 1.`commonConfig`是公用部分
+             * 2.app开头的key,指的是各个入口的redis所在的配置文件
+             * 这个配置的作用,是为了在后台清空各个入口的全部缓存,因此需要加载相应的redis的配置
+             */
+            'cacheRedisConfigFile' => [
+                'commonConfig'       => '@common/config/main-local.php',
+                'appAdmin'           => '@appadmin/config/main.php',
+                'appApi'             => '@appapi/config/main.php',
+                'appFront'           => '@appfront/config/main.php',
+                'appHtml5'           => '@apphtml5/config/main.php',
+                'appServer'          => '@appserver/config/main.php',
+                
+            ],
+        ],
+    ],
+];
+

+ 40 - 0
appadmin/config/fecshop_local_services/Admin.php

@@ -0,0 +1,40 @@
+<?php
+/**
+ * FecShop file.
+ * @link http://www.fecshop.com/
+ * @copyright Copyright (c) 2016 FecShop Software LLC
+ * @license http://www.fecshop.com/license/
+ */
+return [
+    'admin' => [
+        // 子服务
+        'childService' => [
+            'urlKey' => [
+                'urlKeyTags' => [
+                    'blog_article' 								=> 'Blog-Article',
+                ],
+            ],
+/*
+            'menu' => [
+                'menuConfig' => [
+                    'blog' => [
+                        'label' => 'Blog',
+                        'child' => [
+                            'article' => [
+                                'label' => 'Article',
+                                'child' => [
+                                    'article_manager' => [
+                                        'label' => 'Manager Article',
+                                        'url_key' => '/blog/article/manager',
+                                    ],
+                                ],
+                            ],
+                        ],
+                    ],
+
+                ],
+            ],
+*/            
+        ],
+    ],
+];

+ 52 - 0
appadmin/config/fecshop_local_services/FecshopLang.php

@@ -0,0 +1,52 @@
+<?php
+/**
+ * FecShop file.
+ *
+ * @link http://www.fecshop.com/
+ *
+ * @copyright Copyright (c) 2016 FecShop Software LLC
+ * @license http://www.fecshop.com/license/
+ */
+return [
+    'fecshoplang' => [
+        //'class' => 'fecshop\services\FecshopLang',
+        //  mongoSearchLangName 在各个语言下字段参考资料如下:(不支持中文)
+        //  https://docs.mongodb.com/manual/reference/text-search-languages/#text-search-languages
+        'adminLangCode' => [
+            'en_US' => [
+                'code'                    => 'en',
+                'name'                   => 'English',
+            ],
+            'zh_CN' => [
+                'code'                    => 'zh',
+                'name'                   => '中文',
+            ],
+         ],
+        'allLangCode' => [
+            // 'en_US' 是标准语言简码  code对应的值en取 “标准语言简码”的前两位字符,
+            // 该值设置后,进行了产品分类数据的添加后,不能修改,否则会出现部分翻译语言丢失。
+            'en_US' => [
+                'code'                    => 'en',
+            ],
+            'zh_CN' => [
+                'code'                    => 'zh',
+            ],
+            'fr_FR' => [
+                'code' 					=> 'fr',
+            ],
+            'de_DE' => [
+                'code' 					=> 'de',
+            ],
+            'es_ES' => [
+                'code' 					=> 'es',
+            ],
+            'ru_RU' => [
+                'code' 					=> 'ru',
+            ],
+            'pt_PT' => [
+                'code' 					=> 'pt',
+            ],
+        ],
+        'defaultLangCode' => 'en',
+    ],
+];

+ 75 - 0
appadmin/config/fecshop_local_services/Page.php

@@ -0,0 +1,75 @@
+<?php
+/**
+ * FecShop file.
+ * @link http://www.fecshop.com/
+ * @copyright Copyright (c) 2016 FecShop Software LLC
+ * @license http://www.fecshop.com/license/
+ */
+return [
+    'page' => [
+        'childService' => [
+            'asset' => [
+                // js 版本号,当更改了js,将这里的版本号+1,生成的js链接就会更改为  xxx.js?v=2 ,
+                // 这样做的好处是,js的链接url改变了,可以防止浏览器继续使用缓存,而不是重新加载js文件的问题。
+                'jsVersion'        => 1,
+                // css 版本号,原理同js
+                // 关于版本号更多的信息,请参看:http://www.fancyecommerce.com/2017/04/17/css-js-%E5%90%8E%E9%9D%A2%E5%8A%A0%E7%89%88%E6%9C%AC%E5%8F%B7%E7%9A%84%E5%8E%9F%E5%9B%A0%E5%92%8C%E6%96%B9%E5%BC%8F/
+                'cssVersion'    => 1,
+                // 是否每次刷新,强制发布js css到线上? 开发环境设置为true,正式环境设置为false(你也可以设置为true,但是每次刷新都会复制js和css文件到@app/web/assets/下面,耗费资源)
+                // 线上设置成false,每次访问不会强制复制js和css到发布环境,可以节省资源,但是,当css和js更新后,
+                // 需要去@app/web/assets/ 路径下,手动清空所有的文件夹和文件,当assets路径下找不到文件,就会重新复制库包里的js和css到web环境,
+                // 这是属于Yii2的知识范畴。
+                'forceCopy' => true,
+                
+                // js and css config example:
+                'jsOptions'	=> [
+                    # js config 1
+                    [
+                        'options' => [
+                            'position' =>  'POS_END',
+                        //	'condition'=> 'lt IE 9',
+                        ],
+                        'js'	=>[
+                            'js/my.js',
+                        ],
+                    ],
+                    # js config 2
+                    //[
+                    //    'options' => [
+                    //        'condition'=> 'lt IE 9',
+                    //    ],
+                    //    'js'	=>[
+                    //        'js/ie9js.js'
+                    //    ],
+                    //],
+                ],
+                # css config
+                'cssOptions'	=> [
+                    # css config 1.
+                    [
+                        'css'	=>[
+                            'css/my.css',
+                        ],
+                        // 加上这个,可以放到css的最后面
+                        'options' => [
+                            'depends'=>['fecadmin\myassets\CustomAsset'],
+                        ]
+                    ],
+
+                    # css config 2.
+                    //[
+                    //    'options' => [
+                    //        'condition'=> 'lt IE 9',
+                    //    ],
+                    //    'css'	=>[
+                    //        'css/ltie9.css',
+                    //    ],
+                    //],
+                ],
+                
+            ],
+
+
+        ],
+    ],
+];

+ 31 - 0
appadmin/config/fecshop_third.php

@@ -0,0 +1,31 @@
+<?php
+/**
+ * FecShop file.
+ * @link http://www.fecshop.com/
+ * @copyright Copyright (c) 2016 FecShop Software LLC
+ * @license http://www.fecshop.com/license/
+ */
+
+/**
+ * 本文件在app/web/index.php 处引入。
+ * 本配置文件为第三方插件库包的配置文件
+ */
+$third_config = [];
+$current_app_name = 'appadmin';
+$third_config_file = glob(__DIR__.'/../../common/config/fecshop_third_extensions/*.php');
+if (is_array($third_config_file) && !empty($third_config_file)) {
+    sort($third_config_file);
+    foreach ($third_config_file as $filename) {
+        $c = require($filename);
+        $extension_enable = isset($c['enable']) ? $c['enable'] : false;
+        if ($extension_enable) {
+            $curr_config = isset($c['app'][$current_app_name]) ? $c['app'][$current_app_name] : false;
+            $app_enable = isset($curr_config['enable']) ? $curr_config['enable'] : false;
+            $app_config = isset($curr_config['config']) ? $curr_config['config'] : false;
+            if ($app_enable && is_array($app_config) && !empty($app_config)) {
+                $third_config = array_merge($third_config, $app_config);
+            }
+        }
+    }
+}
+return $third_config;

+ 62 - 0
appadmin/config/main.php

@@ -0,0 +1,62 @@
+<?php
+
+$params = array_merge(
+    require(__DIR__.'/../../common/config/params.php'),
+    require(__DIR__.'/../../common/config/params-local.php'),
+    require(__DIR__.'/params.php'),
+    require(__DIR__.'/params-local.php')
+);
+
+return [
+    'id'       => 'app-admin',
+    // 设置时区,查看php 支持的所支持的时区列表  :http://www.php.net/manual/zh/timezones.php
+    'timeZone' => 'Asia/Shanghai',
+    'basePath' => dirname(__DIR__),
+    //'bootstrap' => ['log'],
+    'controllerNamespace' => 'appadmin\controllers',
+    // compress css and js to one file,
+    //'bootstrap'    => ['assetsAutoCompress'],
+    'components' => [
+       /*
+       #  compress css and js to one file,
+       'assetsAutoCompress' =>
+        [
+            'class'             => '\skeeks\yii2\assetsAuto\AssetsAutoCompressComponent',
+            'enabled'           => true,
+            'jsCompress'        => true,
+            'cssFileCompile'    => true,
+            'jsFileCompile'     => true,
+        ],
+        */
+        'session' => [
+            /*
+             * // use mongodb for session.
+             * 'class' => 'yii\mongodb\Session',
+             * 'db' => 'mongodb',
+             * 'sessionCollection' => 'session',
+             */
+            'class'   => 'yii\redis\Session',
+            'timeout' => 86400 * 7,
+            'keyPrefix' => 'appadmin_session',
+            'redis' => [
+                'database' => 1,
+            ],
+        ],
+        'cache' => [
+            /*
+             * // use mongodb for cache.
+             * 'class' => 'yii\mongodb\Cache',
+             */
+            'class'     => 'yii\redis\Cache',
+            'keyPrefix' => 'appadmin_cache',
+            'redis' => [
+                'database' => 2,
+            ],
+        ],
+        'assetManager' => [
+            'forceCopy' => true,
+        ],
+    ],
+    // 自定义参数
+    'params' => $params,
+];

+ 12 - 0
appadmin/config/params.php

@@ -0,0 +1,12 @@
+<?php
+
+return [
+    /*
+     * admin language for  attribute
+     */
+
+    'systemlog' => [
+        'enable' => 1,
+    ],
+    'localThemeDir' => '@appadmin/theme/local/theme01',
+];

+ 1 - 0
appadmin/languages/.gitignore

@@ -0,0 +1 @@
+!.gitignore

+ 11 - 0
appadmin/languages/de_DE/appadmin.php

@@ -0,0 +1,11 @@
+<?php
+/**
+ * FecShop file.
+ *
+ * @link http://www.fecshop.com/
+ * @copyright Copyright (c) 2016 FecShop Software LLC
+ * @license http://www.fecshop.com/license/
+ */
+return [
+ 'fecshop'  => 'de_DE app fecshop',
+];

+ 11 - 0
appadmin/languages/en_US/appadmin.php

@@ -0,0 +1,11 @@
+<?php
+/**
+ * FecShop file.
+ *
+ * @link http://www.fecshop.com/
+ * @copyright Copyright (c) 2016 FecShop Software LLC
+ * @license http://www.fecshop.com/license/
+ */
+return [
+ 'fecshop'  => 'en_US app fecshop',
+];

+ 11 - 0
appadmin/languages/es_ES/appadmin.php

@@ -0,0 +1,11 @@
+<?php
+/**
+ * FecShop file.
+ *
+ * @link http://www.fecshop.com/
+ * @copyright Copyright (c) 2016 FecShop Software LLC
+ * @license http://www.fecshop.com/license/
+ */
+return [
+ 'fecshop'  => 'es_ES app fecshop',
+];

+ 12 - 0
appadmin/languages/fr_FR/appadmin.php

@@ -0,0 +1,12 @@
+<?php
+/**
+ * FecShop file.
+ *
+ * @link http://www.fecshop.com/
+ * @copyright Copyright (c) 2016 FecShop Software LLC
+ * @license http://www.fecshop.com/license/
+ */
+return [
+ 'fecshop'  => 'fr_FR 11app fecshop',
+ 'fecshop,{username}' =>  'fr_FR 11 app fecshop,{username}',
+];

+ 11 - 0
appadmin/languages/it_IT/appadmin.php

@@ -0,0 +1,11 @@
+<?php
+/**
+ * FecShop file.
+ *
+ * @link http://www.fecshop.com/
+ * @copyright Copyright (c) 2016 FecShop Software LLC
+ * @license http://www.fecshop.com/license/
+ */
+return [
+ 'fecshop'  => 'it_IT app fecshop',
+];

+ 11 - 0
appadmin/languages/nl_NL/appadmin.php

@@ -0,0 +1,11 @@
+<?php
+/**
+ * FecShop file.
+ *
+ * @link http://www.fecshop.com/
+ * @copyright Copyright (c) 2016 FecShop Software LLC
+ * @license http://www.fecshop.com/license/
+ */
+return [
+ 'fecshop'  => 'nl_NL app fecshop',
+];

+ 11 - 0
appadmin/languages/pt_PT/appadmin.php

@@ -0,0 +1,11 @@
+<?php
+/**
+ * FecShop file.
+ *
+ * @link http://www.fecshop.com/
+ * @copyright Copyright (c) 2016 FecShop Software LLC
+ * @license http://www.fecshop.com/license/
+ */
+return [
+ 'fecshop'  => 'pt_PT app fecshop',
+];

+ 11 - 0
appadmin/languages/ru_RU/appadmin.php

@@ -0,0 +1,11 @@
+<?php
+/**
+ * FecShop file.
+ *
+ * @link http://www.fecshop.com/
+ * @copyright Copyright (c) 2016 FecShop Software LLC
+ * @license http://www.fecshop.com/license/
+ */
+return [
+ 'fecshop'  => 'ru_RU app fecshop',
+];

+ 85 - 0
appadmin/languages/zh_CN/appadmin.php

@@ -0,0 +1,85 @@
+<?php
+/**
+ * FecShop file.
+ *
+ * @link http://www.fecshop.com/
+ * @copyright Copyright (c) 2016 FecShop Software LLC
+ * @license http://www.fecshop.com/license/
+ */
+return [
+    'Color' => '颜色',
+    'Size' => '尺码',
+    'Color:'                          => '颜色:',
+    'color:'                          => '颜色:',
+    'Size:'                           => '尺码:',
+    'one-color'                       => '单色',
+    'red'                             => '红色',
+    'white'                           => '白色',
+    'black'                           => '黑色',
+    'blue'                            => '蓝色',
+    'green'                           => '绿色',
+    'yellow'                          => '黄色',
+    'gray'                            => '灰色',
+    'khaki'                           => '黄褐色',
+    'ivory'                           => '象牙色',
+    'beige'                           => '米色',
+    'orange'                          => '橙色',
+    'cyan'                            => '青色',
+    'leopard'                         => '豹纹',
+    'camouflage'                      => '伪装色',
+    'silver'                          => '银白色',
+    'pink'                            => '粉红色',
+    'purple'                          => '紫色',
+    'brown'                           => '棕色',
+    'golden'                          => '金色',
+    'multicolor'                      => '彩色',
+    'white-blue'                    => '白 & 蓝',
+    'white-black'                   => '白 & 黑',
+    'v-neck'                        => 'V领',
+    'Casual' => '休闲',
+    'Cute' => '可爱',
+    'Sexy & Club' => '性感',
+    'Bohemian' => '波西米亚',
+    'Vintage' => 'Vintage',
+    'Brief' => 'Brief',
+    'Work' => '工作',
+    'Novelty' => '新奇',
+    'Mini' => '迷你',
+    'Knee Length' => '膝盖长度',
+    'Mid Calf' => 'Mid Calf',
+    'Ankle Length' => '脚踝长度',
+    'Floor Length' => '地板长度',
+    
+    'color'  => '颜色',
+    'size'    => '尺码',
+    'my_remark' => '我的备注',
+    'my_email' => '我的邮箱',
+    'my_date' => '我的日期',
+    'style' => '样式',
+    'dresses-length' => '裙长',
+    'pattern-type' => '图案类型',
+    'sleeve-length' => '袖长',
+    'collar' => '领口',
+    'my_color' => '我的颜色',
+    'my_size' => '我的尺码',
+    'test3' => '测试 3',
+    'xinghao' => '型号',
+    'memory_capacity' => '内存容量',
+    'cpu' => 'Cpu',
+    'my_size2' => '我的尺寸2',
+    'my_size3' => '我的尺寸3',
+    'Animal' => '动物',
+    'Letter' => '信件',
+    'Short-Sleeves' => '半袖',
+    'sku' => 'Sku',
+    'qty' => '个数',
+    'price' => '价格',
+    'image' => '图片',
+    'delete' => '删除',
+    '' => '',
+    '' => '',
+    '' => '',
+    '' => '',
+    '' => '',
+    
+];

+ 1 - 0
appadmin/local/local_components/.gitignore

@@ -0,0 +1 @@
+!.gitignore

+ 1 - 0
appadmin/local/local_events/.gitignore

@@ -0,0 +1 @@
+!.gitignore

+ 1 - 0
appadmin/local/local_interfaces/.gitignore

@@ -0,0 +1 @@
+!.gitignore

+ 1 - 0
appadmin/local/local_migrations/.gitignore

@@ -0,0 +1 @@
+!.gitignore

+ 1 - 0
appadmin/local/local_models/.gitignore

@@ -0,0 +1 @@
+!.gitignore

+ 63 - 0
appadmin/local/local_models/mongodb/Category.php

@@ -0,0 +1,63 @@
+<?php
+namespace fecshop\models\mongodb;
+
+use yii\mongodb\ActiveRecord;
+
+class Category extends ActiveRecord
+{
+    const MENU_SHOW      = 1;
+    const MENU_NOT_SHOW  = 2;
+    const STATUS_ENABLE  = 1;
+    const STATUS_DISABLE = 2;
+
+    
+    /**
+     * mongodb collection 的名字,相当于mysql的table name
+     */
+    public static function collectionName()
+    {
+        return 'category';
+    }
+    /**
+     * mongodb是没有表结构的,因此不能像mysql那样取出来表结构的字段作为model的属性
+     * 因此,需要自己定义model的属性,下面的方法就是这个作用
+     */
+    public function attributes()
+    {
+        return [
+            '_id',
+            'parent_id',
+            'name',
+            'status',
+            'menu_show',
+            'url_key',
+            'level',
+            'thumbnail_image',
+            'image',
+            'filter_product_attr_selected',
+            'filter_product_attr_unselected',
+            'description',
+            'menu_custom',
+            'title',
+            'meta_description',
+            'meta_keywords',
+            'include_in_menu',
+            'is_feature',
+            'available_sort_by',
+            'default_sort_by',
+            'theme',
+            'active_from',
+            'active_to',
+            'created_at',
+            'updated_at',
+            'created_user_id',
+            //other
+            /*
+                category filter
+                category product
+
+
+            */
+       ];
+    }
+}

+ 3 - 0
appadmin/local/local_modules/.gitignore

@@ -0,0 +1,3 @@
+Person
+Blog
+!.gitignore

+ 1 - 0
appadmin/local/local_services/.gitignore

@@ -0,0 +1 @@
+!.gitignore

+ 1 - 0
appadmin/local/local_yii/.gitignore

@@ -0,0 +1 @@
+!.gitignore

+ 2 - 0
appadmin/runtime/.gitignore

@@ -0,0 +1,2 @@
+*
+!.gitignore

+ 1 - 0
appadmin/theme/local/theme01/.gitignore

@@ -0,0 +1 @@
+person

+ 1 - 0
appadmin/theme/local/theme01/layouts/.gitignore

@@ -0,0 +1 @@
+!.gitignore

BIN
appadmin/uploads/product/product_1492501121_product.xlsx


BIN
appadmin/uploads/product/product_1492501160_product.xlsx


+ 1 - 0
appadmin/views/layouts/main_ajax.php

@@ -0,0 +1 @@
+<?= $content;

+ 6 - 0
appadmin/web/.gitignore

@@ -0,0 +1,6 @@
+*
+!.gitignore
+!assets/
+!favicon.ico
+!robots.php
+!skin/

+ 2 - 0
appadmin/web/assets/.gitignore

@@ -0,0 +1,2 @@
+*
+!.gitignore

BIN
appadmin/web/favicon.ico


+ 3 - 0
appadmin/web/skin/.gitignore

@@ -0,0 +1,3 @@
+*
+!.gitignore
+!default/

+ 3 - 0
appadmin/web/skin/default/.gitignore

@@ -0,0 +1,3 @@
+*
+!.gitignore
+!images/

+ 3 - 0
appadmin/web/skin/default/images/.gitignore

@@ -0,0 +1,3 @@
+*
+!.gitignore
+!blue_logo.png

BIN
appadmin/web/skin/default/images/blue_logo.png


+ 1 - 0
appapi/.gitignore

@@ -0,0 +1 @@
+merge_config.php

+ 2 - 0
appapi/config/.gitignore

@@ -0,0 +1,2 @@
+main-local.php
+params-local.php

+ 6 - 0
appapi/config/YiiClassMap.php

@@ -0,0 +1,6 @@
+<?php
+
+return [
+    //'fecshop\app\appfront\helper\test\My' => '@appfront/helper/My.php',
+
+];

+ 10 - 0
appapi/config/YiiRewriteMap.php

@@ -0,0 +1,10 @@
+<?php
+
+return [
+    /**
+     * \fecshop\models\mongodb\Category 为原来的类
+     * \appfront\local\local_models\mongodb\Category 为重写后的类
+     * 重写后的类可以集成原来的类。
+     */
+    //'\fecshop\models\mongodb\Category'  => '\appfront\local\local_models\mongodb\Category',
+];

+ 1 - 0
appapi/config/bootstrap.php

@@ -0,0 +1 @@
+<?php

+ 38 - 0
appapi/config/fecshop_local.php

@@ -0,0 +1,38 @@
+<?php
+
+// 本文件在app/web/index.php 处引入。
+
+// fecshop的核心模块
+$modules = [];
+foreach (glob(__DIR__.'/fecshop_local_modules/*.php') as $filename) {
+    $modules = array_merge($modules, require($filename));
+}
+// services
+$services = [];
+foreach (glob(__DIR__.'/fecshop_local_services/*.php') as $filename) {
+    $services = array_merge($services, require($filename));
+}
+// 组件
+$components = [];
+
+return [
+    'modules'  => $modules,
+    'services' => $services,
+    'components' => $components,
+    'params' => [
+        
+        'rateLimit'             => [
+            'enable'=> false,   // 是否开启?默认不开启速度控制。
+            'limit' => [120, 60], // 速度控制[120,60] 代表  60秒内最大访问120次,
+        ],
+        /** 
+         * 该配置用来设置:允许那些账户在appapi入口进行登录获取token
+         * 1.apiUserAllow数组的值为空:代表默认是所有的后台用户
+         * 2.apiUserAllow数组中设置了用户名(数组可以设置多个),那么,只有包含在这个数组中的用户,才可以用于appapi用户登录获取access-token。其他的账户获取token就会失败
+         * 3.默认该数组为空,允许所有的appadmin的后台用户进行登录获取access-token
+         */
+        'apiUserAllow' => [
+           // 'admin','terry'
+        ],
+    ],
+];

+ 1 - 0
appapi/config/fecshop_local_modules/.gitignore

@@ -0,0 +1 @@
+!.gitignore

+ 15 - 0
appapi/config/fecshop_local_modules/V1.php

@@ -0,0 +1,15 @@
+<?php
+/**
+ * FecShop file.
+ *
+ * @link http://www.fecshop.com/
+ * @copyright Copyright (c) 2016 FecShop Software LLC
+ * @license http://www.fecshop.com/license/
+ */
+return [
+    'v1' => [
+        'controllerMap' =>[
+            'customer'=> 'appapi\local\local_modules\V1\controllers\CustomerController'
+        ]
+    ]
+];

+ 1 - 0
appapi/config/fecshop_local_services/.gitignore

@@ -0,0 +1 @@
+!.gitignore

+ 29 - 0
appapi/config/fecshop_local_services/Session.php

@@ -0,0 +1,29 @@
+<?php
+/**
+ * FecShop file.
+ * @link http://www.fecshop.com/
+ * @copyright Copyright (c) 2016 FecShop Software LLC
+ * @license http://www.fecshop.com/license/
+ */
+return [
+    'session' => [
+        // 【下面的三个参数,在使用php session的时候无效】
+        //  只有 \Yii::$app->user->enableSession == false的时候才有效。
+        //  说的更明确点就是:这些参数的设置是给无状态api使用的。
+        //  实现了一个类似session的功能,供appserver端使用
+        // 【对phpsession 无效】设置session过期时间,
+        'timeout' => 3600,
+        // 【对phpsession 无效】当过期时间+session创建时间 - 当前事件 < $updateTimeLimit ,则更新session创建时间
+        'updateTimeLimit' => 600,
+        // 【不可以设置phpsession】默认为php session,只有当 \Yii::$app->user->enableSession == false时,下面的设置才有效。
+        // 存储引擎  mongodb mysqldb redis
+        'storage' => 'SessionMysqldb',
+        
+        
+        //'childService' => [
+        //    'session' => [
+        //        'class' => 'fecshop\services\session\Session',
+        //    ],
+        //],
+    ],
+];

+ 31 - 0
appapi/config/fecshop_third.php

@@ -0,0 +1,31 @@
+<?php
+/**
+ * FecShop file.
+ * @link http://www.fecshop.com/
+ * @copyright Copyright (c) 2016 FecShop Software LLC
+ * @license http://www.fecshop.com/license/
+ */
+
+/**
+ * 本文件在app/web/index.php 处引入。
+ * 本配置文件为第三方插件库包的配置文件
+ */
+$third_config = [];
+$current_app_name = 'appapi';
+$third_config_file = glob(__DIR__.'/../../common/config/fecshop_third_extensions/*.php');
+if (is_array($third_config_file) && !empty($third_config_file)) {
+    sort($third_config_file);
+    foreach ($third_config_file as $filename) {
+        $c = require($filename);
+        $extension_enable = isset($c['enable']) ? $c['enable'] : false;
+        if ($extension_enable) {
+            $curr_config = isset($c['app'][$current_app_name]) ? $c['app'][$current_app_name] : false;
+            $app_enable = isset($curr_config['enable']) ? $curr_config['enable'] : false;
+            $app_config = isset($curr_config['config']) ? $curr_config['config'] : false;
+            if ($app_enable && is_array($app_config) && !empty($app_config)) {
+                $third_config = array_merge($third_config, $app_config);
+            }
+        }
+    }
+}
+return $third_config;

+ 67 - 0
appapi/config/main.php

@@ -0,0 +1,67 @@
+<?php
+
+$params = array_merge(
+    require(__DIR__.'/../../common/config/params.php'),
+    require(__DIR__.'/../../common/config/params-local.php'),
+    require(__DIR__.'/params.php'),
+    require(__DIR__.'/params-local.php')
+);
+
+return [
+    'id'                  => 'app-api',
+    // 设置时区,查看php 支持的所支持的时区列表  :http://www.php.net/manual/zh/timezones.php
+    'timeZone' => 'Asia/Shanghai',
+    'basePath'            => dirname(__DIR__),
+    'controllerNamespace' => 'appapi\controllers',
+    'modules'             => $modules,
+    //'bootstrap' => ['log'],
+    //'bootstrap'    => ['assetsAutoCompress'],
+    // 自定义组件
+    'components' => [
+       /*
+       'assetsAutoCompress' =>
+        [
+            'class'             => '\skeeks\yii2\assetsAuto\AssetsAutoCompressComponent',
+            'enabled'           => true,
+            'jsCompress'        => true,
+            'cssFileCompile'    => true,
+            'jsFileCompile'     => true,
+        ],
+        */
+        'session' => [
+            /*
+             * // use mongodb for session.
+             * 'class' => 'yii\mongodb\Session',
+             * 'db' => 'mongodb',
+             * 'sessionCollection' => 'session',
+             */
+            'class'   => 'yii\redis\Session',
+            'timeout' => 86400 * 7,
+            'keyPrefix' => 'appapi_session',
+            'redis' => [
+                'database' => 3,
+            ],
+        ],
+        'cache' => [
+            /*
+             * // use mongodb for cache.
+             * 'class' => 'yii\mongodb\Cache',
+             */
+            'class'     => 'yii\redis\Cache',
+            'keyPrefix' => 'appapi_cache',
+            'redis' => [
+                'database' => 4,
+            ],
+        ],
+        'user' => [
+            // 【默认】不开启速度限制的 User Model
+            'identityClass' => 'fecshop\models\mysqldb\AdminUser',
+            // 开启速度限制的 User Model
+            //'identityClass' => 'fecshop\models\mysqldb\adminUser\AdminUserAccessToken',
+            
+            //'enableAutoLogin' => true,
+        ],
+    ],
+    // 自定义参数
+    'params' => $params,
+];

+ 5 - 0
appapi/config/params.php

@@ -0,0 +1,5 @@
+<?php
+
+return [
+
+];

+ 1 - 0
appapi/local/local_components/.gitignore

@@ -0,0 +1 @@
+!.gitignore

+ 1 - 0
appapi/local/local_events/.gitignore

@@ -0,0 +1 @@
+!.gitignore

+ 1 - 0
appapi/local/local_interfaces/.gitignore

@@ -0,0 +1 @@
+!.gitignore

+ 1 - 0
appapi/local/local_migrations/.gitignore

@@ -0,0 +1 @@
+!.gitignore

+ 1 - 0
appapi/local/local_models/.gitignore

@@ -0,0 +1 @@
+!.gitignore

+ 1 - 0
appapi/local/local_modules/.gitignore

@@ -0,0 +1 @@
+!.gitignore

+ 28 - 0
appapi/local/local_modules/V1/controllers/CustomerController.php

@@ -0,0 +1,28 @@
+<?php
+/**
+ * FecShop file.
+ *
+ * @link http://www.fecshop.com/
+ * @copyright Copyright (c) 2016 FecShop Software LLC
+ * @license http://www.fecshop.com/license/
+ */
+
+namespace appapi\local\local_modules\V1\controllers;
+
+use fecshop\app\appfront\modules\AppfrontController;
+use Yii;
+
+/**
+ * @author Terry Zhao <2358269014@qq.com>
+ * @since 1.0
+ */
+class CustomerController extends  \fecshop\app\appapi\modules\V1\controllers\CustomerController
+{
+    public function actionIndex(){
+        
+        echo 1;exit;
+    }
+    
+    
+    
+}

+ 1 - 0
appapi/local/local_services/.gitignore

@@ -0,0 +1 @@
+!.gitignore

+ 1 - 0
appapi/local/local_yii/.gitignore

@@ -0,0 +1 @@
+!.gitignore

+ 2 - 0
appapi/runtime/.gitignore

@@ -0,0 +1,2 @@
+*
+!.gitignore

+ 3 - 0
appapi/web/.gitignore

@@ -0,0 +1,3 @@
+*
+!.gitignore
+!assets/

+ 2 - 0
appapi/web/assets/.gitignore

@@ -0,0 +1,2 @@
+*
+!.gitignore

+ 1 - 0
appfront/.gitignore

@@ -0,0 +1 @@
+merge_config.php

+ 2 - 0
appfront/components/.gitignore

@@ -0,0 +1,2 @@
+*
+!.gitignore

+ 2 - 0
appfront/config/.gitignore

@@ -0,0 +1,2 @@
+main-local.php
+params-local.php

+ 6 - 0
appfront/config/YiiClassMap.php

@@ -0,0 +1,6 @@
+<?php
+
+return [
+    //'fecshop\app\appfront\helper\test\My' => '@appfront/helper/My.php',
+    //'fecshop\services\Service'  => '@fecshop/enterprise/services/Service.php',
+];

+ 15 - 0
appfront/config/YiiRewriteMap.php

@@ -0,0 +1,15 @@
+<?php
+
+return [
+    /**
+     * \fecshop\models\mongodb\Category 为原来的类
+     * \appfront\local\local_models\mongodb\Category 为重写后的类
+     * 重写后的类可以集成原来的类。
+     */
+    // '\fecshop\models\mongodb\Category'  => '\appfront\local\local_models\mongodb\Category',
+    // '\fecshop\app\appfront\modules\Cms\block\home\Index'  => '\appfront\local\local_modules\Cms\block\home\Index',
+    
+    // '\fecshop\app\appfront\modules\Catalog\block\product\CustomOption'  => '\appfront\local\local_modules\Catalog\block\product\CustomOption',
+    '\fecshop\app\appfront\modules\Catalog\block\category\Index'=>'\appfront\local\local_modules\Catalog\block\category\Index'
+
+];

+ 1 - 0
appfront/config/bootstrap.php

@@ -0,0 +1 @@
+<?php

+ 40 - 0
appfront/config/fecshop_local.php

@@ -0,0 +1,40 @@
+<?php
+
+// 本文件在app/web/index.php 处引入。
+
+// fecshop的核心模块
+$modules = [];
+foreach (glob(__DIR__.'/fecshop_local_modules/*.php') as $filename) {
+    $modules = array_merge($modules, require($filename));
+}
+// services
+$services = [];
+foreach (glob(__DIR__.'/fecshop_local_services/*.php') as $filename) {
+    $services = array_merge($services, require($filename));
+}
+// 组件
+$components = [
+    'i18n' => [
+        'translations' => [
+            'appfront' => [
+                'basePaths' => [
+                    '@appfront/languages',
+                ],
+                // base language code
+                'sourceLanguage' => 'en_US',
+                /**
+                 * @var bool whether to force message translation when the source and target languages are the same.
+                 * Defaults to false, meaning translation is only performed when source and target languages are different.
+                 * see: @yii/i18n/MessageSource.php  @property $forceTranslation
+                 */
+                'forceTranslation' => true,
+            ],
+        ],
+    ],
+];
+
+return [
+    'modules'  => $modules,
+    'services' => $services,
+    'components' => $components,
+];

+ 1 - 0
appfront/config/fecshop_local_modules/.gitignore

@@ -0,0 +1 @@
+!.gitignore

+ 119 - 0
appfront/config/fecshop_local_modules/Catalog.php

@@ -0,0 +1,119 @@
+<?php
+/**
+ * FecShop file.
+ *
+ * @link http://www.fecshop.com/
+ *
+ * @copyright Copyright (c) 2016 FecShop Software LLC
+ * @license http://www.fecshop.com/license/
+ */
+return [
+    'catalog' => [
+        /**
+         * Yii2 controllerMap 重写机制。
+         */
+        //'controllerMap' => [
+        //    'category' => 'appfront\local\local_modules\Catalog\controllers\CategoryController',          
+        //],
+        'params'=> [
+            //##############################
+            //# 		category部分设置	 ##
+            //##############################
+            //'category_breadcrumbs' => true, // 分类页面:是否显示分类的面包屑导航。
+            //'product_breadcrumbs' => true, // 产品页面:是否显示产品的面包屑导航。
+            /*
+             * 注意:做侧栏分类产品过滤的属性,必须是select类型的,其他的类型请不要用,
+             * 对于select类型,目前不支持多语言数据库存储,select类型的各个值是通过前端翻译文件来实现翻译的、
+             * 对于color  size 对应的保存值,只可以使用 '数字','字符','空格','&','-','_' 这6类字符
+             */
+            'category_filter_attr' => [
+                'color', 'size',
+            ],
+
+            'category_filter_category'    => true,
+            'category_filter_price'       => true,
+            'category_query'              => [
+                // 放到第一个的就是默认值,譬如下面的30
+                'numPerPage' => [12, 30, 60, 90],        // 产品显示个数的列举
+                // 放到第一个的就是默认值,譬如下面的hot
+                'sort' => [                        // 所有排序方式
+                    // 下面的譬如hot  new  low-to-high 只能用 字母,数组,-,_ 这4种字符。
+                    'hot' => [
+                        'label'        => 'Hot',   // 显示的字符
+                        'db_columns'   => 'score', // 对应数据库的字段
+                        'direction'    => 'desc',  // 排序方式
+                    ],
+                    'review_count' => [
+                        'label'        => 'Review',   // 显示的字符
+                        'db_columns'   => 'review_count', // 对应数据库的字段
+                        'direction'    => 'desc',  // 排序方式
+                    ],
+                    'favorite_count' => [
+                        'label'        => 'Favorite',   // 显示的字符
+                        'db_columns'   => 'favorite_count', // 对应数据库的字段
+                        'direction'    => 'desc',  // 排序方式
+                    ],
+                    'new' => [
+                        'label'        => 'New',
+                        'db_columns'   => 'created_at',
+                        'direction'    => 'desc',
+                    ],
+                    'stock' => [
+                        'label'        => 'Stock',
+                        'db_columns'   => 'qty',
+                        'direction'    => 'desc',
+                    ],
+                    'low-to-high' => [
+                        'label'        => '$ Low to High',
+                        'db_columns'   => 'final_price',
+                        'direction'    => 'asc',
+                    ],
+                    'high-to-low' => [
+                        'label'        => '$ High to Low',
+                        'db_columns'   => 'final_price',
+                        'direction'    => 'desc',
+                    ],
+                ],
+                'price_range' => [
+                    '0-10',
+                    '10-20',
+                    '20-30',
+                    '30-50',
+                    '50-100',
+                    '100-150',
+                    '150-300',
+                    '300-500',
+                    '500-1000',
+                    '1000-',
+                ],
+            ],
+            //##############################
+            //# 		Product部分设置		 ##
+            //##############################
+            // 产品页面图片的设置
+            'productImgSize' => [
+                //'small_img_width'  => 80,  // 底部小图的宽度
+                //'small_img_height' => 110,  // 底部小图的高度
+                //'middle_img_width' => 400,  // 主图的宽度
+            ],
+            'productImgMagnifier' => false, // 是否已放大镜的方式显示,如果否,则是内窥的方式查看
+
+            //##############################
+            //#     Review部分设置		 ##
+            //##############################
+            'review' => [ 
+                'add_captcha'                    => true,  // 增加review页面是否开启验证码验证。
+                'productPageReviewCount'         => 10,    // 在产品页面显示的review的个数。
+                'reviewPageReviewCount'          => 20,    // 在review列表页面,显示的review的个数
+                'addReviewOnlyLogin'             => true,   // 只有登录用户才有资格进行评论。
+                'ifShowCurrentUserNoAuditReview' => true, // 当前用户添加的评论,后台未审核的评论,是否显示?这个是通过ip来判断。
+                'filterByLang'                   => false,    // 是否通过语言进行评论过滤?默认只显示当前的语言下的评论,也就是客户在添加评论的store的语言。
+            ],
+
+            'favorite' => [
+                'addSuccessRedirectFavoriteList' => false, // 产品收藏成功后是否跳转到账户中心的收藏列表
+            ],
+
+        ],
+    ],
+];

+ 56 - 0
appfront/config/fecshop_local_modules/Catalogsearch.php

@@ -0,0 +1,56 @@
+<?php
+/**
+ * FecShop file.
+ *
+ * @link http://www.fecshop.com/
+ * @copyright Copyright (c) 2016 FecShop Software LLC
+ * @license http://www.fecshop.com/license/
+ */
+return [
+    /**
+     * Catalogsearch 模块的配置,您可以在@appfront/config/fecshop_local_modules/Catalogsearch.php
+     * 中进行配置,二开,或者重写该模块(在上面路径中如果文件不存在,自行新建配置文件。)
+     */
+    'catalogsearch' => [
+        'class' => '\fecshop\app\appfront\modules\Catalogsearch\Module',
+        /**
+         * 模块内部的params配置。
+         */
+        'params'=> [
+            //'categorysearch_filter_attr' =>[
+            //	'color','size',
+            //],
+            // 搜索页面的title 格式 ,%s 将会被替换成搜索词
+            'search_page_title_format' => 'Search Text: %s ',
+            // 搜索页面的 meta keywords格式 ,%s 将会被替换成搜索词
+            'search_page_meta_keywords_format' => 'Search Text: %s ',
+            // 搜索页面的 meta description格式 ,%s 将会被替换成搜索词
+            'search_page_meta_description_format' => 'Search Text: %s ',
+            // 搜索的最大个数
+            'product_search_max_count'  => 1000,
+            // 搜索页面是否开启面包屑导航
+            'search_breadcrumbs'        => false,
+
+            //'search_filter_category' 	=> true,
+
+            'search_query' =>[
+                // 放到第一个的就是默认值,譬如下面的30
+                'numPerPage' => [30, 60, 90],        // 产品显示个数的列举
+
+                // 价格区间设置,如果不想在搜索页面价格过滤,可以清空这个。
+                'price_range' => [
+                    '0-10',
+                    '10-20',
+                    '20-30',
+                    '30-50',
+                    '50-100',
+                    '100-150',
+                    '150-300',
+                    '300-500',
+                    '500-1000',
+                    '1000-',
+                ],
+            ],
+        ],
+    ],
+];

+ 41 - 0
appfront/config/fecshop_local_modules/Cms.php

@@ -0,0 +1,41 @@
+<?php
+/**
+ * FecShop file.
+ *
+ * @link http://www.fecshop.com/
+ *
+ * @copyright Copyright (c) 2016 FecShop Software LLC
+ * @license http://www.fecshop.com/license/
+ */
+return [
+    'cms' => [
+        'params'=> [
+            'home_title'            => [
+                'home_title_en' => 'Fecshop Home Page En',
+                'home_title_zh' => 'Fecshop Home Page Zh',
+                'home_title_fr' => 'Fecshop Home Page Fr',
+                'home_title_es' => 'Fecshop Home Page Es',
+            ],
+            'home_meta_keywords'            => [
+                'home_meta_keywords_en' => 'Fecshop , Fashion E-Commerce Shop En',
+                'home_meta_keywords_zh' => 'Fecshop , Fashion E-Commerce Shop Zh',
+                'home_meta_keywords_fr' => 'Fecshop , Fashion E-Commerce Shop Fr',
+                'home_meta_keywords_es' => 'Fecshop , Fashion E-Commerce Shop Es',
+            ],
+
+            'home_meta_description'            => [
+                'home_meta_description_en' => 'Fashion E-Commerce Shop , Base On Yii2 Framework En',
+                'home_meta_description_zh' => 'Fashion E-Commerce Shop , Base On Yii2 Framework Zh',
+                'home_meta_description_fr' => 'Fashion E-Commerce Shop , Base On Yii2 Framework Fr',
+                'home_meta_description_es' => 'Fashion E-Commerce Shop , Base On Yii2 Framework Es',
+            ],
+            'homeBestSellerSku'        => [
+                'p10001-kahaki-xl', 'sk10003-001', 'sk10005', 'sk1000-khak', 'sk0003', 'men0003', 'men0002', 'men0001',
+            ],
+            'homeFeaturedSku'        => [
+                'men0003', 'men0002', 'men0001', 'computer001-xinghao2-cpu3', '22221', 'sk10005', 'sk1000-khak', '222212',
+            ],
+
+        ],
+    ],
+];

+ 14 - 0
appfront/config/fecshop_local_modules/Mytest.php

@@ -0,0 +1,14 @@
+<?php
+/**
+ * FecShop file.
+ *
+ * @link http://www.fecshop.com/
+ * @copyright Copyright (c) 2016 FecShop Software LLC
+ * @license http://www.fecshop.com/license/
+ */
+return [
+    'mytest' => [
+        'class' => '\appfront\local\local_modules\Mytest\Module',
+
+    ],
+];

+ 1 - 0
appfront/config/fecshop_local_services/.gitignore

@@ -0,0 +1 @@
+!.gitignore

+ 58 - 0
appfront/config/fecshop_local_services/Cache.php

@@ -0,0 +1,58 @@
+<?php
+/**
+ * FecShop file.
+ *
+ * @link http://www.fecshop.com/
+ *
+ * @copyright Copyright (c) 2016 FecShop Software LLC
+ * @license http://www.fecshop.com/license/
+ */
+return [
+    'cache' => [
+        /*
+         * cache 总开关,设置false后,无论cacheConfig中的enable
+         * 是否为true,都会全部关闭掉cache。
+         */
+        'enable'=> false,
+        /*
+         * 各个页面cache的配置
+         */
+        'cacheConfig'    => [
+            // 分类页面
+            'category'  => [
+                'enable'          => true,    // 是否开启分类页面的缓存
+                'timeout'         => 3600,    // 则设置缓存的过期时间,这里设置为秒
+                'disableUrlParam' => 'fecshop', // 如果开启缓存,在url加入什么参数后,系统不读取缓存,这个选项是为了方便在不刷新缓存的情况下,查看无缓存的页面是什么样子。
+                // url出现的这些参数的值,将参与cache唯一key的生成。
+                'cacheUrlParam'    => [
+                    // 分页,排序,等参数
+                    'p', 'dir', 'sort', 'numPerPage',
+                    // 侧栏属性过滤等参数
+                    'price', 'size', 'color',
+                    'style', 'dresses-length', 'pattern-type',
+                    'collar', 'xinghao', 'cpu',
+                ],
+            ],
+            // 产品页面
+            'product'  => [
+                'enable'          => true,    // 是否开启产品页面的缓存
+                'timeout'         => 3600,    //则设置缓存的过期时间,这里设置为秒
+                'disableUrlParam' => 'fecshop', // 如果开启缓存,在url加入什么参数后,系统不读取缓存,这个选项是为了方便在不刷新缓存的情况下,查看无缓存的页面是什么样子。
+            ],
+
+            // 首页页面
+            'home'  => [
+                'enable'          => true,    // 是否开启首页页面的缓存
+                'timeout'         => 3600,    // 则设置缓存的过期时间,这里设置为秒
+                'disableUrlParam' => 'fecshop', // 如果开启缓存,在url加入什么参数后,系统不读取缓存,这个选项是为了方便在不刷新缓存的情况下,查看无缓存的页面是什么样子。
+            ],
+
+            // Article(page)页面
+            'article'  => [
+                'enable'          => true,    // 是否开启Article页面的缓存
+                'timeout'         => 3600,    // 则设置缓存的过期时间,这里设置为秒
+                'disableUrlParam' => 'fecshop', // 如果开启缓存,在url加入什么参数后,系统不读取缓存,这个选项是为了方便在不刷新缓存的情况下,查看无缓存的页面是什么样子。
+            ],
+        ],
+    ],
+];

+ 23 - 0
appfront/config/fecshop_local_services/Event.php

@@ -0,0 +1,23 @@
+<?php
+/**
+ * FecShop file.
+ *
+ * @link http://www.fecshop.com/
+ *
+ * @copyright Copyright (c) 2016 FecShop Software LLC
+ * @license http://www.fecshop.com/license/
+ */
+return [
+    'event' => [
+        'eventList' => [
+            /*
+            # 加入购物车前
+            'event_add_to_cart_before' => [
+                ['appfront\event\CartTest1','beforeAdd1'],
+                ['appfront\event\CartTest2','beforeAdd2'],
+            ],
+            */
+        ],
+
+    ],
+];

+ 45 - 0
appfront/config/fecshop_local_services/FecshopLang.php

@@ -0,0 +1,45 @@
+<?php
+/**
+ * FecShop file.
+ *
+ * @link http://www.fecshop.com/
+ *
+ * @copyright Copyright (c) 2016 FecShop Software LLC
+ * @license http://www.fecshop.com/license/
+ */
+return [
+    'fecshoplang' => [
+        //'class' => 'fecshop\services\FecshopLang',
+        //  mongoSearchLangName 在各个语言下字段参考资料如下:(不支持中文)
+        //  https://docs.mongodb.com/manual/reference/text-search-languages/#text-search-languages
+        'allLangCode' => [
+            // 'en_US' 是标准语言简码  code对应的值en取 “标准语言简码”的前两位字符,
+            // 该值设置后,进行了产品分类数据的添加后,不能修改,否则会出现部分翻译语言丢失。
+            'en_US' => [
+                'code'                    => 'en',
+            ],
+            'fr_FR' => [
+                'code'                    => 'fr',
+            ],
+            'de_DE' => [
+                'code'                    => 'de',
+            ],
+            'es_ES' => [
+                'code'                    => 'es',
+            ],
+            'ru_RU' => [
+                'code'                    => 'ru',
+            ],
+            'pt_PT' => [
+                'code'                    => 'pt',
+            ],
+            'zh_CN' => [
+                'code'                    => 'zh',
+            ],
+            'it_IT' => [
+                'code'                    => 'it',
+            ],
+        ],
+        'defaultLangCode' => 'en',
+    ],
+];

+ 226 - 0
appfront/config/fecshop_local_services/Page.php

@@ -0,0 +1,226 @@
+<?php
+/**
+ * FecShop file.
+ *
+ * @link http://www.fecshop.com/
+ *
+ * @copyright Copyright (c) 2016 FecShop Software LLC
+ * @license http://www.fecshop.com/license/
+ */
+return [
+    'page' => [
+        'childService' => [
+            //'widget' => [
+            //],
+            'asset' => [
+                'class' => 'fecshop\services\page\Asset',
+                // 在js后面加一个v参数,修改js后,更改v参数,否则,浏览器会使用缓存。
+                // /assets/dbdba3fa/js/js.js?v=2
+                'jsVersion'        => 2,
+                'cssVersion'       => 2,
+                /**
+                 * @var string the root directory string the published asset files.
+                 * 设置: js和css的发布路径
+                 * 譬如设置为:'@appimage/assets',也可以将 @appimage 换成绝对路径
+                 */
+                'basePath' => '@webroot/assets',
+                /**
+                 * @var string the base URL through which the published asset files can be accessed.
+                 * 设置: js和css的URL路径
+                 * 可以将 @web 换成域名 , 譬如  `http:://www/fecshop.com/assets`
+                 * 这样就可以将js和css文件使用独立的域名了【把域名对应的地址对应到$basePath】。
+                 */
+                'baseUrl' => '@web/assets',
+                // 是否每次访问都强制复制css js img等文件到发布地址,true代表每次访问都发布
+                // 一般开发环境用true,线上用false。当线上更新jscss文件,可以清空assets发布路径下的文件的方式来更新
+                'forceCopy' => true,
+                'cssOptions'=>[
+                    [
+                        'css'=>[
+                            // 'css/font-awesome.min.css',
+                            'css/swiper.min.css',
+                            'css/index.css',
+                            'css/list.css',
+
+                        ],
+                    ]
+                    ],
+                'jsOptions'=>[
+                    [
+                        'js'=>[
+                            'js/swiper.min.js',
+                            'js/index.js',
+                            'js/js.js',
+                            'js/list.js'
+                        ]
+                    ]
+                ],
+                // js and css config example:
+                /**
+                 * 'jsOptions'	=> [
+                 *     # js config 1
+                 *     [
+                 *         'options' => [
+                 *             'position' =>  'POS_END',
+                 *         //	'condition'=> 'lt IE 9',
+                 *         ],
+                 *         'js'	=>[
+                 *             'js/my.js',
+                 *         ],
+                 *     ],
+                 *     # js config 2
+                 *     //[
+                 *     //    'options' => [
+                 *     //        'condition'=> 'lt IE 9',
+                 *     //    ],
+                 *     //    'js'	=>[
+                 *     //        'js/ie9js.js'
+                 *     //    ],
+                 *     //],
+                 * ],
+                 * # css config
+                 * 'cssOptions'	=> [
+                 *     # css config 1.
+                 *     [
+                 *         'css'	=>[
+                 *             'css/my.css',
+                 *         ],
+                 *     ],
+                 * 
+                 *     # css config 2.
+                 *     //[
+                 *     //    'options' => [
+                 *     //        'condition'=> 'lt IE 9',
+                 *     //    ],
+                 *     //    'css'	=>[
+                 *     //        'css/ltie9.css',
+                 *     //    ],
+                 *     //],
+                 * ],
+                 **/
+            ],
+
+            'menu' => [
+                'displayHome' => [
+                    'enable' => true,        // 是否在菜单中显示home
+                    'display'=> 'Home',        // 显示对应的字符。
+                ],
+                /*
+                 *	在菜单前面部分(产品分类菜单的前面部分)的自定义菜单。参考behindCustomMenu里面的格式
+                 */
+
+                'frontCustomMenu' => [
+
+                ],
+
+                /*
+                 *	在菜单后面部分(产品分类菜单的前面部分)的自定义菜单
+                 */
+                'behindCustomMenu' => [
+                    [
+                        'name'        => 'custom menu',            // 菜单名字
+                        'urlPath'     => '/my-custom-menu.html',    // 菜单对应的url
+                        'childMenu'   => [                        // 子菜单
+                            [
+                                'name'        => 'my custom menu 2',
+                                'urlPath'     => '/my-custom-menu-2.html',
+                            ],
+                            [
+                                'name'        => 'my custom menu 3',
+                                'urlPath'     => '/my-custom-menu-2.html',
+                                'childMenu'   => [
+                                    [
+                                        'name'        => 'my custom menu 3',
+                                        'urlPath'     => '/my-custom-menu-2.html',
+                                    ],
+                                    [
+                                        'name'        => 'my custom menu 3',
+                                        'urlPath'     => '/my-custom-menu-2.html',
+                                    ],
+                                ],
+                            ],
+                        ],
+                    ],
+                ],
+            ],
+
+            'widget' => [
+                'widgetConfig' => [
+                    'head' => [
+                        // 动态数据提供部分
+                        'class' => 'fecshop\app\appfront\widgets\Head',
+                        // 根据多模板的优先级,依次去模板找查找该文件,直到找到这个文件。
+                        'view'  => 'widgets/head.php',
+                        // 缓存
+                        'cache' => [
+                            'enable'     => false, // 是否开启
+                            'timeout'    => 4500,  // 缓存过期时间
+                        ],
+                    ],
+                    'header' => [
+                        'class' => 'fecshop\app\appfront\widgets\Headers',
+                        // 根据多模板的优先级,依次去模板找查找该文件,直到找到这个文件。
+                        'view'  => 'widgets/header.php',
+                        'cache' => [
+                            'enable'     => false,
+                            'timeout'    => 4500,
+                        ],
+                    ],
+                    'topsearch' => [
+                        'view'  => 'widgets/topsearch.php',
+                    ],
+                    'menu' => [
+                        'class' => 'fecshop\app\appfront\widgets\Menu',
+                        // 根据多模板的优先级,依次去模板找查找该文件,直到找到这个文件。
+                        'view'  => 'widgets/menu.php',
+                        'cache' => [
+                            'enable'    => false,
+                            //'timeout' 	=> 4500,
+                        ],
+                    ],
+                    'footer' => [
+                        'class' => 'fecshop\app\appfront\widgets\Footer',
+                        // 根据多模板的优先级,依次去模板找查找该文件,直到找到这个文件。
+                        'view'  => 'widgets/footer.php',
+                        'cache' => [
+                            'enable'    => false,
+                            //'timeout' 	=> 4500,
+                        ],
+                    ],
+                    'scroll' => [
+                        //'class' => 'fecshop\app\appfront\modules\Cms\block\widgets\Scroll',
+                        // 根据多模板的优先级,依次去模板找查找该文件,直到找到这个文件。
+                        'view'  => 'widgets/scroll.php',
+                    ],
+                    'breadcrumbs' => [
+                        'view'  => 'widgets/breadcrumbs.php',
+                    ],
+                    'flashmessage' => [
+                        'view'  => 'widgets/flashmessage.php',
+                    ],
+                    'trace' => [
+                        'view'  => 'widgets/trace.php',
+                    ],
+                    'beforeContent' => [
+                        'view'  => 'widgets/beforeContent.php',
+                    ],
+                    'swiper' => [
+                        //'class' => 'fecshop\app\appfront\modules\Cms\block\widgets\Scroll',
+                        // 根据多模板的优先级,依次去模板找查找该文件,直到找到这个文件。
+                        'view'  => 'widgets/swiper.php',
+                    ],
+                    'menuLeft' => [
+                        'class' => 'fecshop\app\appfront\widgets\Menu',
+                        // 根据多模板的优先级,依次去模板找查找该文件,直到找到这个文件。
+                        'view'  => 'widgets/menuLeft.php',
+                        'cache' => [
+                            'enable'    => false,
+                            //'timeout' 	=> 4500,
+                        ],
+                    ],
+                ],
+            ],
+
+        ],
+    ],
+];

+ 32 - 0
appfront/config/fecshop_local_services/Payment.php

@@ -0,0 +1,32 @@
+<?php
+/**
+ * FecShop file.
+ * @link http://www.fecshop.com/
+ * @copyright Copyright (c) 2016 FecShop Software LLC
+ * @license http://www.fecshop.com/license/
+ */
+return [
+    'payment' => [
+        'childService' => [
+            'alipay' => [
+                'devide'        => 'pc' ,  // 填写pc或者wap,pc代表pc机浏览器支付类型,wap代表手机浏览器支付类型 
+            ],
+        ],
+        'paymentConfig' => [        // 支付方式配置
+            'standard' => [            // 标准支付类型:在购物车页面进入下单页面,填写支付信息,然后跳转到第三方支付网站的支付类型。
+                
+                'wxpay_standard' => [
+                    'label'=> '微信支付',
+                    // 跳转开始URL
+                    'start_url'             => '@homeUrl/payment/wxpay/standard/start',
+                    // 支付完成后,跳转的地址。
+                    'return_url'            => '@homeUrl/payment/wxpay/standard/review',
+                    // 微信发送消息,接收的地址。
+                    'ipn_url'               => '@homeUrl/payment/wxpay/standard/ipn',
+                    'success_redirect_url'  => '@homeUrl/payment/success',
+                ], 
+            ],
+            
+        ],
+    ],
+];

+ 16 - 0
appfront/config/fecshop_local_services/Search.php

@@ -0,0 +1,16 @@
+<?php
+/**
+ * FecShop file.
+ *
+ * @link http://www.fecshop.com/
+ *
+ * @copyright Copyright (c) 2016 FecShop Software LLC
+ * @license http://www.fecshop.com/license/
+ */
+return [
+    'search' => [
+        'filterAttr' => [
+            'color', 'size', // 在搜索页面侧栏的搜索过滤属性字段
+        ],
+    ],
+];

+ 164 - 0
appfront/config/fecshop_local_services/Store.php

@@ -0,0 +1,164 @@
+<?php
+   return [
+   'store' => [
+        'class'  => '\common\local\local_services\Store',
+        'stores' => [
+            // store key:域名去掉http部分,作为key,这个必须这样定义。
+            'appfront.fecshoptest.com' => [
+                'language'         => 'en_US',        // 语言简码需要在@common/config/fecshop_local_services/FecshopLang.php 中定义。
+                'languageName'     => 'English',    // 语言简码对应的文字名称,将会出现在语言切换列表中显示。
+                'localThemeDir'    => '@appfront/theme/terry/theme01', // 设置当前store对应的模板路径。关于多模板的方面的知识,您可以参看fecshop多模板的知识。
+                'thirdThemeDir'    => [ // 第三方模板路径,数组,可以多个路径
+
+                ],  
+                'currency'         => 'USD', // 当前store的默认货币,这个货币简码,必须在货币配置中配置
+                /*
+                 * 当设备满足什么条件的时候,进行跳转。
+                 * 这种方式不怎么高效,最好的方式是在nginx中配置。
+                 */
+                'mobile'        => [
+                    'enable'            => true,
+                    'condition'         => ['phone', 'tablet'], // phone 代表手机,tablet代表平板,当都填写,代表手机和平板都会进行跳转
+                    'redirectDomain'    => 'demo.fancyecommerce.com',    // 如果是移动设备访问进行域名跳转,这里填写的值为store key
+                    'https'             => false,  // 手机端url是否支持https,如果支持,设置https为true,如果不支持,设置为false
+                    'type'              => 'appserver',  //  填写值选择:[apphtml5, appserver],如果是 apphtml5 , 则表示跳转到html5入口,如果是appserver,则表示跳转到vue这种appserver对应的入口
+                ],
+                // 第三方账号登录配置
+                'thirdLogin' => [
+                    // facebook账号登录
+                    'facebook' => [       //fb api配置 ,fb可以一个app设置pc和手机web两个域名
+                        'facebook_app_id'     => '108618299786621',
+                        'facebook_app_secret' => '420b56da4f4664a4d1065a1d31e5ec73',
+                    ],
+                    // google账号登录
+                    'google' => [       //谷歌api visit https://code.google.com/apis/console to generate your google api
+                        'CLIENT_ID'      => '380372364773-qdj1seag9bh2n0pgrhcv2r5uoc58ltp3.apps.googleusercontent.com',
+                        'CLIENT_SECRET'  => 'ei8RaoCDoAlIeh1nHYm0rrwO',
+                    ],
+                ],
+                // 用于sitemap生成中域名。
+                'https'            => true,
+                // sitemap的路径。
+                'sitemapDir' => '@appfront/web/sitemap.xml',
+            ],
+            'fecshop.appfront.fancyecommerce.com/fr' => [
+                'language'         => 'fr_FR',
+                'languageName'     => 'Français',
+                'localThemeDir'    => '@appfront/theme/terry/theme01',
+                'thirdThemeDir'    => [ // 第三方模板路径,数组,可以多个路径
+                    '@fecshop/theme/rosegal/appfront/theme/rosegal',
+                ], 
+                'currency'         => 'RMB',
+                'mobile'           => [
+                    'enable'               => true,
+                    'condition'            => ['phone'], // phone 代表手机,tablet代表平板。
+                    'redirectDomain'       => 'fecshop.apphtml5.fancyecommerce.com/fr', // 跳转后的url。
+                    'https'             => false,  // 手机端url是否支持https,如果支持,设置https为true,如果不支持,设置为false
+                    'type'              => 'apphtml5',  //  填写值选择:[apphtml5, appserver],如果是 apphtml5 , 则表示跳转到html5入口,如果是appserver,则表示跳转到vue这种appserver对应的入口
+                ],
+                // 第三方账号登录配置
+                'thirdLogin' => [
+                    // facebook账号登录
+                    'facebook' => [       //fb api配置 ,fb可以一个app设置pc和手机web两个域名
+                        'facebook_app_id'     => '108618299786621',
+                        'facebook_app_secret' => '420b56da4f4664a4d1065a1d31e5ec73',
+                    ],
+                    // google账号登录
+                    'google' => [       //谷歌api visit https://code.google.com/apis/console to generate your google api
+                        'CLIENT_ID'      => '380372364773-qdj1seag9bh2n0pgrhcv2r5uoc58ltp3.apps.googleusercontent.com',
+                        'CLIENT_SECRET'  => 'ei8RaoCDoAlIeh1nHYm0rrwO',
+                    ],
+                ],
+                'sitemapDir' => '@appfront/web/fr/sitemap.xml',
+            ],
+            'fecshop.appfront.es.fancyecommerce.com' => [
+                'language'         => 'es_ES',
+                'languageName'     => 'Español',
+                'localThemeDir'    => '@appfront/theme/terry/theme01',
+                'thirdThemeDir'    => ['@fectfurnilife/appfront/theme/furnilife',],
+                'currency'         => 'USD',
+                'mobile'           => [
+                    'enable'            => false,
+                    'condition'         => ['tablet'],
+                    'redirectDomain'    => 'fecshop.apphtml5.es.fancyecommerce.com',
+                    'https'             => false,  // 手机端url是否支持https,如果支持,设置https为true,如果不支持,设置为false
+                    'type'              => 'apphtml5',  //  填写值选择:[apphtml5, appserver],如果是 apphtml5 , 则表示跳转到html5入口,如果是appserver,则表示跳转到vue这种appserver对应的入口
+                ],
+                // 第三方账号登录配置
+                'thirdLogin' => [
+                    // facebook账号登录
+                    'facebook' => [       //fb api配置 ,fb可以一个app设置pc和手机web两个域名
+                        'facebook_app_id'     => '108618299786621',
+                        'facebook_app_secret' => '420b56da4f4664a4d1065a1d31e5ec73',
+                    ],
+                    // google账号登录
+                    'google' => [       //谷歌api visit https://code.google.com/apis/console to generate your google api
+                        'CLIENT_ID'      => '380372364773-qdj1seag9bh2n0pgrhcv2r5uoc58ltp3.apps.googleusercontent.com',
+                        'CLIENT_SECRET'  => 'ei8RaoCDoAlIeh1nHYm0rrwO',
+                    ],
+                ],
+                'sitemapDir' => '@appfront/web/sitemap_es.xml',
+            ],
+            'fecshop.appfront.fancyecommerce.com/cn' => [
+                'language'         => 'zh_CN',
+                'languageName'     => '中文',
+                'localThemeDir'    => '@appfront/theme/terry/theme01',
+                'thirdThemeDir'    => [],
+                'currency'         => 'CNY',
+                'mobile'        => [
+                    'enable'            => true,
+                    'condition'         => ['phone', 'tablet'], // phone 代表手机,tablet代表平板,当都填写,代表手机和平板都会进行跳转
+                    'redirectDomain'    => 'demo.fancyecommerce.com',    // 如果是移动设备访问进行域名跳转,这里填写的值为store key
+                    'https'             => false,  // 手机端url是否支持https,如果支持,设置https为true,如果不支持,设置为false
+                    'type'              => 'appserver',  //  填写值选择:[apphtml5, appserver],如果是 apphtml5 , 则表示跳转到html5入口,如果是appserver,则表示跳转到vue这种appserver对应的入口
+                ],
+                // 第三方账号登录配置
+                'thirdLogin' => [
+                    // facebook账号登录
+                    'facebook' => [       //fb api配置 ,fb可以一个app设置pc和手机web两个域名
+                        'facebook_app_id'     => '108618299786621',
+                        'facebook_app_secret' => '420b56da4f4664a4d1065a1d31e5ec73',
+                    ],
+                    // google账号登录
+                    'google' => [       //谷歌api visit https://code.google.com/apis/console to generate your google api
+                        'CLIENT_ID'      => '380372364773-qdj1seag9bh2n0pgrhcv2r5uoc58ltp3.apps.googleusercontent.com',
+                        'CLIENT_SECRET'  => 'ei8RaoCDoAlIeh1nHYm0rrwO',
+                    ],
+                ],
+                'sitemapDir' => '@appfront/web/cn/sitemap.xml',
+            ],
+            
+            
+            'fecshop.appfront.fancyecommerce.com/it' => [
+                'language'         => 'it_IT',  
+                'languageName'     => 'Italiano',
+                'localThemeDir'    => '@appfront/theme/terry/theme01',
+                'thirdThemeDir'    => [],
+                'currency'         => 'RMB',
+                'mobile'           => [
+                    'enable'               => false,
+                    'condition'            => ['phone'], // phone 代表手机,tablet代表平板。
+                    'redirectDomain'       => 'fecshop.apphtml5.fancyecommerce.com/it', // 跳转后的url。
+                    'https'             => false,  // 手机端url是否支持https,如果支持,设置https为true,如果不支持,设置为false
+                    'type'              => 'apphtml5',  //  填写值选择:[apphtml5, appserver],如果是 apphtml5 , 则表示跳转到html5入口,如果是appserver,则表示跳转到vue这种appserver对应的入口
+                ],
+                // 第三方账号登录配置
+                'thirdLogin' => [
+                    // facebook账号登录
+                    'facebook' => [       //fb api配置 ,fb可以一个app设置pc和手机web两个域名
+                        'facebook_app_id'     => '108618299786621',
+                        'facebook_app_secret' => '420b56da4f4664a4d1065a1d31e5ec73',
+                    ],
+                    // google账号登录
+                    'google' => [       //谷歌api visit https://code.google.com/apis/console to generate your google api
+                        'CLIENT_ID'      => '380372364773-qdj1seag9bh2n0pgrhcv2r5uoc58ltp3.apps.googleusercontent.com',
+                        'CLIENT_SECRET'  => 'ei8RaoCDoAlIeh1nHYm0rrwO',
+                    ],
+                ],
+                'sitemapDir' => '@appfront/web/it/sitemap.xml',
+            ],
+        ],
+
+    ],
+
+];

+ 14 - 0
appfront/config/fecshop_local_services/Url.php

@@ -0,0 +1,14 @@
+<?php
+/**
+ * FecShop file.
+ *
+ * @link http://www.fecshop.com/
+ *
+ * @copyright Copyright (c) 2016 FecShop Software LLC
+ * @license http://www.fecshop.com/license/
+ */
+return [
+    'url' => [
+        'showScriptName'=> false, // if is show index.php in url.  if set false ,you must config nginx rewrite
+    ],
+];

+ 31 - 0
appfront/config/fecshop_third.php

@@ -0,0 +1,31 @@
+<?php
+/**
+ * FecShop file.
+ * @link http://www.fecshop.com/
+ * @copyright Copyright (c) 2016 FecShop Software LLC
+ * @license http://www.fecshop.com/license/
+ */
+
+/**
+ * 本文件在app/web/index.php 处引入。
+ * 本配置文件为第三方插件库包的配置文件
+ */
+$third_config = [];
+$current_app_name = 'appfront';
+$third_config_file = glob(__DIR__.'/../../common/config/fecshop_third_extensions/*.php');
+if (is_array($third_config_file) && !empty($third_config_file)) {
+    sort($third_config_file);
+    foreach ($third_config_file as $filename) {
+        $c = require($filename);
+        $extension_enable = isset($c['enable']) ? $c['enable'] : false;
+        if ($extension_enable) {
+            $curr_config = isset($c['app'][$current_app_name]) ? $c['app'][$current_app_name] : false;
+            $app_enable = isset($curr_config['enable']) ? $curr_config['enable'] : false;
+            $app_config = isset($curr_config['config']) ? $curr_config['config'] : false;
+            if ($app_enable && is_array($app_config) && !empty($app_config)) {
+                $third_config = array_merge($third_config, $app_config);
+            }
+        }
+    }
+}
+return $third_config;

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 95 - 0
appfront/config/main.php


+ 0 - 0
appfront/config/params.php


Vissa filer visades inte eftersom för många filer har ändrats