arManage.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. <template>
  2. <div class="house">
  3. <div class="head">
  4. <img @click="back" src="@/assets/images/back.png" class="arrow_img" />
  5. <span>AR管理</span>
  6. </div>
  7. <div class="tab">
  8. <div class="tab_item" :class="tabIndex == index ? 'tab_active' : ''" v-for="(item, index) in tabList" :key="index" @click="changeTab(index)">
  9. <span>{{ item }}</span>
  10. </div>
  11. </div>
  12. <ar-exchange v-if="tabIndex == 0"></ar-exchange>
  13. <ar-withdraw v-else></ar-withdraw>
  14. <!-- 加载弹窗 -->
  15. <van-popup v-model="isApprove" round style="width: 80%" :close-on-click-overlay="false">
  16. <div class="bind_box">
  17. <div style="font-weight: bold"><van-loading type="spinner" /></div>
  18. <div class="address_field">处理中...</div>
  19. </div>
  20. </van-popup>
  21. </div>
  22. </template>
  23. <script>
  24. import { mapState } from 'vuex';
  25. import ArExchange from './arExchange.vue';
  26. import ArWithdraw from './arWithdraw.vue';
  27. export default {
  28. components: {
  29. ArExchange,
  30. ArWithdraw,
  31. },
  32. data() {
  33. return {
  34. token: null, //余额
  35. show: true,
  36. address: '', //地址
  37. payToken: undefined, //支付币种
  38. walletBalance: 0, //钱包余额
  39. showApprove: false, //授权
  40. isApprove: false, //是否有授权
  41. tabList: ['AR兑换', 'AR提现'],
  42. // tabList2: ['钱包余额', '系统余额', '报单算力余额'],
  43. tabIndex: 0,
  44. };
  45. },
  46. created() {},
  47. watch: {
  48. account() {},
  49. amount(e) {},
  50. },
  51. computed: {
  52. ...mapState(['account']),
  53. },
  54. methods: {
  55. changeTab(e) {
  56. this.tabIndex = e;
  57. },
  58. //返回上一页
  59. back() {
  60. this.$router.back();
  61. },
  62. },
  63. };
  64. </script>
  65. <style lang="less" scoped>
  66. .house {
  67. min-height: calc(100vh - 80px);
  68. }
  69. .head {
  70. position: fixed;
  71. display: flex;
  72. align-items: center;
  73. justify-content: center;
  74. color: rgba(#000, 0.8);
  75. letter-spacing: 1.5px;
  76. font-weight: 550;
  77. padding: 14px 0;
  78. top: 0;
  79. width: 100%;
  80. background: #fff;
  81. .arrow_img {
  82. position: absolute;
  83. left: 20px;
  84. width: 10px;
  85. height: 16px;
  86. }
  87. }
  88. .tab {
  89. font-size: 14px;
  90. display: flex;
  91. align-items: center;
  92. margin: 80px 16px 32px;
  93. background-color: #fff;
  94. border-radius: 40px;
  95. padding: 4px;
  96. box-shadow: 4px 4px 15px 0px rgba(180, 212, 212, 0.59);
  97. &_item {
  98. text-align: center;
  99. color: #000;
  100. width: 50%;
  101. }
  102. &_active {
  103. color: #fff;
  104. font-weight: 700;
  105. padding: 10px 0;
  106. background-color: #4159d5;
  107. border-radius: 40px;
  108. }
  109. &_item1 {
  110. text-align: center;
  111. color: #000;
  112. width: 33%;
  113. }
  114. &_active1 {
  115. color: #fff;
  116. font-weight: 700;
  117. padding: 10px 0;
  118. background-color: #4159d5;
  119. border-radius: 40px;
  120. }
  121. }
  122. </style>