diff --git a/html/wallet/css/recharge.css b/html/wallet/css/recharge.css index 3603dc8..346e813 100644 --- a/html/wallet/css/recharge.css +++ b/html/wallet/css/recharge.css @@ -50,4 +50,14 @@ width: 100%; 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; } diff --git a/html/wallet/css/recharge.scss b/html/wallet/css/recharge.scss index 90ebc26..8b5559f 100644 --- a/html/wallet/css/recharge.scss +++ b/html/wallet/css/recharge.scss @@ -65,4 +65,17 @@ width: 100%; color: #999999; } -} \ No newline at end of file +} + +.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; +} diff --git a/html/wallet/html/assets.html b/html/wallet/html/assets.html index 9ab0ca7..73332db 100644 --- a/html/wallet/html/assets.html +++ b/html/wallet/html/assets.html @@ -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() { @@ -320,13 +307,10 @@ }); // 充值点击事件 document.getElementById('btn-recharge').addEventListener('tap', function() { - console.log() - console.log(JSON.stringify(dataInfo.coin)); - recharge(); -// app.openWin('recharge.html', 'recharge.html', '', { -// index: dataInfo.coin.coinIndex, -// coin: dataInfo.coin -// }); + app.openWin('recharge.html', 'recharge.html', '', { + index: dataInfo.coin.coinIndex, + coin: dataInfo.coin + }); }); // 国际化统一方法 window.addEventListener('switchLangueData', function(e) { diff --git a/html/wallet/html/recharge.html b/html/wallet/html/recharge.html index 9472273..d845e78 100644 --- a/html/wallet/html/recharge.html +++ b/html/wallet/html/recharge.html @@ -50,6 +50,7 @@

{{langue.attention | filtVal(coin.tokenSymbol)}}

+
{{langue.confirm}}
@@ -63,7 +64,8 @@ coinWallet: "币币钱包", currencyWallet: "法币钱包", remark: "备注", - + confirm: "确认充值" + }, zh_HK: { title: "充幣", @@ -73,6 +75,7 @@ coinWallet: "幣幣錢包", currencyWallet: "法幣錢包", remark: "備註", + confirm: "確認充值" }, en_US: { title: "Recharge ", @@ -82,6 +85,7 @@ coinWallet: "CCT", currencyWallet: "OTC", remark: "Remark", + confirm: "Recharge" } } @@ -98,15 +102,15 @@ filtVal: function(val, name) { return val.replace(/\{\{coin\.tokenSymbol\}\}/g, name) }, - filetWalletType: function(val) { - if(Object.is("CCT", val)) { - return langue.coinWallet; - } - if(Object.is("C2C", val)) { - return langue.currencyWallet; - } + filetWalletType: function(val) { + if (Object.is("CCT", val)) { + return langue.coinWallet; + } + if (Object.is("C2C", val)) { + return langue.currencyWallet; } - + } + } }); @@ -122,7 +126,7 @@ width: 200, height: 200 }); - if(dataInfo.coin.addr != '') { + if (dataInfo.coin.addr != '') { qrcode.makeCode(dataInfo.coin.addr); } else { 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) { 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} 要复制的值 */ function copyToClip(value) { - if(mui.os.android) { + if (mui.os.android) { var Context = plus.android.importClass("android.content.Context"); var main = plus.android.runtimeMainActivity(); var clip = main.getSystemService(Context.CLIPBOARD_SERVICE); @@ -161,4 +186,4 @@ } - \ No newline at end of file +