lxf
2025-07-02 7a52988eb65d0e50cc56e9da8e0088dfc5f9e416
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
<template>
  <!-- 账变记录 -->
  <div id="cryptos">
    <div class="accountChange">
      <assets-head :title="$t('账变记录')" />
      <!-- <van-tabs ref="tabs" v-model:active="active" swipeable @change="onChange" sticky> -->
        <!-- <van-tab :title="item.title" v-for="item in selectData" :key="item.title" :name="item.type"> -->
          <van-list v-model:loading="loading" :loading-text="$t('加载中...')" :finished="finished"
            :finished-text="list.length ? $t('已经全部加载完毕') : ''" @load="onLoad" :offset="130" class="pt-10 px-17" style="background: #fff;">
              <div class="p-15 bg-#f5f7f9 rounded-10 mb-10" v-for="(item, index) in list" :key="index">
                <div class="flex justify-between">
                  <span class="text-13 text-#8c8c8c">金額</span>
                  <span class="text-11 text-green">{{item.amount }}&nbsp;{{ item.wallet_type.toUpperCase() }}</span>
                </div>
                <div class="flex justify-between py-5">
                  <span class="text-13 text-#8c8c8c">分類</span>
                  <span class="text-11">{{category[item.category]}}</span>
                </div>
                <div class="flex justify-between">
                  <span class="text-13 text-#8c8c8c">日期</span>
                  <span class="text-11">{{ item.createTime }}</span>
                </div>
              </div>
              <!-- <div class="flex items-center">
                <img v-if="item.amount > 0" src="@/assets/image/assets-center/in.png" class="w-44 h-44 mr-20" />
                <img v-else src="@/assets/image/assets-center/out.png" class="w-44 h-44 mr-20" />
                <div>
                  <div class="font-32 textColor">{{ category[item.category] }}</div>
                  <div class="text-grey font-26 mt-14">{{ orderTypes[item.content_type] }}</div>
                </div>
              </div>
              <div>
                <div class="font-32 text-right" :class="item.amount > 0 ? 'text-green' : 'text-red'">{{
                  item.amount }}&nbsp;{{ item.wallet_type.toUpperCase() }}</div>
                <div class="text-grey font-28 mt-14">{{ item.createTimeStr }}</div>
              </div> -->
            <div class="flex flex-col justify-center pt-50 pb-20 items-center" v-if="!list.length && !loading">
              <img src="@/assets/image/assets-center/no-data.png" alt="" class="w-100 h-100 no-data-img" />
              <p class="text-grey mt-10">{{ $t('暂无记录') }}</p>
            </div>
          </van-list>
        <!-- </van-tab> -->
      <!-- </van-tabs> -->
    </div>
  </div>
</template>
 
<script>
import { _fundRecord } from '@/service/user.api'
import { List } from 'vant'
import assetsHead from "@/components/Transform/assets-head/index.vue";
import { Tab, Tabs } from 'vant';
export default {
  name: "accountChange",
  data() {
    return {
      active: '',
      page: 1,
      loading: false, // 当loading为true时,转圈圈
      finished: false,  // 数据是否请求结束,结束会先显示'已经全部加载完毕'
      noData: false,// 如果没有数据,显示暂无数据
      // loading:false,   // 下拉的加载图案
      isShow: false,
      title: this.$t('选择账户类型'),
      selectData: [
        { title: this.$t('全部'), type: '' },
        { title: this.$t('法币交易'), type: 'coin' },
        { title: this.$t('合约交易'), type: 'contract' },
        { title: this.$t('币币交易'), type: 'exchange' },
      ],
      type: "",//选中类型
      list: [
        // { order_no:'11111', category:this.$t('合约交易'),content_type:this.$t('永续合约平仓'),amount:1000,wallettype:'USDT',createTimeStr:'2022-07-16 22:23:04'},
        // { order_no:'22222', category:this.$t('合约交易'),content_type:this.$t('永续合约平仓'),amount:-200,wallettype:'USDT',createTimeStr:'2022-07-16 22:23:04'},
        // { order_no:'3333333', category:this.$t('合约交易'),content_type:this.$t('永续合约平仓'),amount:1000,wallettype:'USDT',createTimeStr:'2022-07-16 22:23:04'},
      ],
      symbolType: ''
    }
  },
  mounted() {
    setTimeout(() => {
      this.$refs.tabs.resize();
    }, 500)
  },
  components: {
    assetsHead,
    [List.name]: List,
    [Tabs.name]: Tabs,
    [Tab.name]: Tab
  },
  computed: {
    orderTypes() {
      return {
        withdraw: this.$t('提币'),
        recharge: this.$t('充币'),
        contract_close: this.$t('永续合约平仓'),
        contract_open: this.$t('永续合约建仓'),
        contract_cancel: this.$t('永续合约撤单'),
        fee: this.$t('手续费'),
        exchange_open: this.$t('币币买入'),
        exchange_close: this.$t('币币卖出'),
        exchange_cancel: this.$t('币币撤单'),
        finance: this.$t('理财'),
        finance_profit: this.$t('理财收益'),
        finance_recom_profit: this.$t('理财推广收益'),
        miner_buy: this.$t('锁仓矿机'),
        miner_recom_profit: this.$t('矿机推广收益'),
        miner_profit: this.$t('矿机收益'),
        miner_back: this.$t('矿机赎回'),
        fund_close: this.$t('赎回'),
        fund_open: this.$t('购买'),
        otc_sell: this.$t('otc卖币'),
        otc_buy: this.$t('otc买币'),
        otc_cancel: this.$t('otc订单取消'),
        loan_frozen: this.$t('冻结'),
        loan_thaw: this.$t('解冻'),
        loan_closeout: this.$t('强平'),
        loan_add: this.$t('借款'),
        loan_repay: this.$t('还款'),
        finance_buy: this.$t('购买'),
        finance_back: this.$t('赎回'),
        delivery_contract_open: this.$t('交割合约建仓'),
        delivery_contract_close: this.$t('交割合约平仓')
      }
    },
    category() {
      return {
        coin: this.$t('法币交易'),
        contract: this.$t('合约交易'),
        exchange: this.$t('币币交易'),
        finance: this.$t('理财'),
        miner: this.$t('矿机'),
        otc: this.$t('otc'),
        loan: this.$t('质押借币')
      }
    }
  },
  methods: {
    onChange(e) {
      this.list = []
      this.finished = false
      this.page = 1
      this.type = e
      this.loading = true;
      if (this.loading) {
        this.fetchData()
      }
    },
    onLoad() {
      this.fetchData()
    },
    fetchData() { // 获取数据
      if (this.$route.query.type) {
        this.symbolType = this.$route.query.type
      }
      _fundRecord(this.type, this.page, this.symbolType).then(data => {
        this.list = [...this.list, ...data]
        // console.log(logs)
        this.loading = false
        if (data.length < 20) {
          this.finished = true
        } else {
          this.page++
        }
      })
    },
    onClickLeft() {
      this.$router.go(-1);
    },
    selectBtn() {
      this.isShow = !this.isShow;
    },
    selectItem(item) {
      this.title = item.title;
      this.type = item.type;
      this.isShow = false;
    },
    onSumbit() { // 查询
      this.page = 1
      this.finished = false
      this.list = []
      this.fetchData()
    }
  }
}
</script>
<style lang="scss" scoped>
// @import "@/assets/init.scss";
@import "@/assets/css/deepseek_css_20250625_30ff932.css";
 
 
</style>