index.vue 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <template>
  2. <view class="oa-product-list">
  3. <view class="oa-product-list-container">
  4. <block v-for="(item, index) in list" :key="index">
  5. <view v-if="(index + 1) % 2 !== 0 || isList" class="oa-product-item" @tap.stop="navTo(`/pages/product/product?id=${item.id}`)"
  6. :class="[isList ? 'oa-product-flex-list' : '']" hover-class="hover" :hover-start-time="150">
  7. <view class="oa-product-image-wrapper">
  8. <image :src="item.cover" mode="widthFix" :preview="false" :class="[isList?'oa-product-list-img':'oa-product-img']"></image>
  9. <!-- <text class="sketch in1line">{{ item.sketch }}</text>
  10. <view class="triangle-wrapper">
  11. <image class="triangle-tag" :src="item | filterTagName"></image>
  12. </view> -->
  13. </view>
  14. <view class="oa-pro-content">
  15. <view class="oa-pro-tit">{{ item.title }}</view>
  16. <view>
  17. <!-- <view class="oa-pro-price" v-if="item.price">
  18. <text class="oa-sale-price" :class="'text-'+themeColor.name">{{ moneySymbol }}{{ item.price }}</text>
  19. <text class="oa-factory-price" v-if="item.market_price > item.price">{{ moneySymbol }}{{ item.market_price }}</text>
  20. </view> -->
  21. <!-- <view class="oa-pro-pay" v-if="item">
  22. <text><text :class="'text-'+themeColor.name">{{
  23. item.total_sales | filterTotalSales
  24. }}</text>
  25. 人付款</text>
  26. <text @tap.stop="toggleSpec(item)" class="iconfont icongouwuche2" :class="'text-'+themeColor.name"></text>
  27. </view> -->
  28. </view>
  29. </view>
  30. </view>
  31. </block>
  32. </view>
  33. <view class="oa-product-list-container" v-if="!isList">
  34. <block v-for="(item, index) in list" :key="index">
  35. <view v-if="(index + 1) % 2 === 0" class="oa-product-item" @tap.stop="navTo(`/pages/product/product?id=${item.id}`)"
  36. :class="[isList ? 'oa-product-flex-list' : '']" hover-class="hover" :hover-start-time="150">
  37. <view class="oa-product-image-wrapper">
  38. <image :src="item.cover" mode="widthFix" :preview="false" :class="[isList?'oa-product-list-img':'oa-product-img']"></image>
  39. <!-- <text class="sketch in1line">{{ item.sketch }}</text>
  40. <view class="triangle-wrapper" v-if="item.shipping_type === '1' || item.is_virtual === '1' || item.commissionRate || item.is_open_presell === '1'">
  41. <image class="triangle-tag" :src="item | filterTagName"></image>
  42. </view> -->
  43. </view>
  44. <view class="oa-pro-content">
  45. <view class="oa-pro-tit">{{ item.title }}</view>
  46. <!-- <view>
  47. <view class="oa-pro-price" v-if="item.price">
  48. <text class="oa-sale-price" :class="'text-'+themeColor.name">{{ moneySymbol }}{{ item.price }}</text>
  49. <text class="oa-factory-price" v-if="item.market_price > item.price">{{ moneySymbol }}{{ item.market_price }}</text>
  50. </view>
  51. <view class="oa-pro-pay" v-if="item">
  52. <text><text :class="'text-'+themeColor.name">{{
  53. item.total_sales | filterTotalSales
  54. }}</text>
  55. 付款</text>
  56. <text @tap.stop="toggleSpec(item)" :class="'text-'+themeColor.name" class="iconfont icongouwuche2"></text>
  57. </view>
  58. </view> -->
  59. </view>
  60. </view>
  61. </block>
  62. </view>
  63. <!-- 规格-模态层弹窗 -->
  64. <view class="popup spec show" v-if="specClass === 'show'" @touchmove.stop.prevent="stopPrevent" @tap="hideSpec">
  65. <!-- 遮罩层 -->
  66. <view class="mask" @tap="hideSpec"></view>
  67. <view class="layer" :style="{bottom: bottom ? `${bottom}upx` : 0}" @tap.stop="stopPrevent">
  68. <oa-attr-content :product="productDetail" @toggle="toggleSpec" :showBuyBtn="true"></oa-attr-content>
  69. </view>
  70. </view>
  71. </view>
  72. </template>