index.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. <template>
  2. <view class='goodList'>
  3. <scroll-view scroll-y="true" scroll-with-animation='true' style="height: 100%;">
  4. <block v-for="(item,index) in bastList" :key="index">
  5. <view @click="goDetail(item)" class='item acea-row row-between-wrapper' hover-class="none">
  6. <view class='pictrue'>
  7. <image :src='item.image'></image>
  8. <span class="pictrue_log pictrue_log_class"
  9. v-if="item.activity && item.activity.type === '1'">{{$t(`秒杀`)}}</span>
  10. <span class="pictrue_log pictrue_log_class"
  11. v-if="item.activity && item.activity.type === '2'">{{$t(`砍价`)}}</span>
  12. <span class="pictrue_log pictrue_log_class"
  13. v-if="item.activity && item.activity.type === '3'">{{$t(`拼团`)}}</span>
  14. </view>
  15. <view class='underline'>
  16. <view class='text'>
  17. <view class='line1'>{{item.store_name}}</view>
  18. <view class='money font-color'>{{$t(`¥`)}}<text class='num'>{{item.price}}</text></view>
  19. <view class='vip-money acea-row row-middle'
  20. v-if="item.is_vip && item.vip_price && item.vip_price > 0">
  21. {{$t(`¥`)}}{{item.vip_price || 0}}
  22. <image src='../../static/images/vip.png'></image><text class='num'>
  23. {{$t(`已售`)}}{{item.sales}}{{$t(item.unit_name)}}</text>
  24. </view>
  25. <view class='vip-money acea-row row-middle' v-else><text class='num'>
  26. {{$t(`已售`)}}{{item.sales}}{{$t(item.unit_name)}}</text></view>
  27. </view>
  28. </view>
  29. <!-- <view class='iconfont icon-gouwuche cart-color acea-row row-center-wrapper'></view> -->
  30. </view>
  31. </block>
  32. </scroll-view>
  33. </view>
  34. </template>
  35. <script>
  36. import {
  37. mapGetters
  38. } from "vuex";
  39. import {
  40. goShopDetail,
  41. goPage
  42. } from '@/libs/order.js'
  43. export default {
  44. computed: mapGetters(['uid']),
  45. props: {
  46. status: {
  47. type: Number,
  48. default: 0,
  49. },
  50. bastList: {
  51. type: Array,
  52. default: function() {
  53. return [];
  54. }
  55. }
  56. },
  57. data() {
  58. return {
  59. };
  60. },
  61. methods: {
  62. goDetail(item) {
  63. goPage().then(res => {
  64. goShopDetail(item, this.uid).then(res => {
  65. uni.navigateTo({
  66. url: `/pages/goods_details/index?id=${item.id}`
  67. })
  68. })
  69. })
  70. }
  71. }
  72. }
  73. </script>
  74. <style scoped lang='scss'>
  75. .goodList .item {
  76. position: relative;
  77. padding-left: 30rpx;
  78. }
  79. .goodList .item .pictrue {
  80. width: 180rpx;
  81. height: 180rpx;
  82. position: relative;
  83. }
  84. .goodList .item .pictrue image {
  85. width: 100%;
  86. height: 100%;
  87. border-radius: 20rpx;
  88. }
  89. .goodList .item .pictrue .numPic {
  90. position: absolute;
  91. left: 7rpx;
  92. top: 7rpx;
  93. width: 40rpx;
  94. height: 40rpx;
  95. border-radius: 50%;
  96. }
  97. .goodList .item .underline {
  98. padding: 30rpx 30rpx 30rpx 0;
  99. border-bottom: 1px solid #f5f5f5;
  100. }
  101. .goodList .item:nth-last-child(1) .underline {
  102. border-bottom: 0;
  103. }
  104. .goodList .item .text {
  105. font-size: 30rpx;
  106. color: #222;
  107. width: 489rpx;
  108. }
  109. .goodList .item .text .money {
  110. font-size: 26rpx;
  111. font-weight: bold;
  112. margin-top: 50rpx;
  113. }
  114. .goodList .item .text .money .num {
  115. font-size: 34rpx;
  116. }
  117. .goodList .item .text .vip-money {
  118. font-size: 24rpx;
  119. color: #282828;
  120. font-weight: bold;
  121. margin-top: 15rpx;
  122. }
  123. .goodList .item .text .vip-money image {
  124. width: 64rpx;
  125. height: 26rpx;
  126. margin-right: 8rpx;
  127. margin-left: 8rpx;
  128. }
  129. .goodList .item .text .vip-money .num {
  130. font-size: 22rpx;
  131. color: #aaa;
  132. font-weight: normal;
  133. margin-top: -2rpx;
  134. white-space: nowrap;
  135. text {
  136. white-space: nowrap;
  137. }
  138. ~.num {
  139. margin-left: 22rpx;
  140. }
  141. }
  142. .goodList .item .iconfont {
  143. position: absolute;
  144. right: 30rpx;
  145. width: 50rpx;
  146. height: 50rpx;
  147. border-radius: 50%;
  148. font-size: 30rpx;
  149. bottom: 38rpx;
  150. }
  151. </style>