index.html 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. <cm-construct v-bind:data="data[index]" class="goods-list">
  2. <!-- 预览 -->
  3. <template slot="preview">
  4. <div class="goods-list-preview" v-bind:style="{ backgroundColor : nc.backgroundColor, margin: (nc.marginTop + 'px 15px 0 15px') }">
  5. <!-- 单列小图 -->
  6. <div class="goods-list single-column" v-if="nc.style == 1">
  7. <div class="goods-wrap margin-bottom" v-for="(item, index) in [0,1,2,3]" :key="index">
  8. <div class="goods-item">
  9. <div class="goods-img">
  10. <img src="/static/images/diy/crack_figure.png">
  11. <div class="goods-tag" v-show="nc.goodsTag == 'default'">爆款</div>
  12. <div class="goods-tag-img" v-show="nc.goodsTag == 'diy'">
  13. <div v-if="nc.tagImg.imageUrl == '' " class="tag-wrap">角标区域</div>
  14. <img v-else :src="changeImgUrl(nc.tagImg.imageUrl)">
  15. </div>
  16. </div>
  17. <div class="info-wrap">
  18. <div class="name-wrap">
  19. <div class="goods-name">商品名称</div>
  20. <div class="goods-desc">商品描述</div>
  21. <div class="goods-time">仅剩08:08:08</div>
  22. <div class="goods-sale">
  23. <div>
  24. <span>已售100</span>
  25. <span class="goods-sale-bg">仅剩10</span>
  26. </div>
  27. </div>
  28. </div>
  29. <div class="lineheight-clear price-wrap">
  30. <div class="discount-price">
  31. <span class="unit">¥25</span>
  32. <span class="price">.69</span>
  33. </div>
  34. <div class="delete-price"><span class="unit">¥</span>15.99</div>
  35. </div>
  36. </div>
  37. </div>
  38. <div class="presale-time">
  39. <div>预售时间:2021-03-08</div>
  40. <div>提货时间:2021-03-20</div>
  41. </div>
  42. </div>
  43. </div>
  44. <!-- 单列大图 -->
  45. <div class="goods-list single-column-s2" v-if="nc.style == 2">
  46. <div class="goods-wrap margin-bottom" v-for="(item, index) in [0,1]" :key="index">
  47. <div class="goods-item">
  48. <div class="goods-img">
  49. <img src="/static/images/diy/crack_figure.png">
  50. <div class="goods-tag" v-show="nc.goodsTag == 'default'">爆款</div>
  51. <div class="goods-tag-img" v-show="nc.goodsTag == 'diy'">
  52. <div v-if="nc.tagImg.imageUrl == '' " class="tag-wrap">角标区域</div>
  53. <img v-else :src="changeImgUrl(nc.tagImg.imageUrl)">
  54. </div>
  55. <div class="goods-time">仅剩08:08:08</div>
  56. </div>
  57. <div class="info-wrap">
  58. <div class="name-wrap">
  59. <div class="goods-name">商品名称</div>
  60. <div class="goods-desc">商品描述</div>
  61. <div class="presale-time">
  62. <div>预售时间:2021-03-08</div>
  63. <div>提货时间:2021-03-20</div>
  64. </div>
  65. </div>
  66. <div class="lineheight-clear price-wrap">
  67. <div class="discount-price">
  68. <span class="unit">¥25</span>
  69. <span class="price">.69</span>
  70. </div>
  71. <div class="delete-price"><span class="unit">¥</span>15.99</div>
  72. </div>
  73. <div class="goods-sale">
  74. <div>
  75. <span>已售100</span>
  76. <span class="goods-sale-bg">仅剩10</span>
  77. </div>
  78. </div>
  79. </div>
  80. </div>
  81. </div>
  82. </div>
  83. <!-- 三列 -->
  84. <div class="goods-list three-column" v-if="nc.style == 3">
  85. <div class="goods-wrap margin-bottom" v-for="(item, index) in [0,1,2,3,4,5,6,7,8]" :key="index">
  86. <div class="goods-item">
  87. <div class="goods-img">
  88. <img src="/static/images/diy/crack_figure.png">
  89. <div class="goods-tag" v-show="nc.goodsTag == 'default'">爆款</div>
  90. <div class="goods-tag-img" v-show="nc.goodsTag == 'diy'">
  91. <div v-if="nc.tagImg.imageUrl == '' " class="tag-wrap">角标区域</div>
  92. <img v-else :src="changeImgUrl(nc.tagImg.imageUrl)">
  93. </div>
  94. </div>
  95. <div class="info-wrap">
  96. <div class="name-wrap">
  97. <div class="goods-name">商品名称</div>
  98. </div>
  99. <div class="lineheight-clear price-wrap">
  100. <div class="discount-price">
  101. <span class="unit">¥25</span>
  102. <span class="price">.69</span>
  103. </div>
  104. </div>
  105. </div>
  106. </div>
  107. </div>
  108. </div>
  109. <!-- 两列大图 -->
  110. <div class="goods-list double-column" v-if="nc.style == 4">
  111. <div class="goods-wrap margin-bottom" v-for="(item, index) in [0,1,2,3]" :key="index">
  112. <div class="goods-item">
  113. <div class="goods-img">
  114. <img src="/static/images/diy/crack_figure.png">
  115. <div class="goods-tag" v-show="nc.goodsTag == 'default'">爆款</div>
  116. <div class="goods-tag-img" v-show="nc.goodsTag == 'diy'">
  117. <div v-if="nc.tagImg.imageUrl == '' " class="tag-wrap">角标区域</div>
  118. <img v-else :src="changeImgUrl(nc.tagImg.imageUrl)">
  119. </div>
  120. </div>
  121. <div class="info-wrap">
  122. <div class="name-wrap">
  123. <div class="goods-name">商品名称</div>
  124. </div>
  125. <div class="lineheight-clear price-wrap">
  126. <div class="discount-price">
  127. <span class="unit">¥25</span>
  128. <span class="price">.69</span>
  129. </div>
  130. <div class="delete-price"><span class="unit">¥</span>15.99</div>
  131. </div>
  132. </div>
  133. </div>
  134. </div>
  135. </div>
  136. </div>
  137. </template>
  138. <!-- 编辑 -->
  139. <template slot="edit">
  140. <template v-if="nc.lazyLoad">
  141. <goods-list-style></goods-list-style>
  142. </template>
  143. <template v-if="nc.lazyLoad">
  144. <goods-list></goods-list>
  145. </template>
  146. <template v-if="nc.lazyLoad">
  147. <goods-tag-style></goods-tag-style>
  148. </template>
  149. <div class="template-edit-title"><h3>其他设置</h3></div>
  150. <color v-bind:data="{ field : 'backgroundColor', 'label' : '背景颜色' }"></color>
  151. <slide v-bind:data="{ field : 'marginTop', label : '页面间距' }"></slide>
  152. <!-- 商品列表风格弹框 -->
  153. <div class="goods-list-style">
  154. <div class="style-list-goods layui-form">
  155. <div class="style-list-con-goods">
  156. <div class="style-li-goods" v-bind:class="{'selected ns-border-color': nc.style == 1}">
  157. <img src="{$resourceurl}/goods_list/img/style1.png" />
  158. </div>
  159. <div class="style-li-goods" v-bind:class="{'selected ns-border-color': nc.style == 2}">
  160. <img src="{$resourceurl}/goods_list/img/style2.png" />
  161. </div>
  162. <div class="style-li-goods" v-bind:class="{'selected ns-border-color': nc.style == 3}">
  163. <img src="{$resourceurl}/goods_list/img/style3.png" />
  164. </div>
  165. <div class="style-li-goods" v-bind:class="{'selected ns-border-color': nc.style == 4}">
  166. <img src="{$resourceurl}/goods_list/img/style4.png" />
  167. </div>
  168. </div>
  169. <input type="hidden" name="style">
  170. </div>
  171. </div>
  172. <!-- 商品分类选择弹框 -->
  173. <div class="goods-category-layer">
  174. <notempty name="goods_category_list">
  175. <div class="category-head">分类名称</div>
  176. <div class="category-wrap">
  177. <foreach name="goods_category_list" item="vo">
  178. <div class="category-item" data-id="{$vo.id}">{$vo.name}</div>
  179. </foreach>
  180. </div>
  181. </notempty>
  182. </div>
  183. </template>
  184. <!-- 资源 -->
  185. <template slot="resource">
  186. <js>
  187. var goodsListResourcePath = "{$resourceurl}";
  188. </js>
  189. <css src="{$resourceurl}/goods_list/css/style.css"></css>
  190. <js src="{$resourceurl}/goods_list/js/style.js"></js>
  191. </template>
  192. </cm-construct>