index.vue 3.1 KB

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