diff --git a/doc b/doc new file mode 120000 index 0000000..e85b0fa --- /dev/null +++ b/doc @@ -0,0 +1 @@ +/Volumes/MacintoshHD2/www/wwfsv.muzkcoinsss.com/doc \ No newline at end of file diff --git a/src/api/flashSwap.js b/src/api/flashSwap.js new file mode 100644 index 0000000..81cd484 --- /dev/null +++ b/src/api/flashSwap.js @@ -0,0 +1,35 @@ +import server from './server'; + +class FlashSwap { + static getCoinList() { + return server.get('/flashSwap/getCoinList'); + } + + static getRate(fromCoin, toCoin) { + return server.get('/flashSwap/getRate', { + params: { + from_coin: fromCoin, + to_coin: toCoin + } + }); + } + + static preview(data) { + return server.post('/flashSwap/preview', data); + } + + static execute(data) { + return server.post('/flashSwap/execute', data); + } + + static getHistory(params) { + return server.get('/flashSwap/getHistory', { params }); + } + + static getUserCoinBalance(coinName) { + const params = coinName ? { coin_name: coinName } : {}; + return server.get('/flashSwap/getUserCoinBalance', { params }); + } +} + +export default FlashSwap; diff --git a/src/components/CommonHeader.vue b/src/components/CommonHeader.vue index 971a12a..6566b8a 100644 --- a/src/components/CommonHeader.vue +++ b/src/components/CommonHeader.vue @@ -64,6 +64,9 @@ +
| {{ $t('flashSwap.fromCoin') }} | +{{ $t('flashSwap.toCoin') }} | +{{ $t('flashSwap.fromAmount') }} | +{{ $t('flashSwap.toAmount') }} | +{{ $t('flashSwap.fee') }} | +{{ $t('flashSwap.time') }} | +{{ $t('flashSwap.status') }} | +
|---|---|---|---|---|---|---|
| {{ item.from_coin_name || item.from_coin }} | +{{ item.to_coin_name || item.to_coin }} | +{{ item.from_amount }} | +{{ item.to_amount_net || item.to_amount }} | +{{ item.fee_amount || '--' }} | +{{ item.created_at || item.datetime | parseTime }} | +{{ item.status_text || item.status }} | +
| {{ $t('common.notData') }} | +||||||
| {{$t('wallet.assets')}} | -{{$t('wallet.transferQuantity')}} | -{{$t('wallet.direction')}} | -{{$t('wallet.date')}} | -{{$t('wallet.status')}} | -
|---|---|---|---|---|
|
- |
- {{ item.amount }} | -{{ $t(`wallet.${item.draw_out_direction}`) }} -> {{ $t(`wallet.${item.into_direction}`) }} | -{{ item.datetime|parseTime }} | -- - {{$t('wallet.error')}} - {{$t('wallet.success')}} - | -