Page.php 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  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. [
  97. 'name' => 'custom menu', // 菜单名字
  98. 'urlPath' => '/my-custom-menu.html', // 菜单对应的url
  99. 'childMenu' => [ // 子菜单
  100. [
  101. 'name' => 'my custom menu 2',
  102. 'urlPath' => '/my-custom-menu-2.html',
  103. ],
  104. [
  105. 'name' => 'my custom menu 3',
  106. 'urlPath' => '/my-custom-menu-2.html',
  107. 'childMenu' => [
  108. [
  109. 'name' => 'my custom menu 3',
  110. 'urlPath' => '/my-custom-menu-2.html',
  111. ],
  112. [
  113. 'name' => 'my custom menu 3',
  114. 'urlPath' => '/my-custom-menu-2.html',
  115. ],
  116. ],
  117. ],
  118. ],
  119. ],*/
  120. ],
  121. ],
  122. 'widget' => [
  123. 'widgetConfig' => [
  124. 'head' => [
  125. // 动态数据提供部分
  126. 'class' => 'fecshop\app\appfront\widgets\Head',
  127. // 根据多模板的优先级,依次去模板找查找该文件,直到找到这个文件。
  128. 'view' => 'widgets/head.php',
  129. // 缓存
  130. 'cache' => [
  131. 'enable' => false, // 是否开启
  132. 'timeout' => 4500, // 缓存过期时间
  133. ],
  134. ],
  135. 'header' => [
  136. 'class' => 'fecshop\app\appfront\widgets\Headers',
  137. // 根据多模板的优先级,依次去模板找查找该文件,直到找到这个文件。
  138. 'view' => 'widgets/header.php',
  139. 'cache' => [
  140. 'enable' => false,
  141. 'timeout' => 4500,
  142. ],
  143. ],
  144. 'topsearch' => [
  145. 'view' => 'widgets/topsearch.php',
  146. ],
  147. 'menu' => [
  148. 'class' => 'fecshop\app\appfront\widgets\Menu',
  149. // 根据多模板的优先级,依次去模板找查找该文件,直到找到这个文件。
  150. 'view' => 'widgets/menu.php',
  151. 'cache' => [
  152. 'enable' => false,
  153. //'timeout' => 4500,
  154. ],
  155. ],
  156. 'footer' => [
  157. 'class' => 'fecshop\app\appfront\widgets\Footer',
  158. // 根据多模板的优先级,依次去模板找查找该文件,直到找到这个文件。
  159. 'view' => 'widgets/footer.php',
  160. 'cache' => [
  161. 'enable' => false,
  162. //'timeout' => 4500,
  163. ],
  164. ],
  165. 'scroll' => [
  166. //'class' => 'fecshop\app\appfront\modules\Cms\block\widgets\Scroll',
  167. // 根据多模板的优先级,依次去模板找查找该文件,直到找到这个文件。
  168. 'view' => 'widgets/scroll.php',
  169. ],
  170. 'breadcrumbs' => [
  171. 'view' => 'widgets/breadcrumbs.php',
  172. ],
  173. 'flashmessage' => [
  174. 'view' => 'widgets/flashmessage.php',
  175. ],
  176. 'trace' => [
  177. 'view' => 'widgets/trace.php',
  178. ],
  179. 'beforeContent' => [
  180. 'view' => 'widgets/beforeContent.php',
  181. ],
  182. ],
  183. ],
  184. ],
  185. ],
  186. ];