修改充值页面重置充值

master
joeyoyo 5 years ago
parent ba953af0a7
commit 5deefbe8ee
  1. 12
      html/wallet/css/recharge.css
  2. 15
      html/wallet/css/recharge.scss
  3. 24
      html/wallet/html/assets.html
  4. 49
      html/wallet/html/recharge.html

@ -50,4 +50,14 @@
width: 100%; width: 100%;
color: #999999; } color: #999999; }
/*# sourceMappingURL=recharge.css.map */ .btn-recharge {
width: 100%;
height: .86rem;
background: linear-gradient(90deg, #ff9d00 0%, #ffcd34 100%);
position: fixed;
bottom: 0;
line-height: .86rem;
color: #FFFFFF;
text-align: center;
border: 1px solid #FFCD34;
z-index: 99; }

@ -65,4 +65,17 @@
width: 100%; width: 100%;
color: #999999; color: #999999;
} }
} }
.btn-recharge{
width:100%;
height:.86rem;
background:linear-gradient(90deg,rgba(255,157,0,1) 0%,rgba(255,205,52,1) 100%);
position: fixed;
bottom: 0;
line-height: .86rem;
color: #FFFFFF;
text-align: center;
border: 1px solid #FFCD34;
z-index: 99;
}

@ -279,19 +279,6 @@
} }
function recharge() {
walletApi.getRecharge({
walletType: dataInfo.coin.walletType,
moduleType: dataInfo.coin.moduleType,
addr: dataInfo.coin.addr,
tokenId:dataInfo.coin.tokenSymbol
},
function(data) {
app.toast(data.msg)
console.log(data.msg)
});
}
// 记录页面监听 // 记录页面监听
mui(".transaction-data-record").on("tap", "li", function() { mui(".transaction-data-record").on("tap", "li", function() {
@ -320,13 +307,10 @@
}); });
// 充值点击事件 // 充值点击事件
document.getElementById('btn-recharge').addEventListener('tap', function() { document.getElementById('btn-recharge').addEventListener('tap', function() {
console.log() app.openWin('recharge.html', 'recharge.html', '', {
console.log(JSON.stringify(dataInfo.coin)); index: dataInfo.coin.coinIndex,
recharge(); coin: dataInfo.coin
// app.openWin('recharge.html', 'recharge.html', '', { });
// index: dataInfo.coin.coinIndex,
// coin: dataInfo.coin
// });
}); });
// 国际化统一方法 // 国际化统一方法
window.addEventListener('switchLangueData', function(e) { window.addEventListener('switchLangueData', function(e) {

@ -50,6 +50,7 @@
<div class="recharge-note"> <div class="recharge-note">
<p>{{langue.attention | filtVal(coin.tokenSymbol)}}</p> <p>{{langue.attention | filtVal(coin.tokenSymbol)}}</p>
</div> </div>
<div id="btn-recharge" class="btn-recharge">{{langue.confirm}}</div>
</div> </div>
</div> </div>
</body> </body>
@ -63,7 +64,8 @@
coinWallet: "币币钱包", coinWallet: "币币钱包",
currencyWallet: "法币钱包", currencyWallet: "法币钱包",
remark: "备注", remark: "备注",
confirm: "确认充值"
}, },
zh_HK: { zh_HK: {
title: "充幣", title: "充幣",
@ -73,6 +75,7 @@
coinWallet: "幣幣錢包", coinWallet: "幣幣錢包",
currencyWallet: "法幣錢包", currencyWallet: "法幣錢包",
remark: "備註", remark: "備註",
confirm: "確認充值"
}, },
en_US: { en_US: {
title: "Recharge ", title: "Recharge ",
@ -82,6 +85,7 @@
coinWallet: "CCT", coinWallet: "CCT",
currencyWallet: "OTC", currencyWallet: "OTC",
remark: "Remark", remark: "Remark",
confirm: "Recharge"
} }
} }
@ -98,15 +102,15 @@
filtVal: function(val, name) { filtVal: function(val, name) {
return val.replace(/\{\{coin\.tokenSymbol\}\}/g, name) return val.replace(/\{\{coin\.tokenSymbol\}\}/g, name)
}, },
filetWalletType: function(val) { filetWalletType: function(val) {
if(Object.is("CCT", val)) { if (Object.is("CCT", val)) {
return langue.coinWallet; return langue.coinWallet;
} }
if(Object.is("C2C", val)) { if (Object.is("C2C", val)) {
return langue.currencyWallet; return langue.currencyWallet;
}
} }
}
} }
}); });
@ -122,7 +126,7 @@
width: 200, width: 200,
height: 200 height: 200
}); });
if(dataInfo.coin.addr != '') { if (dataInfo.coin.addr != '') {
qrcode.makeCode(dataInfo.coin.addr); qrcode.makeCode(dataInfo.coin.addr);
} else { } else {
require(['walletApi'], function(walletApi) { require(['walletApi'], function(walletApi) {
@ -134,18 +138,39 @@
}) })
}) })
} }
// 確認充值点击事件
document.getElementById('btn-recharge').addEventListener('tap', function() {
console.log(JSON.stringify(dataInfo.coin));
recharge();
});
}) })
// 国际化统一方法 // 国际化统一方法
window.addEventListener('switchLangueData', function(e) { window.addEventListener('switchLangueData', function(e) {
dataInfo.langue = langues[e.detail]; dataInfo.langue = langues[e.detail];
}); });
function recharge() {
require(['walletApi'], function(walletApi) {
walletApi.getRecharge({
walletType: dataInfo.coin.walletType,
moduleType: dataInfo.coin.moduleType,
addr: dataInfo.coin.addr,
tokenId: dataInfo.coin.tokenSymbol
},
function(data) {
app.toast(data.msg)
console.log(data.msg)
});
})
}
/** /**
* 复制到剪切板 * 复制到剪切板
* @param {Object} 要复制的值 * @param {Object} 要复制的值
*/ */
function copyToClip(value) { function copyToClip(value) {
if(mui.os.android) { if (mui.os.android) {
var Context = plus.android.importClass("android.content.Context"); var Context = plus.android.importClass("android.content.Context");
var main = plus.android.runtimeMainActivity(); var main = plus.android.runtimeMainActivity();
var clip = main.getSystemService(Context.CLIPBOARD_SERVICE); var clip = main.getSystemService(Context.CLIPBOARD_SERVICE);
@ -161,4 +186,4 @@
} }
</script> </script>
</html> </html>

Loading…
Cancel
Save