完善钱包充值

master
joeyoyo 5 years ago
parent 573433d5b9
commit 5f146b11e9
  1. 3
      html/wallet/html/assets.html
  2. 19
      html/wallet/js/wallet.api.js

@ -283,7 +283,8 @@
walletApi.getRecharge({
walletType: dataInfo.coin.walletType,
moduleType: dataInfo.coin.moduleType,
addr: dataInfo.coin.addr
addr: dataInfo.coin.addr,
tokenId:dataInfo.coin.tokenSymbol
},
function(data) {
app.toast(data.msg)

@ -122,7 +122,7 @@ define(['mui', 'app', 'ajaxUtil', 'jsencrypt'], function(mui, app, ajaxUtil, jse
eos: {
//请求充值金額
WALLET_RECHARGE: {
getUrl: btcUrl + "wallet/resetWallet",
getUrl: eosUrl + "wallet/resetWallet",
getType: type.POST
},
//请求所有钱包信息
@ -291,22 +291,27 @@ define(['mui', 'app', 'ajaxUtil', 'jsencrypt'], function(mui, app, ajaxUtil, jse
fun(moduleType(obj.moduleType, data.data));
});
},
//充值重置
getRecharge: function(obj, fun) {
console.log(JSON.stringify(obj));
var params = {
eth: {
addr: obj.addr
addr: obj.addr,
walletType:obj.walletType,
tokenId:obj.tokenId
},
eos: {
addr: obj.addr
addr: obj.addr,
walletType:obj.walletType,
tokenId:obj.tokenId
},
btc: {
addr: obj.addr
addr: obj.addr,
walletType:obj.walletType,
tokenId:obj.tokenId
}
};
params[obj.moduleType].walletType = obj.walletType;
params[obj.moduleType].tokenId = obj.moduleType;
ajaxUtil.send(walletApi[obj.moduleType].WALLET_RECHARGE, params[obj.moduleType]).then(function(data) {
console.log(JSON.stringify(data));
fun(data);

Loading…
Cancel
Save