Model19.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  1. <template>
  2. <view class="model-19">
  3. <view class="marketing-wrap marketing-wrap-two" :style="{backgroundColor:editablePageConfig.editable_page_config_content.back_color}">
  4. <view class="marketing-box">
  5. <view>
  6. <view class="title title-3" v-if="editablePageConfig.editable_page_config_content['if_show_title_icon']==1" @click="goGroupbuy()">
  7. <view class="title-left">
  8. <image mode="aspectFit" class="img" :src="title_icon">
  9. <!---->
  10. </view>
  11. </view>
  12. </view>
  13. <view class="list-wrap">
  14. <view class="item" v-for="(goods,index) in editablePageConfig.editable_page_config_content.goods_list" :key="index" @click="productClick(goods.goods_id)">
  15. <view class="img-wrap">
  16. <image mode="aspectFit" class="img" :src="goods.goods_image">
  17. <view class="bg">
  18. <image mode="aspectFit" class="img" :src="bgImage">
  19. </view>
  20. <view class="num">已抢{{goods.order_count}}件</view>
  21. </view>
  22. <view class="content">
  23. <view class="content-desc">{{goods.goods_name}}</view>
  24. <view class="content-price">¥
  25. <text class="span">{{parseFloat(goods.goods_promotion_price)}}</text>
  26. </view>
  27. <view class="original-price">¥{{parseFloat(goods.goods_price)}}</view>
  28. </view>
  29. </view>
  30. </view>
  31. </view>
  32. </view>
  33. </view>
  34. </template>
  35. <script>
  36. import { env } from '../../../../static/config'
  37. export default {
  38. name: 'Model19',
  39. data () {
  40. return {
  41. }
  42. },
  43. props: ['editablePageConfig','editablePage'],
  44. computed: {
  45. bgImage(){
  46. return env.SITE_URL+'/static/home/images/editable_page/bg.png'
  47. },
  48. title_icon(){
  49. if(this.editablePageConfig.editable_page_config_content['title_icon']){
  50. return this.editablePageConfig.editable_page_config_content['title_icon']
  51. }else{
  52. return env.SITE_URL+'/static/home/images/editable_page/groupbuy_style3_title.png'
  53. }
  54. }
  55. },
  56. methods: {
  57. productClick(goods_id) {
  58. uni.navigateTo({url: '/pages/home/goodsdetail/Goodsdetail?goods_id='+goods_id })
  59. },
  60. goGroupbuy(){
  61. uni.navigateTo({url:'/pages/home/groupbuy/GroupBuyList'})
  62. }
  63. }
  64. }
  65. </script>
  66. <style lang="scss" scoped>
  67. .model-19 .list-wrap {
  68. display: flex;
  69. justify-content: space-between;
  70. margin-top: 15px;
  71. }
  72. .model-19 .list-wrap .item {
  73. display: inline-block;
  74. width: 100px;
  75. }
  76. .model-19 .list-wrap .item .img-wrap{
  77. width: 100px;
  78. height: 100px;
  79. border-radius: 5px;
  80. overflow: hidden;
  81. }
  82. .model-19 .list-wrap .item .img-wrap .img{
  83. max-width: 100%;
  84. max-height: 100%;
  85. }
  86. .model-19 .list-wrap .item .content{
  87. width: 100%;
  88. }
  89. .model-19 .list-wrap .item .content .content-desc {
  90. width: 100%;
  91. font-size: 14px;
  92. line-height: 14px;
  93. margin-top: 10px;
  94. white-space: nowrap;
  95. text-overflow: ellipsis;
  96. overflow: hidden;
  97. }
  98. .model-19 .list-wrap .item .content .content-price {
  99. font-size: 12px;
  100. color: #FF4544;
  101. margin-top: 10px;
  102. height: 16px;
  103. font-weight: 600;
  104. }
  105. .model-19 .list-wrap .item .content .content-price .span {
  106. font-size: 16px;
  107. line-height: 16px;
  108. }
  109. .model-19 .list-wrap .item .content .content-num {
  110. font-size: 12px;
  111. line-height: 12px;
  112. margin-top: 10px;
  113. color: #909399;
  114. text-decoration: line-through;
  115. }
  116. .model-19 .marketing-wrap-two {
  117. padding: 20px 15px;
  118. box-sizing: border-box;
  119. background-color: #FFFFFF;
  120. border-radius: 5px;
  121. position: relative;
  122. /* height: 255px;
  123. */
  124. }
  125. .model-19 .marketing-wrap-two .marketing-box {
  126. position: unset;
  127. padding: 0;
  128. }
  129. .model-19 .marketing-wrap-two .marketing-box .title {
  130. display: flex;
  131. justify-content: space-between;
  132. align-items: center;
  133. padding-bottom: 5px;
  134. }
  135. .model-19 .marketing-wrap-two .marketing-box .title .title-left {
  136. width: 131px;
  137. height: 37px;
  138. line-height: 37px;
  139. }
  140. .model-19 .marketing-wrap-two .marketing-box .title .title-left .img {
  141. /* width: auto;
  142. max-width: 100%;
  143. max-height: 100%;
  144. */
  145. width: 100%;
  146. height: 100%;
  147. }
  148. .model-19 .marketing-wrap-two .marketing-box .title-3 {
  149. justify-content: center;
  150. }
  151. .model-19 .marketing-wrap-two .marketing-box .title-3 .title-left {
  152. width: 174px;
  153. height: 37px;
  154. text-align: center;
  155. }
  156. .model-19 .marketing-wrap-two .marketing-box .title .title-right {
  157. font-size: 12px;
  158. color: #909399;
  159. }
  160. .model-19 .marketing-wrap-two .marketing-box .title .title-right i {
  161. font-size: 12px;
  162. }
  163. .model-19 .marketing-wrap-two .list-wrap .item {
  164. width: 95px;
  165. }
  166. .model-19 .marketing-wrap-two .list-wrap .item .content {
  167. position: relative;
  168. }
  169. .model-19 .marketing-wrap-two .list-wrap .item .img-wrap {
  170. width: 95px;
  171. height: 95px;
  172. border-radius: 5px;
  173. overflow: hidden;
  174. position: relative;
  175. }
  176. .model-19 .marketing-wrap-two .list-wrap .item .img-wrap .bg {
  177. position: absolute;
  178. width: 95px;
  179. height: 30px;
  180. bottom: 0;
  181. }
  182. .model-19 .marketing-wrap-two .list-wrap .item .img-wrap .bg .img {
  183. width: 100%;
  184. }
  185. .model-19 .marketing-wrap-two .list-wrap .item .img-wrap .num {
  186. width: 95px;
  187. position: absolute;
  188. bottom: 5px;
  189. padding-left: 10px;
  190. font-size: 12px;
  191. line-height: 1;
  192. color: #FFFFFF;
  193. }
  194. .model-19 .marketing-wrap-two .list-wrap .item .original-price {
  195. font-size: 12px;
  196. color: #909399;
  197. line-height: 1;
  198. margin-top: 10px;
  199. text-decoration: line-through;
  200. }
  201. .model-19 .marketing-wrap-two .list-wrap .item .content-btn {
  202. position: absolute;
  203. right: 0;
  204. bottom: 0;
  205. display: inline-block;
  206. width: 22px;
  207. height: 22px;
  208. line-height: 22px;
  209. text-align: center;
  210. border-radius: 50%;
  211. background-color: #FF4544;
  212. }
  213. .model-19 .marketing-wrap-two .list-wrap .item .content-btn .i {
  214. color: #FFFFFF;
  215. font-size: 13px;
  216. }
  217. </style>