Model18.vue 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  1. <template>
  2. <view class="model-18">
  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="goBargain()">
  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: 'Model18',
  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/bargain_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. goBargain(){
  61. uni.navigateTo({url:'/pages/home/bargain/Bargainlist'})
  62. }
  63. }
  64. }
  65. </script>
  66. <style lang="scss" scoped>
  67. .model-18 .list-wrap {
  68. display: flex;
  69. justify-content: space-between;
  70. margin-top: 15px;
  71. }
  72. .model-18 .list-wrap .item {
  73. display: inline-block;
  74. width: 100px;
  75. }
  76. .model-18 .list-wrap .item .img-wrap{
  77. width: 100px;
  78. height: 100px;
  79. border-radius: 5px;
  80. overflow: hidden;
  81. }
  82. .model-18 .list-wrap .item .img-wrap .img{
  83. max-width: 100%;
  84. max-height: 100%;
  85. }
  86. .model-18 .list-wrap .item .content{
  87. width: 100%;
  88. }
  89. .model-18 .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-18 .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-18 .list-wrap .item .content .content-price .span {
  106. font-size: 16px;
  107. line-height: 16px;
  108. }
  109. .model-18 .list-wrap .item .content .content-num {
  110. font-size: 12px;
  111. line-height: 12px;
  112. margin-top: 10px;
  113. color: #909399;
  114. }
  115. .model-18 .marketing-wrap-two {
  116. padding: 20px 15px;
  117. box-sizing: border-box;
  118. background-color: #FFFFFF;
  119. border-radius: 5px;
  120. position: relative;
  121. /* height: 255px;
  122. */
  123. }
  124. .model-18 .marketing-wrap-two .marketing-box {
  125. position: unset;
  126. padding: 0;
  127. }
  128. .model-18 .marketing-wrap-two .marketing-box .title {
  129. display: flex;
  130. justify-content: space-between;
  131. align-items: center;
  132. padding-bottom: 5px;
  133. }
  134. .model-18 .marketing-wrap-two .marketing-box .title .title-left {
  135. width: 109px;
  136. height: 37px;
  137. line-height: 37px;
  138. }
  139. .model-18 .marketing-wrap-two .marketing-box .title .title-left .img {
  140. /* width: auto;
  141. max-width: 100%;
  142. max-height: 100%;
  143. */
  144. width: 100%;
  145. height: 100%;
  146. }
  147. .model-18 .marketing-wrap-two .marketing-box .title-3 {
  148. justify-content: center;
  149. }
  150. .model-18 .marketing-wrap-two .marketing-box .title-3 .title-left {
  151. width: 174px;
  152. height: 37px;
  153. text-align: center;
  154. }
  155. .model-18 .marketing-wrap-two .marketing-box .title .title-right {
  156. font-size: 12px;
  157. color: #909399;
  158. }
  159. .model-18 .marketing-wrap-two .marketing-box .title .title-right .i {
  160. font-size: 12px;
  161. }
  162. .model-18 .marketing-wrap-two .list-wrap .item {
  163. width: 95px;
  164. }
  165. .model-18 .marketing-wrap-two .list-wrap .item .content {
  166. position: relative;
  167. }
  168. .model-18 .marketing-wrap-two .list-wrap .item .img-wrap {
  169. width: 95px;
  170. height: 95px;
  171. border-radius: 5px;
  172. overflow: hidden;
  173. position: relative;
  174. }
  175. .model-18 .marketing-wrap-two .list-wrap .item .img-wrap .bg {
  176. position: absolute;
  177. width: 95px;
  178. height: 30px;
  179. bottom: 0;
  180. }
  181. .model-18 .marketing-wrap-two .list-wrap .item .img-wrap .bg .img {
  182. width: 100%;
  183. }
  184. .model-18 .marketing-wrap-two .list-wrap .item .img-wrap .num {
  185. width: 95px;
  186. position: absolute;
  187. bottom: 5px;
  188. padding-left: 10px;
  189. font-size: 12px;
  190. line-height: 1;
  191. color: #FFFFFF;
  192. }
  193. .model-18 .marketing-wrap-two .list-wrap .item .original-price {
  194. font-size: 12px;
  195. color: #909399;
  196. line-height: 1;
  197. margin-top: 10px;
  198. text-decoration: line-through;
  199. }
  200. .model-18 .marketing-wrap-two .list-wrap .item .content-btn {
  201. position: absolute;
  202. right: 0;
  203. bottom: 0;
  204. display: inline-block;
  205. width: 22px;
  206. height: 22px;
  207. line-height: 22px;
  208. text-align: center;
  209. border-radius: 50%;
  210. background-color: #FF4544;
  211. }
  212. .model-18 .marketing-wrap-two .list-wrap .item .content-btn .i {
  213. color: #FFFFFF;
  214. font-size: 13px;
  215. }
  216. </style>