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

145 lines
2.8 KiB

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