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

163 lines
3.3 KiB

11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
  1. <template>
  2. <view class="trading-platform">
  3. <topbar showRight="0"></topbar>
  4. <view class="frame">
  5. <!--顶部栏-->
  6. <!--折线图-->
  7. <view class="chart">
  8. 折线图
  9. </view>
  10. <!-- 供应商 -->
  11. <view class="supplier" v-if="userShop">
  12. <view style="" class="purchaser-title">
  13. <span class="active"> {{ $t('other.orderList') }}</span>
  14. </view>
  15. <view class="supplierList">
  16. <orderList :orderList="list.records"/>
  17. </view>
  18. </view>
  19. <!-- 采购商 -->
  20. <view class="purchaser" v-else>
  21. <view style="" class="purchaser-title">
  22. <span @click="actionIndexChange(0)" :class="actionIndex==0?'active':'noactive'">{{ $t('other.spotTrading') }}</span>
  23. <span @click="actionIndexChange(1)" :class="actionIndex==1?'active':'noactive'">{{ $t('other.futuresTrading') }}</span>
  24. </view>
  25. <view class="productList">
  26. <productList :productList="list.records"/>
  27. </view>
  28. </view>
  29. </view>
  30. <tabber select="1"/>
  31. </view>
  32. </template>
  33. <script>
  34. import tabber from '@/components/base/tabbar.vue'
  35. import topbar from "@/components/base/topbar.vue";
  36. import {mapGetters} from 'vuex'
  37. import ProductList from "@/components/user/productList.vue";
  38. import OrderList from "@/pages_order/components/order/orderList.vue";
  39. export default {
  40. components: {
  41. OrderList,
  42. ProductList,
  43. topbar,
  44. tabber,
  45. },
  46. computed: {
  47. ...mapGetters(['userShop']),
  48. },
  49. data() {
  50. return {
  51. list: {
  52. records: [
  53. {}
  54. ],
  55. total: 0,
  56. },
  57. actionIndex: 0,
  58. }
  59. },
  60. methods: {
  61. // 切换tab
  62. actionIndexChange(index) {
  63. // index为0时切换到现货交易,index为1时切换到期货交易
  64. this.actionIndex = index;
  65. },
  66. }
  67. }
  68. </script>
  69. <style scoped lang="scss">
  70. .trading-platform {
  71. .frame {
  72. display: flex;
  73. flex-direction: column;
  74. justify-content: center;
  75. height: calc(100vh - 120rpx - 120rpx);
  76. .chart {
  77. height: 30%;
  78. }
  79. .supplier {
  80. height: 70%;
  81. padding: 20rpx 20rpx;
  82. background-image: url('../../static/image/index/1.png');
  83. color: #FFF;
  84. font-size: 32rpx;
  85. .supplierList {
  86. margin-top: 20rpx;
  87. height: 92%;
  88. overflow: auto;
  89. }
  90. .purchaser-title {
  91. height: 8%;
  92. .active {
  93. text-decoration: underline;
  94. width: 80rpx;
  95. margin: 20rpx 20rpx 20rpx 20rpx;
  96. padding: 10rpx 20rpx;
  97. }
  98. .noactive {
  99. width: 80rpx;
  100. margin: 20rpx 20rpx 20rpx 20rpx;
  101. padding: 10rpx 20rpx;
  102. }
  103. }
  104. }
  105. .purchaser {
  106. height: 60%;
  107. padding: 20rpx 0;
  108. background-image: url('../../static/image/index/1.png');
  109. color: #FFF;
  110. font-size: 32rpx;
  111. .purchaser-title {
  112. .active {
  113. text-decoration: underline;
  114. width: 80rpx;
  115. margin: 20rpx 20rpx 20rpx 20rpx;
  116. padding: 10rpx 20rpx;
  117. }
  118. .noactive {
  119. width: 80rpx;
  120. margin: 20rpx 20rpx 20rpx 20rpx;
  121. padding: 10rpx 20rpx;
  122. }
  123. }
  124. .productList {
  125. margin-top: 20rpx;
  126. height: 60vh;
  127. overflow: auto;
  128. }
  129. }
  130. }
  131. }
  132. </style>