Model22.vue 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289
  1. <template>
  2. <view class="model-22">
  3. <view class="seckill-list-preview marketing-box marketing-box-two marketing-box-3" :style="{backgroundColor:editablePageConfig.editable_page_config_content.back_color}">
  4. <view>
  5. <view class="title-wrap title-wrap-3" v-if="editablePageConfig.editable_page_config_content['if_show_title_icon']==1" @click="goPromotion()">
  6. <view class="title-left">
  7. <view class="img">
  8. <image mode="aspectFit" class="img" :src="title_icon">
  9. </view>
  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>
  18. <view class="content">
  19. <view class="top">
  20. <view class="content-desc">{{goods.goods_name}}</view>
  21. <view class="mprogress">
  22. <view class="img">
  23. <view class="img-con" :style="'width:'+goods.order_ratio+'%'">
  24. </view>
  25. </view>
  26. <view class="num">已抢{{goods.order_ratio}}%</view>
  27. </view>
  28. </view>
  29. <view class="bot">
  30. <view class="content-price">
  31. <view>¥
  32. <text class="span">{{parseFloat(goods.goods_promotion_price)}}</text>
  33. </view>
  34. <view class="content-num">¥{{parseFloat(goods.goods_price)}}</view>
  35. </view>
  36. <view class="layui-btn">立即抢购</view>
  37. </view>
  38. </view>
  39. </view>
  40. </view>
  41. <view class="more" @click="goPromotion()">
  42. <text class="span">更多秒杀</text>
  43. <text class="i iconfont iconyoujiantou">
  44. </text>
  45. </view>
  46. </view>
  47. </view>
  48. </template>
  49. <script>
  50. import {
  51. env
  52. } from '../../../../static/config'
  53. export default {
  54. name: 'Model22',
  55. data () {
  56. return {
  57. }
  58. },
  59. components: {
  60. },
  61. props: ['editablePageConfig','editablePage'],
  62. computed: {
  63. title_icon(){
  64. if(this.editablePageConfig.editable_page_config_content['title_icon']){
  65. return this.editablePageConfig.editable_page_config_content['title_icon']
  66. }else{
  67. return env.SITE_URL+'/static/home/images/editable_page/seckill_style3_title.png'
  68. }
  69. }
  70. },
  71. created() {
  72. },
  73. methods: {
  74. productClick(goods_id) {
  75. uni.navigateTo({url: '/pages/home/goodsdetail/Goodsdetail?goods_id='+goods_id })
  76. },
  77. goPromotion(){
  78. uni.navigateTo({url:'/pages/home/goodslist/Goodslist?xianshi=1'})
  79. }
  80. }
  81. }
  82. </script>
  83. <style lang="scss" scoped>
  84. .model-22 .marketing-box-two {
  85. padding: 20px 15px 5px;
  86. background-color: #FFFFFF;
  87. border-radius: 5px;
  88. }
  89. .model-22 .marketing-box-two .title-wrap {
  90. padding-bottom: 5px;
  91. display: flex;
  92. align-items: center;
  93. }
  94. .model-22 .marketing-box-two .title-wrap-2 {
  95. justify-content: space-between;
  96. }
  97. /* .marketing-box-two .title-wrap-2 .title-left .img {
  98. display: inline-block;
  99. width: 103px;
  100. height: 16px;
  101. line-height: 16px;
  102. }
  103. */
  104. .model-22 .marketing-box-two .title-wrap .title-left .img {
  105. width: 103px;
  106. height: 16px;
  107. }
  108. .model-22 .marketing-box-two .title-wrap .title-left .time {
  109. height: 16px;
  110. line-height: 16px;
  111. margin-top: 10px;
  112. font-size: 12px;
  113. }
  114. .model-22 .marketing-box-two .title-wrap .title-left .time {
  115. color: rgba(255, 69, 68, .5);
  116. }
  117. .model-22 .marketing-box-two .title-wrap .title-left .time .font {
  118. margin-right: 6px;
  119. }
  120. .model-22 .marketing-box-two .title-wrap .title-right {
  121. font-size: 12px;
  122. color: #909399;
  123. }
  124. .model-22 .marketing-box-two .title-wrap .title-right .i {
  125. font-size: 12px;
  126. }
  127. .model-22 .marketing-box-two .list-wrap {
  128. flex-wrap: wrap;
  129. }
  130. .model-22 .marketing-box-two .list-wrap .item {
  131. width: 100%;
  132. display: flex;
  133. height: 125px;
  134. box-sizing: border-box;
  135. }
  136. .model-22 .marketing-box-two .list-wrap .img-wrap {
  137. width: 95px;
  138. height: 95px;
  139. border-radius: 5px;
  140. overflow: hidden;
  141. flex-shrink: 0;
  142. margin-right: 9px;
  143. margin-top: 15px;
  144. position: relative;
  145. }
  146. .model-22 .marketing-box-two .list-wrap .img-wrap>.img {
  147. width: 100%;
  148. height: 100%;
  149. }
  150. .model-22 .marketing-box-two .list-wrap .img-wrap .hot {
  151. position: absolute;
  152. top: 3px;
  153. left: 3px;
  154. width: 30px;
  155. height: 30px;
  156. }
  157. .model-22 .marketing-box-two .list-wrap .img-wrap .hot .div {
  158. width: 100%;
  159. height: 100%;
  160. position: relative;
  161. }
  162. .model-22 .marketing-box-two .list-wrap .img-wrap .hot .div .img {
  163. width: 100%;
  164. height: 100%;
  165. }
  166. .model-22 .marketing-box-two .list-wrap .img-wrap .hot .div .span {
  167. display: inline-block;
  168. width: 30px;
  169. height: 30px;
  170. line-height: 30px;
  171. text-align: center;
  172. font-size: 12px;
  173. color: #FFFFFF;
  174. position: absolute;
  175. top: 0;
  176. left: 0;
  177. }
  178. .model-22 .marketing-box-two .list-wrap .item .content {
  179. padding: 15px 0;
  180. border-bottom: 1px solid #EEEEEE;
  181. display: flex;
  182. justify-content: space-between;
  183. flex-direction: column;
  184. flex:1;
  185. }
  186. .model-22 .marketing-box-two .list-wrap .item:last-child .content {
  187. border-bottom: 0px;
  188. }
  189. .model-22 .marketing-box-two .list-wrap .item .content .content-desc {
  190. height: 32px;
  191. margin-top: 0;
  192. font-size: 14px;
  193. line-height: 14px;
  194. text-overflow: -o-ellipsis-lastline;
  195. overflow: hidden;
  196. text-overflow: ellipsis;
  197. display: -webkit-box;
  198. -webkit-line-clamp: 2;
  199. line-clamp: 2;
  200. -webkit-box-orient: vertical;
  201. }
  202. .model-22 .marketing-box-two .list-wrap .mprogress {
  203. display: flex;
  204. align-items: center;
  205. }
  206. .model-22 .marketing-box-two .list-wrap .mprogress .img {
  207. width: 120px;
  208. height: 10px;
  209. border-radius: 10px;
  210. background-color: #FCECD7;
  211. margin-right: 10px;
  212. }
  213. .model-22 .marketing-box-two .list-wrap .mprogress .img .img-con {
  214. width: 77px;
  215. height: 10px;
  216. border-radius: 10px;
  217. background-color: #FDBE6C;
  218. }
  219. .model-22 .marketing-box-two .list-wrap .mprogress .num {
  220. font-size: 12px;
  221. color: #909399;
  222. }
  223. .model-22 .marketing-box-two .list-wrap .bot {
  224. display: flex;
  225. justify-content: space-between;
  226. align-items: flex-end;
  227. }
  228. .model-22 .marketing-box-two .list-wrap .bot .content-price {
  229. font-size: 12px;
  230. color: #FF4544;
  231. margin-top: 10px;
  232. height: 16px;
  233. font-weight: 600;
  234. display: flex;
  235. align-items: flex-end;
  236. }
  237. .model-22 .marketing-box-two .list-wrap .bot .content-price .span {
  238. font-size: 16px;
  239. margin-right: 5px;
  240. }
  241. .model-22 .marketing-box-two .list-wrap .bot .content-price .content-num {
  242. font-weight: 500;
  243. margin-top: 0;
  244. font-size: 12px;
  245. line-height: 12px;
  246. color: #909399;
  247. text-decoration: line-through;
  248. }
  249. .model-22 .marketing-box-two .list-wrap .bot .layui-btn {
  250. background-color: rgb(255, 69, 68);
  251. color:#fff;
  252. font-size: 14px;
  253. width: 80px;
  254. height: 25px;
  255. line-height: 25px;
  256. text-align: center;
  257. border-radius: 25px;
  258. }
  259. .model-22 .marketing-box-3 {
  260. padding-bottom: 0;
  261. }
  262. .model-22 .marketing-box-two .title-wrap-3 {
  263. justify-content: center;
  264. }
  265. .model-22 .marketing-box-two .title-wrap-3 .title-left .img image {
  266. width: 174px;
  267. height: 17px;
  268. }
  269. .model-22 .marketing-box-two .title-wrap-3 .title-left .time {
  270. text-align: center;
  271. display: flex;
  272. align-items: center;
  273. justify-content: center;
  274. }
  275. .model-22 .marketing-box-two .more {
  276. text-align: center;
  277. height: 50px;
  278. line-height: 50px;
  279. border-top: 1px solid #EEEEEE;
  280. }
  281. .model-22 .marketing-box-two .more .span, .marketing-box-two .more .i {
  282. font-size: 12px;
  283. color: #909399;
  284. }
  285. </style>