You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

154 lines
3.7 KiB

3 months ago
  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. <view :style="{ backgroundImage: `url(${item.activityStyle})` }" class="border-picture"></view>
  8. <span class="pictrue_log pictrue_log_class" v-if="item.activityH5 && item.activityH5.type === '1'">秒杀</span>
  9. <span class="pictrue_log pictrue_log_class" v-if="item.activityH5 && item.activityH5.type === '2'">砍价</span>
  10. <span class="pictrue_log pictrue_log_class" v-if="item.activityH5 && item.activityH5.type === '3'">拼团</span>
  11. </view>
  12. <view class='underline'>
  13. <view class='text'>
  14. <view class='line1'>{{item.storeName}}</view>
  15. <view class='money'><text class='num'>{{item.price}}</text></view>
  16. <view class='vip-money acea-row row-middle' v-if="item.vip_price && item.vip_price > 0">{{item.vip_price || 0}}
  17. <image :src="urlDomain+'crmebimage/perset/staticImg/vip.png'"></image>
  18. <text class='num' v-if="status == 0">已售{{Number(item.sales) || 0}}{{item.unitName}}</text>
  19. <text class="num line_thr" v-if="status == 1">{{item.otPrice}}</text>
  20. </view>
  21. <view class='vip-money acea-row row-middle' v-else>
  22. <text class='num' v-if="status == 0">已售{{Number(item.sales)|| 0}}{{item.unitName}}</text>
  23. <text class="num line_thr" v-if="status == 1">{{item.otPrice}}</text>
  24. </view>
  25. </view>
  26. </view>
  27. <view class='iconfont icon-gengduo3'></view>
  28. </view>
  29. </block>
  30. </view>
  31. </template>
  32. <script>
  33. import {mapGetters} from "vuex";
  34. import { goShopDetail } from '@/libs/order.js'
  35. import animationType from '@/utils/animationType.js'
  36. export default {
  37. computed: mapGetters(['uid']),
  38. props: {
  39. status: {
  40. type: Number,
  41. default: 0,
  42. },
  43. bastList: {
  44. type: Array,
  45. default: function() {
  46. return [];
  47. }
  48. }
  49. },
  50. data() {
  51. return {
  52. urlDomain: this.$Cache.get("imgHost"),
  53. };
  54. },
  55. methods: {
  56. goDetail(item){
  57. goShopDetail(item,this.uid).then(res=>{
  58. uni.navigateTo({
  59. animationType: 'zoom-fade-out',
  60. animationDuration: 200,
  61. url:`/pages/goods/goods_details/index?id=${item.id}`
  62. })
  63. })
  64. }
  65. }
  66. }
  67. </script>
  68. <style scoped lang='scss'>
  69. .goodList .item {
  70. position: relative;
  71. padding-left: 30rpx;
  72. }
  73. .money {
  74. font-size: 26rpx;
  75. font-weight: bold;
  76. margin-top: 50rpx;
  77. @include price_color(theme);
  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: 6rpx;
  88. }
  89. .goodList .item .pictrue .numPic {
  90. position: absolute;
  91. left: 7rpx;
  92. top: 7rpx;
  93. width: 50rpx;
  94. height: 50rpx;
  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 .num {
  110. font-size: 34rpx;
  111. }
  112. .goodList .item .text .vip-money {
  113. font-size: 24rpx;
  114. color: #282828;
  115. font-weight: bold;
  116. margin-top: 15rpx;
  117. }
  118. .goodList .item .text .vip-money image {
  119. width: 46rpx;
  120. height: 21rpx;
  121. margin: 0 22rpx 0 5rpx;
  122. }
  123. .goodList .item .text .vip-money .num {
  124. font-size: 22rpx;
  125. color: #aaa;
  126. font-weight: normal;
  127. margin: -2rpx 0 0 0;
  128. }
  129. .goodList .item .iconfont {
  130. position: absolute;
  131. right: 30rpx;
  132. width: 50rpx;
  133. height: 50rpx;
  134. border-radius: 50%;
  135. font-size: 30rpx;
  136. bottom: 38rpx;
  137. }
  138. .line_thr{
  139. text-decoration: line-through;
  140. }
  141. </style>