铝交易,微信公众号
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.

141 lines
2.6 KiB

1 year ago
10 months ago
1 year ago
10 months ago
1 year ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
1 year ago
  1. <template>
  2. <view class="list">
  3. <view class="item" v-for="(item, index) in list" @click="immediatePurchase(item)" :key="index">
  4. <image class="image" :src="item.pic" mode="aspectFill"></image>
  5. <view class="info">
  6. <view class="title">
  7. {{ $t('other.aluminumProducts') }}
  8. </view>
  9. <view class="price">
  10. <text>{{item.price}}</text>
  11. {{ $t('components.unitPrice2') }}
  12. </view>
  13. <view class="num">
  14. <!-- 最多批发*快速下单 -->
  15. 库存数量{{ item.num }}
  16. </view>
  17. </view>
  18. <view class="btn">
  19. <view class="change">
  20. {{ $t('components.immediatePurchase') }}
  21. </view>
  22. </view>
  23. </view>
  24. </view>
  25. </template>
  26. <script>
  27. export default {
  28. name: "productList",
  29. props: {
  30. list: {
  31. type: Array,
  32. default: false
  33. },
  34. },
  35. data() {
  36. return {};
  37. },
  38. methods: {
  39. // 立即购买
  40. immediatePurchase(item) {
  41. console.log("====")
  42. // var itemStr = encodeURIComponent(JSON.stringify(item));
  43. this.$store.state.productDetail = item
  44. uni.navigateTo({
  45. url: `/pages_order/tradingPlatform/nowOrder`,
  46. });
  47. }
  48. },
  49. }
  50. </script>
  51. <style scoped lang="scss">
  52. .list {
  53. display: flex;
  54. justify-content: center;
  55. flex-wrap: wrap;
  56. .item {
  57. position: relative;
  58. width: 300rpx;
  59. padding: 20rpx;
  60. background-color: #fff;
  61. border-radius: 20rpx;
  62. margin-top: 20rpx;
  63. &:nth-child(odd) {
  64. margin-right: 20rpx;
  65. }
  66. .image {
  67. width: 300rpx;
  68. height: 250rpx;
  69. border-radius: 20rpx;
  70. }
  71. .info {
  72. font-size: 26rpx;
  73. .title {
  74. font-size: 30rpx;
  75. color: #000;
  76. }
  77. .price {
  78. color: #D03F25;
  79. margin-top: 6rpx;
  80. text {
  81. font-size: 34rpx;
  82. font-weight: 900;
  83. }
  84. }
  85. .favorable {
  86. display: flex;
  87. background-image: url(/static/image/product/favorable.png);
  88. background-size: 100% 100%;
  89. width: fit-content;
  90. padding: 5rpx 10rpx;
  91. font-size: 18rpx;
  92. margin-top: 6rpx;
  93. .p {
  94. color: #fff;
  95. margin-left: 10rpx;
  96. }
  97. }
  98. .num {
  99. margin-top: 6rpx;
  100. font-size: 22rpx;
  101. color: #888;
  102. }
  103. }
  104. .btn {
  105. position: absolute;
  106. right: 0rpx;
  107. bottom: 0rpx;
  108. padding: 10rpx;
  109. border-radius: 50%;
  110. //background-color: $uni-color;
  111. .change {
  112. display: flex;
  113. align-items: center;
  114. justify-content: center;
  115. border-radius: 40rpx;
  116. color: white;
  117. font-size: 22rpx;
  118. //margin: 20rpx 10rpx 0 0;
  119. padding: 10rpx 10rpx;
  120. background: #2b467a;
  121. border: 1px solid #757986;
  122. //margin-top: 20rpx;
  123. //border-radius: 40rpx;
  124. }
  125. }
  126. }
  127. }
  128. </style>