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

155 lines
3.1 KiB

8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
  1. <template>
  2. <view class="trading-platform">
  3. <view class="frame">
  4. <!--顶部栏-->
  5. <topbar showRight="0"></topbar>
  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">挂单列表</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'">现货交易</span>
  23. <span @click="actionIndexChange(1)" :class="actionIndex==1?'active':'noactive'">期货交易</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. .chart {
  73. border: 1px solid red;
  74. height: 250rpx;
  75. }
  76. .supplier {
  77. padding: 20rpx 20rpx;
  78. background-image: url('../../static/image/index/1.png');
  79. color: #FFF;
  80. font-size: 32rpx;
  81. .supplierList{
  82. margin-top: 20rpx;
  83. height: 60vh;
  84. overflow: auto;
  85. }
  86. .purchaser-title {
  87. .active {
  88. text-decoration: underline;
  89. width: 80rpx;
  90. margin: 20rpx 20rpx 20rpx 20rpx;
  91. padding: 10rpx 20rpx;
  92. }
  93. .noactive {
  94. width: 80rpx;
  95. margin: 20rpx 20rpx 20rpx 20rpx;
  96. padding: 10rpx 20rpx;
  97. }
  98. }
  99. }
  100. .purchaser {
  101. padding: 20rpx 0;
  102. background-image: url('../../static/image/index/1.png');
  103. color: #FFF;
  104. font-size: 32rpx;
  105. .purchaser-title {
  106. .active {
  107. text-decoration: underline;
  108. width: 80rpx;
  109. margin: 20rpx 20rpx 20rpx 20rpx;
  110. padding: 10rpx 20rpx;
  111. }
  112. .noactive {
  113. width: 80rpx;
  114. margin: 20rpx 20rpx 20rpx 20rpx;
  115. padding: 10rpx 20rpx;
  116. }
  117. }
  118. .productList {
  119. margin-top: 20rpx;
  120. height: 60vh;
  121. overflow: auto;
  122. }
  123. }
  124. }
  125. }
  126. </style>