完善钱包和修改logo

master
joeyoyo 6 years ago
parent 06f7b4493a
commit 573433d5b9
  1. 62
      html/wallet/html/assets.html
  2. 9
      html/wallet/html/wallet.html
  3. 42
      html/wallet/js/wallet.api.js
  4. 10
      mine/html/my/my_about_us.html
  5. 8
      mine/html/my/share_app.html
  6. 3
      mine/html/wallet_my.html
  7. 1
      mine/html/wallet_pass_login.html
  8. BIN
      mine/img/logo.png
  9. BIN
      mine/img/shareLogo.jpg
  10. BIN
      mine/img/yanhuo_logo.jpg

@ -79,13 +79,13 @@
</div>
</div>
<div class="btn mui-row" v-if="coin.tokenSymbol != 'DIA' && coin.tokenSymbol != 'TIN' ">
<div class="mui-col-sm-6 mui-col-xs-6">
<div class="mui-col-sm-4 mui-col-xs-4">
<div class="btn-recharge" id="btn-recharge">{{langue.addCredit}}</div>
</div>
<!--<div class="mui-col-sm-4 mui-col-xs-4">
<div class="mui-col-sm-4 mui-col-xs-4">
<div class="btn-withdraw" id="btn-withdraw">{{langue.withdrawCoin}}</div>
</div>-->
<div class="mui-col-sm-6 mui-col-xs-6">
</div>
<div class="mui-col-sm-4 mui-col-xs-4">
<div class="btn-transfer" id="btn-transfer">{{langue.transfer}}</div>
</div>
</div>
@ -279,6 +279,19 @@
}
function recharge() {
walletApi.getRecharge({
walletType: dataInfo.coin.walletType,
moduleType: dataInfo.coin.moduleType,
addr: dataInfo.coin.addr
},
function(data) {
app.toast(data.msg)
console.log(data.msg)
});
}
// 记录页面监听
mui(".transaction-data-record").on("tap", "li", function() {
var index = this.getAttribute('data-index');
@ -289,35 +302,30 @@
});
// 提币划转事件
document.getElementById('btn-transfer').addEventListener('tap', function() {
// if(dataInfo.coin.tokenSymbol == 'PC') {
// mui.toast("敬请期待");
// } else {
app.openWin('extract_coin_to_token.html', 'extract_coin_to_token.html', '', {
index: dataInfo.coin.coinIndex,
coin: dataInfo.coin
});
// }
app.openWin('extract_coin_to_token.html', 'extract_coin_to_token.html', '', {
index: dataInfo.coin.coinIndex,
coin: dataInfo.coin
});
});
// 提币点击事件
// document.getElementById('btn-withdraw').addEventListener('tap', function() {
// app.openWin('withdraw.html', 'withdraw.html', '', {
// index: dataInfo.coin.coinIndex,
// coin: dataInfo.coin
// });
//
// });
document.getElementById('btn-withdraw').addEventListener('tap', function() {
app.openWin('withdraw.html', 'withdraw.html', '', {
index: dataInfo.coin.coinIndex,
coin: dataInfo.coin
});
});
// 充值点击事件
document.getElementById('btn-recharge').addEventListener('tap', function() {
// if(dataInfo.coin.tokenSymbol == 'PC') {
// mui.toast("敬请期待");
// } else {
app.openWin('recharge.html', 'recharge.html', '', {
index: dataInfo.coin.coinIndex,
coin: dataInfo.coin
});
// }
console.log()
console.log(JSON.stringify(dataInfo.coin));
recharge();
// app.openWin('recharge.html', 'recharge.html', '', {
// index: dataInfo.coin.coinIndex,
// coin: dataInfo.coin
// });
});
// 国际化统一方法
window.addEventListener('switchLangueData', function(e) {

@ -46,8 +46,8 @@
<div class="coin">
<ul class="coin-ul">
<!--币币账户-->
<li class="coin-item-list" v-for="(coin,index) in coins[wallets[0]]" v-if="coinStatus" :data-index="index" :data-type="wallets[0]">
<div class="coin-kind">
<li class="coin-item-list" v-for="(coin,index) in coins[wallets[0]]" v-if="coinStatus && coin.tokenSymbol != 'PC'" :data-index="index" :data-type="wallets[0]">
<div class="coin-kind" >
<div class="coin-kind-img"><img :src="coin.src" /></div>
<span class="coin-kind-txt">{{coin.tokenSymbol}}</span>
</div>
@ -57,7 +57,7 @@
</div>
</li>
<!--法币账户-->
<li class="coin-item-list" v-for="(coin,index) in coins[wallets[1]]" v-if="!coinStatus" :data-index="index" :data-type="wallets[1]">
<li class="coin-item-list" v-for="(coin,index) in coins[wallets[1]]" v-if="!coinStatus && coin.tokenSymbol != 'PC'" :data-index="index" :data-type="wallets[1]">
<div class="coin-kind">
<div class="coin-kind-img"><img :src="coin.src" /></div>
<span class="coin-kind-txt">{{coin.tokenSymbol}}</span>
@ -206,11 +206,14 @@
function saveWallet() {
walletApi.getCCTWallets(function(data) {
console.log(data);
dataInfo.coins.CCT = data;
coinsEvenPush(data);
valuationFun(dataInfo.marketList, walletApi.walletType.CCT);
})
walletApi.getC2CWallets(function(data) {
console.log(data);
dataInfo.coins.C2C = data;
valuationFun(dataInfo.marketList, walletApi.walletType.C2C);
})

@ -44,6 +44,11 @@ define(['mui', 'app', 'ajaxUtil', 'jsencrypt'], function(mui, app, ajaxUtil, jse
// 钱包API
var walletApi = {
eth: {
//请求充值金額
WALLET_RECHARGE: {
getUrl: ethUrl + "wallet/resetWallet",
getType: type.POST
},
//请求所有钱包信息
WALLET_INFOS: {
getUrl: ethUrl + "wallet/getWallets",
@ -77,6 +82,11 @@ define(['mui', 'app', 'ajaxUtil', 'jsencrypt'], function(mui, app, ajaxUtil, jse
},
btc: {
//请求充值金額
WALLET_RECHARGE: {
getUrl: btcUrl + "wallet/resetWallet",
getType: type.POST
},
//请求所有钱包信息
WALLET_INFOS: {
getUrl: btcUrl + "wallet/getWallets",
@ -110,6 +120,11 @@ define(['mui', 'app', 'ajaxUtil', 'jsencrypt'], function(mui, app, ajaxUtil, jse
},
eos: {
//请求充值金額
WALLET_RECHARGE: {
getUrl: btcUrl + "wallet/resetWallet",
getType: type.POST
},
//请求所有钱包信息
WALLET_INFOS: {
getUrl: eosUrl + "wallet/selectWalletByWalletType",
@ -276,6 +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
},
eos: {
addr: obj.addr
},
btc: {
addr: obj.addr
}
};
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);
});
},
/**
* 获取CCT某种币种的财务记录
* @param {Object} obj
@ -422,10 +458,10 @@ define(['mui', 'app', 'ajaxUtil', 'jsencrypt'], function(mui, app, ajaxUtil, jse
return "";
}
value = value.replace(/[^\d\.]/g, ""); //清除“数字”和“.”以外的字符
if(/\d+\.\d+/.test(value)){
return parseInt(parseFloat(value) * Math.pow(10,d)) / Math.pow(10,d);
if(/\d+\.\d+/.test(value)) {
return parseInt(parseFloat(value) * Math.pow(10, d)) / Math.pow(10, d);
}
return value ;
return value;
}
}
})

@ -146,7 +146,7 @@
</header>
<div class="mui-content">
<div id="logo-content">
<img id="logo" src="../../img/yanhuo_logo.jpg" />
<img id="logo" src="../../img/logo.png" />
</div>
<p class="app-name">{{langue.name}}</p>
<p class="version">Version {{version}}</p>
@ -182,7 +182,7 @@
<button id="protocol" class="mui-btn-link app-text-color">{{langue.service}}</button>
<p>
{{langue.name}}</br>
Copyright © 2019 FLAMEX.IO Corporation.</br>
Copyright © 2019 Zhixin.IO Corporation.</br>
All Rights Reserved.
</p>
</div>
@ -225,7 +225,7 @@
service: '《软件许可及服务协议》',
updateNow: '立即更新',
updateLater: '稍后更新',
name: '焰火网',
name: '智信链',
errorNet: '网络异常,请检查网络状态',
note1: '当前已是最新版本',
note2: '补丁下载失败',
@ -247,7 +247,7 @@
service: '《軟件許可及服務協議》',
updateNow: '立即更新',
updateLater: '稍後更新',
name: '焰火網',
name: '智信鏈',
errorNet: '網絡異常,請檢查網絡狀態',
note1: '當前已是最新版本',
note2: '補丁下載失敗',
@ -268,7 +268,7 @@
service: 'Terms Of Service and Privacy Policy',
updateNow: 'Update Now',
updateLater: 'Update Later',
name: 'FLAME',
name: 'Zhixin',
errorNet: 'Net error',
note1: 'Currently the latest version',
note2: 'Patch download failed',

@ -75,7 +75,7 @@
</header>
<div class="mui-content">
<div id="logo-content">
<img id="logo" src="../../img/yanhuo_logo.jpg" />
<img id="logo" src="../../img/logo.png" />
</div>
<p class="app-name">{{langue.name}}</p>
<div class="version">
@ -101,20 +101,20 @@
zh_CN: {
cancel: '取消',
about: '分享App',
name: '焰火网',
name: '智信链',
note: '扫描二维码即分享',
},
zh_HK: {
cancel: '取消',
about: '分享App',
name: '焰火網',
name: '智信鏈',
note: '掃描二維碼即分享',
},
en_US: {
cancel: 'Cancel',
about: 'Share',
name: 'Flame.io',
name: 'Zhixin',
note: 'Scan QR code to share',
}
};

@ -394,6 +394,9 @@
dataType: 'json', //服务器返回json格式数据
timeout: 10000, //超时时间设置为10秒;
success: function(data) {
console.log(JSON.stringify(data))
console.log(app.getTokenStorage())
if ("200" == data.code) {
// 更新用户缓存数据
app.setUserLocalStorage(data.data);

@ -336,7 +336,6 @@
},
error: function(xhr, type, errorThrown) {
plus.nativeUI.closeWaiting();
// app.toast(langue.AjaxError);
}
})
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 172 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 133 KiB

Loading…
Cancel
Save