小程序端工程代码
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.

49 lines
1.5 KiB

  1. <template>
  2. <view class="goodList">
  3. <view @click="routerGo(item)" class="item acea-row row-between-wrapper" v-for="(item, goodlistIndex) in goodList" :key="goodlistIndex">
  4. <view class="pictrue">
  5. <image :src="item.image" class="image" />
  6. <image :src="`${$VUE_APP_RESOURCES_URL}/images/one.png`" class="numPic" v-if="isSort === true && index === 0" />
  7. <image :src="`${$VUE_APP_RESOURCES_URL}/images/two.png`" class="numPic" v-if="isSort === true && index === 1" />
  8. <image :src="`${$VUE_APP_RESOURCES_URL}/images/three.png`" class="numPic" v-if="isSort === true && index === 2" />
  9. </view>
  10. <view class="underline">
  11. <view class="text">
  12. <view class="line1">{{ item.storeName }}</view>
  13. <view class="money font-color-red">
  14. <text class="num">{{ item.price }}</text>
  15. </view>
  16. <view class="vip-money acea-row row-middle">
  17. <view class="vip">{{ item.otPrice || 0 }}</view>
  18. <text class="num">已售{{ item.sales }}{{ item.unitName }}</text>
  19. </view>
  20. </view>
  21. </view>
  22. <!-- <view class="iconfont icon-gouwuche cart-color acea-row row-center-wrapper"></view> -->
  23. </view>
  24. </view>
  25. </template>
  26. <script>
  27. export default {
  28. name: "GoodList",
  29. props: {
  30. goodList: {
  31. type: Array,
  32. default: () => []
  33. },
  34. isSort: {
  35. type: Boolean,
  36. default: true
  37. }
  38. },
  39. data: function() {
  40. return {};
  41. },
  42. methods:{
  43. routerGo(item) {
  44. this.$yrouter.push({ path: '/pages/shop/GoodsCon/index', query: { id: item.id } });
  45. }
  46. }
  47. };
  48. </script>