index.vue 3.5 KB

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