SeckillList.vue 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279
  1. <template>
  2. <view class="seckill_list relative" :data-theme="theme">
  3. <view class="seckill_item acea-row" v-for="(item,index) in seckillList " :key="index"
  4. @click="goDetail(item.id)">
  5. <view class="picture">
  6. <easy-loadimage :image-src="item.image" :border-src="item.image" width="254rpx" height="254rpx"
  7. :radius="8">
  8. </easy-loadimage>
  9. </view>
  10. <view class="acea-row row-column row-between" :class="status == 1?'':''">
  11. <view class="pro_name line1 f-w-700"><text v-if="item.isSelf"
  12. class="font-bg-red bt-color mr10 self_min merType bg-color">自营</text>{{item.name}}</view>
  13. <view v-if="status == 1" class="seckill_zhekou acea-row row-between">
  14. <view class="zhekou_price futura f-s-22 frice_hua">¥{{item.price}}</view>
  15. <view class="acea-row row-column row-center row-middle pb-30">
  16. <text class="f-s-24 reduce_color title">直降</text>
  17. <text
  18. class="f-s-24 reduce_color">¥{{(Number(item.price)-Number(item.seckillPrice)).toFixed(2)}}</text>
  19. </view>
  20. <view class="zhekou_price f-s-20 futura text-right">即将恢复</view>
  21. </view>
  22. <view v-else class="acea-row row-between">
  23. <text
  24. class="f-s-24 reduce_color mts">商品直降¥{{(Number(item.price)-Number(item.seckillPrice)).toFixed(2)}}</text>
  25. </view>
  26. <!-- 抢购中按钮-->
  27. <view class="seckill_btn seckill_btn_bg1 acea-row row-middle" v-if="status == 1">
  28. <view class="seckill_btn_left f-w-700">
  29. <text class="friceIcon">¥</text>{{item.seckillPrice}}
  30. </view>
  31. <view class="middle"></view>
  32. <view class="acea-row row-column seckill_btn_right">
  33. <text class="f-s-26 f-w-700 text-white text-center">立即抢购</text>
  34. <view class="acea-row row-middle mt12">
  35. <text class="f-s-17 text-white f-w-300">已抢{{item.payRange}}</text>
  36. <view class="w80 ml8">
  37. <view class="activityProgress skeleton-rect">
  38. <view class='bg-reds' :style="'width:'+item.payRange"></view>
  39. </view>
  40. </view>
  41. </view>
  42. </view>
  43. </view>
  44. <!-- 未开始按钮-->
  45. <view class="seckill_btn seckill_btn_bg2 acea-row row-middle" v-if="status == 2 || status ==3">
  46. <view class="seckill_btn_left f-w-700">
  47. <text class="friceIcon">¥</text>{{item.seckillPrice}}
  48. </view>
  49. <view class="middle"></view>
  50. <view class="acea-row row-column">
  51. <text class="f-s-28 f-w-700 btn_text text-center">敬请期待</text>
  52. </view>
  53. </view>
  54. <view class="seckill_btn seckill_btn_bg3 acea-row row-middle" v-if="status == 0">
  55. <view class="seckill_btn_left f-w-700">
  56. <text class="friceIcon">¥</text>{{item.seckillPrice}}
  57. </view>
  58. <view class="middle"></view>
  59. <view class="acea-row row-center row-middle">
  60. <text class="f-s-28 f-w-700 btn_text text-center">已结束</text>
  61. </view>
  62. </view>
  63. </view>
  64. </view>
  65. <view class='loadingicon acea-row row-center-wrapper'>
  66. <text class='loading iconfont icon-jiazai'
  67. :hidden='loading==false'></text>{{seckillList.length>0?loadTitle:''}}
  68. </view>
  69. <view class="empty-boxs" v-if="!seckillList.length && !loading">
  70. <emptyPage title="暂无秒杀商品~" mTop="31%" :imgSrc="urlDomain+'crmebimage/presets/noShopper.png'"></emptyPage>
  71. </view>
  72. </view>
  73. </template>
  74. <script>
  75. import easyLoadimage from '@/components/base/easy-loadimage.vue'
  76. import {
  77. goProductDetail
  78. } from "@/libs/order";
  79. let app = getApp();
  80. export default {
  81. name: "SeckillList",
  82. components: {
  83. easyLoadimage,
  84. },
  85. props: {
  86. //秒杀商品列表
  87. seckillList: {
  88. type: Array,
  89. default: function() {
  90. return [];
  91. }
  92. },
  93. loading: {
  94. type: Boolean,
  95. default: false
  96. },
  97. loadTitle: {
  98. type: String,
  99. default: ''
  100. },
  101. status: {
  102. type: Number,
  103. default: 1
  104. },
  105. // 倒计时时间
  106. datatime: {
  107. type: Number,
  108. default: 0
  109. }
  110. },
  111. data() {
  112. return {
  113. urlDomain: this.$Cache.get("imgHost"),
  114. theme: app.globalData.theme,
  115. }
  116. },
  117. methods: {
  118. /*
  119. *去商品详情页
  120. */
  121. goDetail(id) {
  122. goProductDetail(id, 1, `&status=${this.status}&datatime=${this.datatime}`)
  123. },
  124. }
  125. }
  126. </script>
  127. <style scoped lang="scss">
  128. .middle {
  129. width: 24rpx;
  130. height: 82rpx;
  131. background-image: url('../static/images/middle.png');
  132. background-size: cover;
  133. }
  134. .pl-6 {
  135. padding-left: 6rpx;
  136. }
  137. .mt12 {
  138. margin-top: 8rpx;
  139. }
  140. .ml8 {
  141. margin-left: 8rpx;
  142. }
  143. .reduce_color {
  144. color: #AC6926;
  145. }
  146. .f-w-300 {
  147. font-weight: 300;
  148. }
  149. .w80 {
  150. width: 60rpx;
  151. }
  152. .seckill_list {
  153. background-color: #fff;
  154. padding: 117rpx 24rpx 24rpx 24rpx;
  155. overflow-y: scroll;
  156. z-index: 1;
  157. }
  158. .seckill_item {
  159. height: 300rpx;
  160. background: #FFFFFF;
  161. border-radius: 14rpx;
  162. border: 1px solid #E6E6E6;
  163. margin-bottom: 20rpx;
  164. padding: 20rpx;
  165. box-sizing: border-box;
  166. .picture,
  167. /deep/.easy-loadimage image {
  168. display: block;
  169. margin-right: 16rpx;
  170. }
  171. .pro_name {
  172. width: 386rpx;
  173. // height: 72rpx;
  174. font-size: 28rpx;
  175. font-family: PingFang SC-中黑体, PingFang SC;
  176. color: #333333;
  177. // line-height: 36rpx;
  178. }
  179. }
  180. .seckill_zhekou {
  181. width: 100%;
  182. height: 76rpx;
  183. background-image: url('../static/images/seckill_discount.png');
  184. background-position: bottom;
  185. background-repeat: no-repeat;
  186. background-size: contain;
  187. .title {
  188. margin-top: -20rpx;
  189. }
  190. }
  191. .seckill_btn {
  192. background-size: contain;
  193. background-repeat: no-repeat;
  194. width: 388rpx;
  195. height: 82rpx;
  196. // padding: 0 16rpx 0;
  197. border-radius: 8rpx;
  198. }
  199. .seckill_btn_left {
  200. width: 190rpx;
  201. height: 82rpx;
  202. line-height: 82rpx;
  203. text-align: center;
  204. color: #FFD39D;
  205. font-size: 36rpx;
  206. font-family: PingFang SC-中黑体, PingFang SC;
  207. background: linear-gradient(300deg, #22170F 0%, #4B3A30 100%);
  208. opacity: 1;
  209. background-image: url('../static/images/seckill_btn_bg2.png');
  210. background-size: 100% 100%;
  211. background-repeat: no-repeat;
  212. }
  213. .seckill_btn_right {
  214. width: 174rpx;
  215. text-align: center;
  216. align-items: center;
  217. }
  218. .seckill_btn_bg1 {
  219. @include main_bg_color(theme);
  220. }
  221. .seckill_btn_bg2,
  222. .seckill_btn_bg3 {
  223. background-color: #BBBBBB;
  224. }
  225. .btn_text {
  226. width: 150rpx;
  227. color: #fff;
  228. }
  229. .zhekou_price {
  230. color: #888888;
  231. width: 122rpx;
  232. }
  233. .frice_hua {
  234. text-decoration: line-through;
  235. }
  236. .text-center {
  237. text-align: center;
  238. }
  239. .other_btn {
  240. width: 200rpx;
  241. height: 60rpx;
  242. font-size: 28rpx;
  243. font-weight: 500;
  244. color: #000;
  245. border-radius: 30rpx;
  246. border: 1px solid #000;
  247. margin: 30rpx 0;
  248. }
  249. .icon-shangpinye_gengduo {
  250. font-size: 24rpx;
  251. padding-left: 4rpx;
  252. }
  253. </style>