index.html 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. <cm-construct v-bind:data="data[index]" class="coupon-wrap">
  2. <!-- 预览 -->
  3. <template slot="preview">
  4. <div class="preview-box" v-bind:style="{ backgroundColor : nc.backgroundColor, margin: nc.marginTop + 'px 15px 0' }">
  5. <div class="coupon-preview">
  6. <div class="coupon-box coupon-box-1" v-if="nc.style == 1">
  7. <div class="coupon-box-list">
  8. <div class="coupon">
  9. <img src="{$resourceurl}/coupon/img/style1-bg.png">
  10. <div class="coupon-intro">
  11. <p class="coupon-price">¥<span>500</span></p>
  12. <p class="coupon-desc">满3000可用</p>
  13. </div>
  14. </div>
  15. <div class="coupon" v-if="nc.couponCount>1">
  16. <img src="{$resourceurl}/coupon/img/style1-bg.png">
  17. <div class="coupon-intro">
  18. <p class="coupon-price">¥<span>500</span></p>
  19. <p class="coupon-desc">满3000可用</p>
  20. </div>
  21. </div>
  22. <div class="coupon" v-if="nc.couponCount>2">
  23. <img src="{$resourceurl}/coupon/img/style1-bg.png">
  24. <div class="coupon-intro">
  25. <p class="coupon-price">¥<span>500</span></p>
  26. <p class="coupon-desc">满3000可用</p>
  27. </div>
  28. </div>
  29. <div class="coupon" v-if="nc.couponCount>3">
  30. <img src="{$resourceurl}/coupon/img/style1-bg.png">
  31. <div class="coupon-intro">
  32. <p class="coupon-price">¥<span>500</span></p>
  33. <p class="coupon-desc">满3000可用</p>
  34. </div>
  35. </div>
  36. </div>
  37. </div>
  38. <div class="coupon-box coupon-box-2" v-else-if="nc.style == 2">
  39. <div class="coupon-box-list">
  40. <div class="coupon">
  41. <img src="{$resourceurl}/coupon/img/coupon_bg.png">
  42. <div class="coupon-intro">
  43. <p class="coupon-price ns-red-color">¥<span>500.00</span></p>
  44. <p class="coupon-desc ns-red-color">满3000元可用</p>
  45. </div>
  46. <div class="coupon-btn ns-red-color">领取</div>
  47. </div>
  48. <div class="coupon" v-if="nc.couponCount>1">
  49. <img src="{$resourceurl}/coupon/img/coupon_bg.png">
  50. <div class="coupon-intro">
  51. <p class="coupon-price ns-red-color">¥<span>500.00</span></p>
  52. <p class="coupon-desc ns-red-color">满3000元可用</p>
  53. </div>
  54. <div class="coupon-btn ns-red-color">领取</div>
  55. </div>
  56. <div class="coupon" v-if="nc.couponCount>2">
  57. <img src="{$resourceurl}/coupon/img/coupon_bg.png">
  58. <div class="coupon-intro">
  59. <p class="coupon-price ns-red-color">¥<span>500.00</span></p>
  60. <p class="coupon-desc ns-red-color">满3000元可用</p>
  61. </div>
  62. <div class="coupon-btn ns-red-color">领取</div>
  63. </div>
  64. </div>
  65. </div>
  66. <div class="coupon-box" v-bind:class="'coupon-box-'+ nc.style" v-if="nc.style == 3">
  67. <div class="coupon-block">
  68. <div class="coupon">
  69. <img src="{$resourceurl}/coupon/img/style3-bg-2.png">
  70. <div class="coupon-intro">
  71. <p class="coupon-price ns-red-color">¥<span>500.00</span></p>
  72. <p class="coupon-desc ns-red-color">满3000元可用</p>
  73. <p class="coupon-info">指定商品可用</p>
  74. </div>
  75. <div class="coupon-btn">立即抢</div>
  76. </div>
  77. <div class="coupon" v-if="nc.couponCount>1">
  78. <img src="{$resourceurl}/coupon/img/style3-bg-2.png">
  79. <div class="coupon-intro">
  80. <p class="coupon-price ns-red-color">¥<span>500.00</span></p>
  81. <p class="coupon-desc ns-red-color">满3000元可用</p>
  82. <p class="coupon-info">指定商品可用</p>
  83. </div>
  84. <div class="coupon-btn">立即抢</div>
  85. </div>
  86. <div class="coupon" v-if="nc.couponCount>2">
  87. <img src="{$resourceurl}/coupon/img/style3-bg-2.png">
  88. <div class="coupon-intro">
  89. <p class="coupon-price ns-red-color">¥<span>500.00</span></p>
  90. <p class="coupon-desc ns-red-color">满3000元可用</p>
  91. <p class="coupon-info">指定商品可用</p>
  92. </div>
  93. <div class="coupon-btn">立即抢</div>
  94. </div>
  95. </div>
  96. </div>
  97. </div>
  98. </div>
  99. </template>
  100. <!-- 编辑 -->
  101. <template slot="edit">
  102. <template v-if="nc.lazyLoad">
  103. <coupon-style></coupon-style>
  104. <coupon-list></coupon-list>
  105. </template>
  106. <slide v-bind:data="{ field : 'marginTop', label : '页面间距' }"></slide>
  107. <!-- 弹框 -->
  108. <div class="coupon-list-style">
  109. <div class="style-list-coupon layui-form">
  110. <div class="style-list-con-coupon">
  111. <div class="style-li-coupon" v-bind:class="{'selected ns-border-color': nc.style == 1}">
  112. <img src="{$resourceurl}/coupon/img/style1.png" />
  113. <span class="layui-hide">风格一</span>
  114. </div>
  115. <div class="style-li-coupon" v-bind:class="{'selected ns-border-color': nc.style == 2}">
  116. <img src="{$resourceurl}/coupon/img/style2.png" />
  117. <span class="layui-hide">风格二</span>
  118. </div>
  119. <div class="style-li-coupon" v-bind:class="{'selected ns-border-color': nc.style == 3}">
  120. <img src="{$resourceurl}/coupon/img/style3.png" />
  121. <span class="layui-hide">风格三</span>
  122. </div>
  123. </div>
  124. <input type="hidden" name="style">
  125. <input type="hidden" name="style_name">
  126. </div>
  127. </div>
  128. </template>
  129. <!-- 资源 -->
  130. <template slot="resource">
  131. <js>
  132. var couponResourcePath = "{$resourceurl}";
  133. </js>
  134. <css src="{$resourceurl}/coupon/css/style.css"></css>
  135. <js src="{$resourceurl}/coupon/js/style.js"></js>
  136. </template>
  137. </cm-construct>