充值功能修改接口

master
钟海欣 5 years ago
parent 81296ea483
commit 2177527775
  1. 1
      src/api/app.js
  2. 13
      src/api/btc.js
  3. 14
      src/api/eos.js
  4. 13
      src/api/eth.js
  5. 47
      src/components/balances/banlanes-tabds.vue
  6. 10
      src/locales/lang/balances.en.js
  7. 1
      src/locales/lang/balances.zh-CN.js
  8. 1
      src/locales/lang/balances.zh-HK.js

@ -10,7 +10,6 @@ export const userApi = 'http://www.zhixinchains.com/user'; //用户
export const FILE_URL = 'http://www.zhixinchains.com/files/'; //图片地址 export const FILE_URL = 'http://www.zhixinchains.com/files/'; //图片地址
// export const c2cApi = 'https://c2c.flamex.io'; //法币 // export const c2cApi = 'https://c2c.flamex.io'; //法币
// export const btcApi = 'https://btc.flamex.io'; //BTC钱包 // export const btcApi = 'https://btc.flamex.io'; //BTC钱包
// export const eosApi = 'https://eos.flamex.io'; //EOS钱包 // export const eosApi = 'https://eos.flamex.io'; //EOS钱包

@ -98,7 +98,18 @@ export function sureOTCTiBtc({toAddr, password, amount, tokenId, walletType}) {
}); });
} }
// 点击充值
export function addBtc({addr, tokenId, walletType}) {
return request({
url: btcApi + '/wallet/resetWallet',
method: 'post',
params: {
addr,
tokenId,
walletType,
},
});
}
// OTC钱包请求结束 // OTC钱包请求结束
// 请求函数结束 // 请求函数结束

@ -1,7 +1,6 @@
import request from '@/utils/request'; import request from '@/utils/request';
import {eosApi} from './app'; import {eosApi} from './app';
// 请求函数开始 获取EOS钱包信息,财务记录,充值地址,提币 // 请求函数开始 获取EOS钱包信息,财务记录,充值地址,提币
// 获取钱包EOS币种信息 // 获取钱包EOS币种信息
@ -95,7 +94,18 @@ export function sureOTCTiEos({
params: {password, toAddr, amount, tokenName, walletType}, params: {password, toAddr, amount, tokenName, walletType},
}); });
} }
// 点击充值
export function addEos({addr, tokenId, walletType}) {
return request({
url: eosApi + '/wallet/resetWallet',
method: 'post',
params: {
addr,
tokenId,
walletType,
},
});
}
// OTC钱包请求结束 // OTC钱包请求结束
// 请求函数结束 // 请求函数结束

@ -88,7 +88,18 @@ export function sureOTCTiEth({
params: {walletType, tokenAddr, password, toAddr, amount}, params: {walletType, tokenAddr, password, toAddr, amount},
}); });
} }
// 点击充值
export function addEth({addr, tokenId, walletType}) {
return request({
url: ethApi + '/wallet/resetWallet',
method: 'post',
params: {
addr,
tokenId,
walletType,
},
});
}
// OTC钱包请求结束 // OTC钱包请求结束
// 请求函数结束 // 请求函数结束

@ -358,11 +358,11 @@ import BalancesWithdrawalWidget from '@/components/balances/balances-withdrawal-
import {getExchangeRateCookie} from '@/utils/auth'; import {getExchangeRateCookie} from '@/utils/auth';
// //
import {getBtc, chargeBtc, chargeUsdt, transferBtc} from '@/api/btc.js'; import {getBtc, chargeBtc, chargeUsdt, transferBtc, addBtc} from '@/api/btc.js';
import {getEth, chargeEth, transferEth} from '@/api/eth.js'; import {getEth, chargeEth, transferEth, addEth} from '@/api/eth.js';
import {getEos, upEosAddr, chargeEos, transferEos} from '@/api/eos.js'; import {getEos, upEosAddr, chargeEos, transferEos, addEos} from '@/api/eos.js';
import {getLeftPrice} from '@/api/currency.js'; import {getLeftPrice} from '@/api/currency.js';
@ -469,9 +469,46 @@ export default {
// this.$message.warning('!'); // this.$message.warning('!');
// return; // return;
// } // }
this.ctrl.depositDialogVisible = true; // this.ctrl.depositDialogVisible = true;
this.tatoo = name; this.tatoo = name;
// console.log(this.tatoo); if (name.tokenSymbol == 'EOS') {
addEos({
addr: name.addr,
tokenId: name.tokenSymbol,
walletType: 'CCT',
}).then(res => {
if (res.data.code === 200) {
//
this.$message.success(this.$t('balances.table.add'));
} else {
this.$message.error(res.data.msg);
}
});
} else if (name.tokenSymbol == 'BTC' || name.tokenSymbol == 'USDT') {
addBtc({
addr: name.addr,
tokenId: name.tokenSymbol,
walletType: 'CCT',
}).then(res => {
if (res.data.code === 200) {
this.$message.success(this.$t('balances.table.add'));
} else {
this.$message.error(res.data.msg);
}
});
} else {
addEth({
addr: name.addr,
tokenId: name.tokenSymbol,
walletType: 'CCT',
}).then(res => {
if (res.data.code === 200) {
this.$message.success(this.$t('balances.table.add'));
} else {
this.$message.error(res.data.msg);
}
});
}
break; break;
case 'withdrawal': case 'withdrawal':

@ -17,8 +17,10 @@ export default {
header_sweep: 'Scan code recharge', header_sweep: 'Scan code recharge',
header_amout: 'Amount of money raised', header_amout: 'Amount of money raised',
header_between: 'Asset rotation', header_between: 'Asset rotation',
header_betweenBibi: 'Please transfer the withdrawal to the currency trading account', header_betweenBibi:
header_betweenOtc: 'Please transfer it to the French currency trading account', 'Please transfer the withdrawal to the currency trading account',
header_betweenOtc:
'Please transfer it to the French currency trading account',
header_cong: 'From', header_cong: 'From',
header_zhuan: 'Turn to', header_zhuan: 'Turn to',
header_many: 'Amount of money', header_many: 'Amount of money',
@ -31,7 +33,9 @@ export default {
header_fuzhi: 'Already copied', header_fuzhi: 'Already copied',
header_shibai: 'Replication failed, please manually replicate', header_shibai: 'Replication failed, please manually replicate',
header_hou: 'Return', header_hou: 'Return',
asset_warin:'The amount shall not be 0 or greater than the available balance', asset_warin:
'The amount shall not be 0 or greater than the available balance',
add: 'The recharge was successful!',
}, },
}, },
}; };

@ -32,6 +32,7 @@ export default {
header_shibai: '复制失败,请手动复制', header_shibai: '复制失败,请手动复制',
header_hou: '返回', header_hou: '返回',
asset_warin: '金额不能为0或者大于可用余额', asset_warin: '金额不能为0或者大于可用余额',
add: '充值成功!',
}, },
}, },
}; };

@ -32,6 +32,7 @@ export default {
header_shibai: '復制失敗,請手動復制', header_shibai: '復制失敗,請手動復制',
header_hou: '返回', header_hou: '返回',
asset_warin: '金額不能為0或者大於可用余額', asset_warin: '金額不能為0或者大於可用余額',
add: '充值成功!',
}, },
}, },
}; };

Loading…
Cancel
Save