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

144 lines
2.8 KiB

6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
  1. <template>
  2. <view class="list">
  3. <view class="item"
  4. v-for="(item, index) in productList"
  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. productList: {
  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. uni.navigateTo({
  48. url: `/pages_order/tradingPlatform/nowOrder?params=${itemStr}`,
  49. });
  50. }
  51. },
  52. }
  53. </script>
  54. <style scoped lang="scss">
  55. .list {
  56. display: flex;
  57. justify-content: center;
  58. flex-wrap: wrap;
  59. .item {
  60. position: relative;
  61. width: 300rpx;
  62. padding: 20rpx;
  63. background-color: #fff;
  64. border-radius: 20rpx;
  65. margin-top: 20rpx;
  66. &:nth-child(odd) {
  67. margin-right: 20rpx;
  68. }
  69. .image {
  70. width: 300rpx;
  71. height: 250rpx;
  72. border-radius: 20rpx;
  73. }
  74. .info {
  75. font-size: 26rpx;
  76. .title {
  77. font-size: 30rpx;
  78. color: #000;
  79. }
  80. .price {
  81. color: #D03F25;
  82. margin-top: 6rpx;
  83. text {
  84. font-size: 34rpx;
  85. font-weight: 900;
  86. }
  87. }
  88. .favorable {
  89. display: flex;
  90. background-image: url(/static/image/product/favorable.png);
  91. background-size: 100% 100%;
  92. width: fit-content;
  93. padding: 5rpx 10rpx;
  94. font-size: 18rpx;
  95. margin-top: 6rpx;
  96. .p {
  97. color: #fff;
  98. margin-left: 10rpx;
  99. }
  100. }
  101. .num {
  102. margin-top: 6rpx;
  103. font-size: 22rpx;
  104. color: #888;
  105. }
  106. }
  107. .btn {
  108. position: absolute;
  109. right: 0rpx;
  110. bottom: 0rpx;
  111. padding: 10rpx;
  112. border-radius: 50%;
  113. //background-color: $uni-color;
  114. .change {
  115. display: flex;
  116. align-items: center;
  117. justify-content: center;
  118. border-radius: 40rpx;
  119. color: white;
  120. font-size: 22rpx;
  121. //margin: 20rpx 10rpx 0 0;
  122. padding: 10rpx 10rpx;
  123. background: #2b467a;
  124. border: 1px solid #757986;
  125. //margin-top: 20rpx;
  126. //border-radius: 40rpx;
  127. }
  128. }
  129. }
  130. }
  131. </style>