Page.php 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. <?php
  2. /**
  3. * FecShop file.
  4. *
  5. * @link http://www.fecshop.com/
  6. *
  7. * @copyright Copyright (c) 2016 FecShop Software LLC
  8. * @license http://www.fecshop.com/license/
  9. */
  10. return [
  11. 'page' => [
  12. 'childService' => [
  13. //'widget' => [
  14. //],
  15. 'asset' => [
  16. 'class' => 'fecshop\services\page\Asset',
  17. // 在js后面加一个v参数,修改js后,更改v参数,否则,浏览器会使用缓存。
  18. // /assets/dbdba3fa/js/js.js?v=2
  19. 'jsVersion' => 2,
  20. 'cssVersion' => 2,
  21. /**
  22. * @var string the root directory string the published asset files.
  23. * 设置: js和css的发布路径
  24. * 譬如设置为:'@appimage/assets',也可以将 @appimage 换成绝对路径
  25. */
  26. 'basePath' => '@webroot/assets',
  27. /**
  28. * @var string the base URL through which the published asset files can be accessed.
  29. * 设置: js和css的URL路径
  30. * 可以将 @web 换成域名 , 譬如 `http:://www/fecshop.com/assets`
  31. * 这样就可以将js和css文件使用独立的域名了【把域名对应的地址对应到$basePath】。
  32. */
  33. 'baseUrl' => '@web/assets',
  34. // 是否每次访问都强制复制css js img等文件到发布地址,true代表每次访问都发布
  35. // 一般开发环境用true,线上用false。当线上更新jscss文件,可以清空assets发布路径下的文件的方式来更新
  36. 'forceCopy' => true,
  37. // js and css config example:
  38. /**
  39. * 'jsOptions' => [
  40. * # js config 1
  41. * [
  42. * 'options' => [
  43. * 'position' => 'POS_END',
  44. * // 'condition'=> 'lt IE 9',
  45. * ],
  46. * 'js' =>[
  47. * 'js/my.js',
  48. * ],
  49. * ],
  50. * # js config 2
  51. * //[
  52. * // 'options' => [
  53. * // 'condition'=> 'lt IE 9',
  54. * // ],
  55. * // 'js' =>[
  56. * // 'js/ie9js.js'
  57. * // ],
  58. * //],
  59. * ],
  60. * # css config
  61. * 'cssOptions' => [
  62. * # css config 1.
  63. * [
  64. * 'css' =>[
  65. * 'css/my.css',
  66. * ],
  67. * ],
  68. *
  69. * # css config 2.
  70. * //[
  71. * // 'options' => [
  72. * // 'condition'=> 'lt IE 9',
  73. * // ],
  74. * // 'css' =>[
  75. * // 'css/ltie9.css',
  76. * // ],
  77. * //],
  78. * ],
  79. **/
  80. ],
  81. 'menu' => [
  82. 'displayHome' => [
  83. 'enable' => true, // 是否在菜单中显示home
  84. 'display'=> 'Home', // 显示对应的字符。
  85. ],
  86. /*
  87. * 在菜单前面部分(产品分类菜单的前面部分)的自定义菜单。参考behindCustomMenu里面的格式
  88. */
  89. 'frontCustomMenu' => [
  90. ],
  91. /*
  92. * 在菜单后面部分(产品分类菜单的前面部分)的自定义菜单
  93. */
  94. 'behindCustomMenu' => [
  95. [
  96. 'name' => 'custom menu', // 菜单名字
  97. 'urlPath' => '/my-custom-menu.html', // 菜单对应的url
  98. 'childMenu' => [ // 子菜单
  99. [
  100. 'name' => 'my custom menu 2',
  101. 'urlPath' => '/my-custom-menu-2.html',
  102. ],
  103. [
  104. 'name' => 'my custom menu 3',
  105. 'urlPath' => '/my-custom-menu-2.html',
  106. 'childMenu' => [
  107. [
  108. 'name' => 'my custom menu 3',
  109. 'urlPath' => '/my-custom-menu-2.html',
  110. ],
  111. [
  112. 'name' => 'my custom menu 3',
  113. 'urlPath' => '/my-custom-menu-2.html',
  114. ],
  115. ],
  116. ],
  117. ],
  118. ],
  119. ],
  120. ],
  121. 'widget' => [
  122. 'widgetConfig' => [
  123. 'head' => [
  124. // 动态数据提供部分
  125. 'class' => 'fecshop\app\appfront\widgets\Head',
  126. // 根据多模板的优先级,依次去模板找查找该文件,直到找到这个文件。
  127. 'view' => 'widgets/head.php',
  128. // 缓存
  129. 'cache' => [
  130. 'enable' => false, // 是否开启
  131. 'timeout' => 4500, // 缓存过期时间
  132. ],
  133. ],
  134. 'header' => [
  135. 'class' => 'fecshop\app\appfront\widgets\Headers',
  136. // 根据多模板的优先级,依次去模板找查找该文件,直到找到这个文件。
  137. 'view' => 'widgets/header.php',
  138. 'cache' => [
  139. 'enable' => false,
  140. 'timeout' => 4500,
  141. ],
  142. ],
  143. 'topsearch' => [
  144. 'view' => 'widgets/topsearch.php',
  145. ],
  146. 'menu' => [
  147. 'class' => 'fecshop\app\appfront\widgets\Menu',
  148. // 根据多模板的优先级,依次去模板找查找该文件,直到找到这个文件。
  149. 'view' => 'widgets/menu.php',
  150. 'cache' => [
  151. 'enable' => false,
  152. //'timeout' => 4500,
  153. ],
  154. ],
  155. 'footer' => [
  156. 'class' => 'fecshop\app\appfront\widgets\Footer',
  157. // 根据多模板的优先级,依次去模板找查找该文件,直到找到这个文件。
  158. 'view' => 'widgets/footer.php',
  159. 'cache' => [
  160. 'enable' => false,
  161. //'timeout' => 4500,
  162. ],
  163. ],
  164. 'scroll' => [
  165. //'class' => 'fecshop\app\appfront\modules\Cms\block\widgets\Scroll',
  166. // 根据多模板的优先级,依次去模板找查找该文件,直到找到这个文件。
  167. 'view' => 'widgets/scroll.php',
  168. ],
  169. 'breadcrumbs' => [
  170. 'view' => 'widgets/breadcrumbs.php',
  171. ],
  172. 'flashmessage' => [
  173. 'view' => 'widgets/flashmessage.php',
  174. ],
  175. 'trace' => [
  176. 'view' => 'widgets/trace.php',
  177. ],
  178. 'beforeContent' => [
  179. 'view' => 'widgets/beforeContent.php',
  180. ],
  181. ],
  182. ],
  183. ],
  184. ],
  185. ];