充值功能修改接口

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. 15
      src/api/eth.js
  5. 47
      src/components/balances/banlanes-tabds.vue
  6. 12
      src/locales/lang/balances.en.js
  7. 5
      src/locales/lang/balances.zh-CN.js
  8. 5
      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 c2cApi = 'https://c2c.flamex.io'; //法币
// export const btcApi = 'https://btc.flamex.io'; //BTC钱包
// 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钱包请求结束
// 请求函数结束

@ -1,7 +1,6 @@
import request from '@/utils/request';
import {eosApi} from './app';
// 请求函数开始 获取EOS钱包信息,财务记录,充值地址,提币
// 获取钱包EOS币种信息
@ -95,7 +94,18 @@ export function sureOTCTiEos({
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钱包请求结束
// 请求函数结束

@ -32,7 +32,7 @@ export function chargeEth({tokenSymbol}) {
// 获取钱包密码公钥 btc,eos,eth共有公钥
export function getKey() {
return request({
url: ethApi + '/wallet/getPublicKey?rd=' + Math.random(),//防止某些浏览器从缓存拿数据
url: ethApi + '/wallet/getPublicKey?rd=' + Math.random(), //防止某些浏览器从缓存拿数据
method: 'get',
});
}
@ -88,7 +88,18 @@ export function sureOTCTiEth({
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钱包请求结束
// 请求函数结束

@ -358,11 +358,11 @@ import BalancesWithdrawalWidget from '@/components/balances/balances-withdrawal-
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';
@ -469,9 +469,46 @@ export default {
// this.$message.warning('!');
// return;
// }
this.ctrl.depositDialogVisible = true;
// this.ctrl.depositDialogVisible = true;
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;
case 'withdrawal':

@ -13,12 +13,14 @@ export default {
header_nodata: 'No Data',
header_wan: 'Coin Wallet',
header_otc: 'Legal Wallet',
header_last_hua:'Transfer',
header_last_hua: 'Transfer',
header_sweep: 'Scan code recharge',
header_amout: 'Amount of money raised',
header_between: 'Asset rotation',
header_betweenBibi: 'Please transfer the withdrawal to the currency trading account',
header_betweenOtc: 'Please transfer it to the French currency trading account',
header_betweenBibi:
'Please transfer the withdrawal to the currency trading account',
header_betweenOtc:
'Please transfer it to the French currency trading account',
header_cong: 'From',
header_zhuan: 'Turn to',
header_many: 'Amount of money',
@ -31,7 +33,9 @@ export default {
header_fuzhi: 'Already copied',
header_shibai: 'Replication failed, please manually replicate',
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!',
},
},
};

@ -13,7 +13,7 @@ export default {
header_nodata: '暂无数据',
header_wan: '币币钱包',
header_otc: '法币钱包',
header_last_hua:'划转',
header_last_hua: '划转',
header_sweep: '扫码充值',
header_amout: '提币数量',
header_between: '资产互转',
@ -31,7 +31,8 @@ export default {
header_fuzhi: '已复制',
header_shibai: '复制失败,请手动复制',
header_hou: '返回',
asset_warin:'金额不能为0或者大于可用余额',
asset_warin: '金额不能为0或者大于可用余额',
add: '充值成功!',
},
},
};

@ -13,7 +13,7 @@ export default {
header_nodata: '暫無數據',
header_wan: '幣幣錢包',
header_otc: '法幣錢包',
header_last_hua:'劃轉',
header_last_hua: '劃轉',
header_sweep: '掃碼充值',
header_amout: '提幣數量',
header_between: '資產互轉',
@ -31,7 +31,8 @@ export default {
header_fuzhi: '已復制',
header_shibai: '復制失敗,請手動復制',
header_hou: '返回',
asset_warin:'金額不能為0或者大於可用余額',
asset_warin: '金額不能為0或者大於可用余額',
add: '充值成功!',
},
},
};

Loading…
Cancel
Save