#iphone兼容

master
zhangziliang 5 years ago
parent 252091db2c
commit aca4604f82
  1. 1
      html/cct/html/cct_index.html
  2. 9
      html/home/html/home.html
  3. 546
      html/market/css/market_info.css
  4. 2
      html/market/js/echarts_options.js
  5. 251
      html/market/js/market.js
  6. 1409
      html/market/js/market_info.js
  7. 319
      html/market/js/market_old.js
  8. 241
      html/market/market.html
  9. 102
      html/market/market_info.html
  10. 194
      html/market/market_old.html
  11. 25
      lib/css/iphone_styles.css
  12. 2
      mine/html/my/charges_that.html
  13. 27
      mine/html/my/my_help_center.html
  14. 64
      mine/html/my/my_help_center_subordinate/my_help_center_add_wallet.html
  15. 27
      mine/html/wallet_login.html
  16. 58
      mine/html/wallet_my.html
  17. 27
      mine/html/wallet_pass_login.html
  18. 75
      mine/html/wallet_sign_up.html
  19. 26
      mine/html/wallet_terms_of_service.html

@ -1068,6 +1068,7 @@
//点击盘口,赋值到单价input框
mui(".right-box").on("tap", ".listnum", function() {
var price = this.getAttribute('data-price');
price = app.formatValueStr(price, dataInfo.unit_decimal)
dataInfo.price = price;
});
//撤单

@ -95,6 +95,15 @@
.app-coin-percent-up {
background: #73D13D !important;
}
@media only screen and (-webkit-device-pixel-ratio: 3) and (device-height: 812px) and (device-width: 375px) {
.mui-bar.mui-bar-nav{
padding: 35px;
}
.mui-content{
padding-top: 1.2rem !important;
}
}
</style>
</head>

@ -1,230 +1,356 @@
.popover {
transition: all 0.3s;
transform: translate(-100%, 0);
width: 3.88rem;
height: 100%;
width: 3.88rem;
background: #FFFFFF;
position: fixed;
top: 1.1rem;
bottom: 0;
z-index: 5; }
.popover .popover-top {
width: 100%;
height: .65rem;
border-top: 1px solid #EEEEEE;
font-size: .24rem;
font-weight: 400;
color: #666666;
line-height: .2rem; }
.popover .popover-top .mui-segmented-control {
width: 100%;
overflow-x: auto;
display: flex;
overflow: auto; }
.popover .popover-top .mui-segmented-control::-webkit-scrollbar {
display: none; }
.popover .popover-top .mui-segmented-control .mui-control-item {
overflow: visible;
flex: 1;
width: unset;
margin-right: .5rem; }
.popover .popover-top .mui-segmented-control .mui-control-item:first-child {
padding-left: .3rem; }
.popover .popover-top .mui-segmented-control .mui-control-item:last-child {
padding-right: .3rem; }
.popover .mui-table-view {
background: #FFFFFF; }
.popover .mui-table-view:before {
background-color: #EEEEEE; }
.popover .mui-table-view:after {
height: 0; }
.popover .mui-table-view-cell {
width: 100%;
height: .65rem;
display: flex;
justify-content: space-between; }
.popover .mui-table-view-cell:after {
left: 0;
background-color: #EEEEEE; }
.popover .mui-table-view-cell .popover-coin {
font-size: .24rem;
color: #333333; }
.popover .mui-table-view-cell .popover-coin span {
color: #666666;
font-size: .17rem; }
.popover .mui-table-view-cell .popover-price {
font-size: .24rem;
color: #4CD49B; }
transition: all 0.3s;
transform: translate(-100%, 0);
width: 3.88rem;
height: 100%;
width: 3.88rem;
background: #FFFFFF;
position: fixed;
top: 1.1rem;
bottom: 0;
z-index: 5;
}
.popover .popover-top {
width: 100%;
height: .65rem;
border-top: 1px solid #EEEEEE;
font-size: .24rem;
font-weight: 400;
color: #666666;
line-height: .2rem;
}
.popover .popover-top .mui-segmented-control {
width: 100%;
overflow-x: auto;
display: flex;
overflow: auto;
}
.popover .popover-top .mui-segmented-control::-webkit-scrollbar {
display: none;
}
.popover .popover-top .mui-segmented-control .mui-control-item {
overflow: visible;
flex: 1;
width: unset;
margin-right: .5rem;
}
.popover .popover-top .mui-segmented-control .mui-control-item:first-child {
padding-left: .3rem;
}
.popover .popover-top .mui-segmented-control .mui-control-item:last-child {
padding-right: .3rem;
}
.popover .mui-table-view {
background: #FFFFFF;
}
.popover .mui-table-view:before {
background-color: #EEEEEE;
}
.popover .mui-table-view:after {
height: 0;
}
.popover .mui-table-view-cell {
width: 100%;
height: .65rem;
display: flex;
justify-content: space-between;
}
.popover .mui-table-view-cell:after {
left: 0;
background-color: #EEEEEE;
}
.popover .mui-table-view-cell .popover-coin {
font-size: .24rem;
color: #333333;
}
.popover .mui-table-view-cell .popover-coin span {
color: #666666;
font-size: .17rem;
}
.popover .mui-table-view-cell .popover-price {
font-size: .24rem;
color: #4CD49B;
}
.market-info {
width: 100%;
height: 1.3rem;
background: #FFFFFF;
display: flex;
justify-content: space-around;
align-items: center; }
.market-info .market--info-left {
margin-right: 1rem;
font-family: Helvetica; }
.market-info .market--info-left .coin-price {
font-size: .43rem;
font-weight: bold;
color: #666666;
line-height: .2rem;
display: block;
padding-bottom: .3rem; }
.market-info .market--info-left .coin-rate {
font-size: .24rem;
color: #666666;
line-height: .2rem; }
.market-info .market--info-left .coin-rate .coin-gain {
font-size: .2rem;
color: #73D13D; }
.market-info .market-info-right {
font-size: .2rem; }
.market-info .market-info-right li {
width: 1.75rem;
display: flex;
justify-content: space-between; }
.market-info .market-info-right span {
display: block;
padding-bottom: .1rem; }
.market-info .market-info-right .coin-ranking {
color: #666666;
line-height: .2rem; }
.market-info .market-info-right .coin-ranking-info {
font-family: Helvetica;
color: #999999;
line-height: .2rem; }
width: 100%;
height: 1.3rem;
background: #FFFFFF;
display: flex;
justify-content: space-around;
align-items: center;
}
.market-info .market--info-left {
margin-right: 1rem;
font-family: Helvetica;
}
/* 左侧金额文字 */
.market-info .market--info-left .coin-price {
font-size: .43rem;
font-weight: bold;
color: #50BC78;
line-height: .2rem;
display: block;
padding-bottom: .3rem;
}
.market-info .market--info-left .coin-price.price-height{
color: #50BC78;
}
.market-info .market--info-left .coin-price.price-low{
color: #E95F61;
}
.market-info .market--info-left .coin-rate {
font-size: .24rem;
color: #666666;
line-height: .2rem;
}
.market-info .market--info-left .coin-rate .coin-gain {
font-size: .2rem;
color: #73D13D;
}
.market-info .market-info-right {
font-size: .2rem;
}
.market-info .market-info-right li {
width: 1.75rem;
display: flex;
justify-content: space-between;
}
.market-info .market-info-right span {
display: block;
padding-bottom: .1rem;
}
.market-info .market-info-right .coin-ranking {
/* color: #8B9FB4; */
line-height: .2rem;
}
.market-info .market-info-right .coin-ranking-info {
font-family: Helvetica;
/* color: #B3D0E7; */
line-height: .2rem;
}
.market-k,
.market-bottom {
background: #FFFFFF;
color: #666666;
font-size: .24rem; }
background: #FFFFFF;
color: #666666;
font-size: .24rem;
}
.market-bottom {
background: #FFFFFF;
padding-bottom: .2rem;
margin: .2rem 0 .9rem 0; }
.market-bottom .buying-selling li {
width: 100%;
display: flex;
margin: 0 auto;
text-align: center; }
.market-bottom .buying-selling li span {
flex: 1; }
.market-bottom .buying-selling li span:nth-child(3) {
flex: 2; }
.market-bottom .buying-selling li span:first-child, .market-bottom .buying-selling li span:last-child {
flex: 0.5; }
.market-bottom .buying-selling li p {
flex: 2;
display: flex; }
.market-bottom .buying-selling li p span {
flex: 1; }
.market-bottom .buying-selling li p .price-buy {
color: #4CD49B;
text-align: right; }
.market-bottom .buying-selling li p .price-sale {
color: #FD595D;
text-align: left; }
.market-bottom .buying-selling .buying-selling-title {
font-size: .2rem;
color: #333333; }
.market-bottom .buying-selling .buying-selling-info {
font-size: .17rem; }
.market-bottom .buying-selling .buying-selling-info p {
font-size: .17rem; }
.market-bottom .buying-selling .buying-selling-info .buy-sale {
color: #6584AB; }
.market-bottom .buying-selling .buying-selling-info .buy-sale-num {
color: #999999; }
background: #FFFFFF;
/* padding-bottom: .2rem; */
/* margin: .2rem 0 .9rem 0; */
}
.market-bottom .buying-selling li {
width: 100%;
display: flex;
margin: 0 auto;
text-align: center;
}
.market-bottom .buying-selling li span {
flex: 1;
}
.market-bottom .buying-selling li span:nth-child(3) {
flex: 2;
}
.market-bottom .buying-selling li span:first-child,
.market-bottom .buying-selling li span:last-child {
flex: 0.5;
}
.market-bottom .buying-selling li p {
flex: 2;
display: flex;
}
.market-bottom .buying-selling li p span {
flex: 1;
}
.market-bottom .buying-selling li p .price-buy {
color: #4CD49B;
text-align: right;
}
.market-bottom .buying-selling li p .price-sale {
color: #FD595D;
text-align: left;
}
.market-bottom .buying-selling .buying-selling-title {
font-size: .2rem;
color: #425877;
}
.market-bottom .buying-selling .buying-selling-info {
font-size: .17rem;
}
.market-bottom .buying-selling .buying-selling-info p {
font-size: .17rem;
}
.market-bottom .buying-selling .buying-selling-info .buy-sale {
color: #6584AB;
}
.market-bottom .buying-selling .buying-selling-info .buy-sale-num {
color: #999999;
}
.transaction {
margin-top: .2rem; }
.transaction li {
width: 94%;
display: flex;
margin: 0 auto;
font-size: .17rem;
text-align: center; }
.transaction .transaction-title {
color: #333333; }
.transaction .transaction-title span {
flex: 1; }
.transaction .transaction-info span {
flex: 1; }
.transaction .transaction-info .transaction-time,
.transaction .transaction-info .transaction-num {
color: #6584AB; }
.transaction .transaction-info .transaction-direction-sale {
color: #FD595D; }
.transaction .transaction-info .transaction-direction-buy {
color: #4CD49B; }
.transaction .transaction-info .transaction-price {
color: #999999; }
margin-top: .2rem;
}
.transaction li {
width: 94%;
display: flex;
margin: 0 auto;
font-size: .17rem;
text-align: center;
}
.transaction .transaction-title {
color: #333333;
}
.transaction .transaction-title span {
flex: 1;
}
.transaction .transaction-info span {
flex: 1;
}
.transaction .transaction-info .transaction-time,
.transaction .transaction-info .transaction-num {
color: #6584AB;
}
.transaction .transaction-info .transaction-direction-sale {
color: #FD595D;
}
.transaction .transaction-info .transaction-direction-buy {
color: #4CD49B;
}
.transaction .transaction-info .transaction-price {
color: #999999;
}
.introduction h3 {
width: 90%;
color: #333333;
font-size: .37rem;
margin: .2rem auto; }
width: 100%;
/* color: #FFF; */
font-size: .31rem;
margin: 0 auto;
}
.introduction h3.title{
text-align: center;
}
.introduction h3.datail{
width: 90%;
margin: 0 auto;
margin-bottom: .1rem;
}
.introduction .introduction-item .introduction-item-list {
width: 90%;
display: flex;
justify-content: space-between;
align-items: center;
font-size: .24rem;
margin: 0 auto; }
.introduction .introduction-item .introduction-item-list span {
padding: .1rem 0; }
.introduction .introduction-item .introduction-item-list .introduction-item-list-txt {
color: #666666; }
.introduction .introduction-item .introduction-item-list .introduction-item-list-num {
width: 70%;
color: #999999;
word-wrap: break-word;
word-break: normal;
text-align: right; }
width: 90%;
display: flex;
justify-content: space-between;
align-items: center;
font-size: .24rem;
margin: 0 auto;
}
.introduction .introduction-item .introduction-item-list span {
padding: .1rem 0;
}
.introduction .introduction-item .introduction-item-list .introduction-item-list-txt {
color: #000;
}
.introduction .introduction-item .introduction-item-list .introduction-item-list-num {
width: 75%;
/* color: #FFF; */
word-wrap: break-word;
word-break: normal;
text-align: right;
}
#descr{
/* color:#6787AE; */
}
.introduction p {
width: 90%;
font-size: .24rem;
color: #999999;
line-height: .3rem;
margin: 0 auto;
text-indent: .4rem; }
width: 90%;
font-size: .24rem;
color: #999999;
line-height: .3rem;
margin: 0 auto;
text-indent: .4rem;
}
.btn-group {
display: flex;
justify-content: center;
position: fixed;
bottom: .2rem;
width: 100%;
margin-top: .2rem; }
.btn-group .btn-group-buy,
.btn-group .btn-group-sale {
width: 44%;
height: .6rem;
background: #73D13D;
border-radius: 4px;
font-size: .27rem;
color: #FFFFFF;
text-align: center;
line-height: .6rem;
margin: 0 .1rem; }
.btn-group .btn-group-sale {
background: #E32E33; }
display: flex;
justify-content: center;
position: fixed;
bottom: .2rem;
width: 100%;
margin-top: .2rem;
}
.btn-group .btn-group-buy,
.btn-group .btn-group-sale {
width: 44%;
height: .6rem;
background: #73D13D;
border-radius: 4px;
font-size: .27rem;
color: #FFFFFF;
text-align: center;
line-height: .6rem;
margin: 0 .1rem;
}
.btn-group .btn-group-sale {
background: #E32E33;
}
.bg {
position: fixed;
left: 0;
bottom: 0;
right: 0;
top: 0;
background: rgba(21, 33, 54, 0.8);
z-index: 2;
display: none; }
position: fixed;
left: 0;
bottom: 0;
right: 0;
top: 0;
background: rgba(21, 33, 54, 0.8);
z-index: 2;
display: none;
}
/*# sourceMappingURL=market_info.css.map */

@ -84,7 +84,7 @@
axisPointer: {
type: 'cross'
},
backgroundColor: '#EEEEEE',
backgroundColor: '#FFFFFF',
borderWidth: 1,
borderColor: borderColor,
padding: 10,

@ -6,7 +6,17 @@ var langues = {
all: '全部',
change: '涨跌幅',
favorites: "自选",
fullMarket:'全部'
fullMarket: '全部',
nav1: '自选',
nav2: '主板',
nav3: '合约',
nav4: '币股',
nav5: '币汇',
tab1: '币种',
tab2: '最新价',
tab3: '涨跌幅',
alertToast: '敬请期待',
},
zh_HK: {
title: '行情',
@ -14,8 +24,17 @@ var langues = {
all: '全部',
change: '漲跌幅',
favorites: " 自選",
fullMarket:'全部'
fullMarket: '全部',
nav1: '自選',
nav2: '主板',
nav3: '合約',
nav4: '幣股',
nav5: '幣匯',
tab1: '幣種',
tab2: '最新價',
tab3: '漲跌幅',
alertToast: '敬請期待',
},
en_US: {
title: 'Market',
@ -23,7 +42,16 @@ var langues = {
all: 'All',
change: 'Change',
favorites: "Favorites",
fullMarket:'All'
fullMarket: 'All',
nav1: 'Optional',
nav2: 'Main',
nav3: 'Contract',
nav4: 'Money',
nav5: 'Currency',
tab1: 'Currency',
tab2: 'Latest',
tab3: 'Applies',
alertToast: 'Coming soon',
}
};
//2、页面上所有需要国际化的文字,包括提示,都通过Vue去引用,例子:
@ -33,7 +61,13 @@ var dataInfo = new Vue({
el: "#js-data-info",
data: {
langue: langue,
marketList: []
marketList: [],
currentIndex:1
},
methods:{
navTap:function(index){
this.currentIndex=index
}
}
})
//3、每个页面都需要加上以下的方法:
@ -43,21 +77,47 @@ window.addEventListener('switchLangueData', function(e) {
});
var currencysObj = {};
var choiceMarketsObj;
console.log=function(){}
mui.plusReady(function() {
initData();
listener();
});
mui.plusReady(function() {
mui('#js-data-info').pullToRefresh({
down: {
callback: function() {
window.addEventListener("marketChoice", function(event) {
var currencyPair = event.detail;
choiceMarketsObj = app.getLocalStorage(app.marketChoiceKey);
if (choiceMarketsObj[currencyPair]) {
var currencys = currencyPair.split('-');
var marketObj = currencysObj[currencys[1]][currencys[0]].marketObj;
var choiceLi = getLiDocument(marketObj, currencys, 'choice-');
document.getElementById("market-choice-ul").appendChild(choiceLi);
setMarket(marketObj, 'choice-');
liListener(choiceLi, marketObj.currencyPair);
} else {
document.getElementById('choice-' + currencyPair + '-market-li').remove();
}
});
var self = this;
setTimeout(function() {
self.endPullDownToRefresh();
}, 2000);
}
}
});
})
function initData() {
choiceMarketsObj = app.getLocalStorage(app.marketChoiceKey);
if(JSON.stringify(choiceMarketsObj) != "{}"){
document.getElementById("choice-item").classList.add("mui-active");
document.getElementById("choice").classList.add("mui-active");
}else{
document.getElementById("USDT-item").classList.add("mui-active");
document.getElementById("USDT").classList.add("mui-active");
}
// if(JSON.stringify(choiceMarketsObj) != "{}") {
// document.getElementById("choice-item").classList.add("mui-active");
// document.getElementById("choice").classList.add("mui-active");
// } else {
// document.getElementById("USDT-item").classList.add("mui-active");
// document.getElementById("USDT").classList.add("mui-active");
// }
getMarkets();
}
@ -68,81 +128,72 @@ function listener() {
*/
window.addEventListener("marketChange", function(event) {
var changeData = event.detail;
if(changeData.type == 'deal') { //成交
if (changeData.type == 'deal') { //成交
getChangeMarket(changeData.unitName + '-' + changeData.coinName)
} else { //盘口
var infoPage = plus.webview.getWebviewById('market_info.html');
if(infoPage) {
if (infoPage) {
mui.fire(infoPage, "depthChange", changeData);
}
}
});
/**
* 监听自选改变事件
*/
window.addEventListener("marketChoice", function(event) {
var currencyPair = event.detail;
choiceMarketsObj = app.getLocalStorage(app.marketChoiceKey);
if(choiceMarketsObj[currencyPair]){
if (choiceMarketsObj[currencyPair]) {
var currencys = currencyPair.split('-');
var marketObj = currencysObj[currencys[1]][currencys[0]].marketObj;
var choiceLi = getLiDocument(marketObj,currencys,'choice-');
var choiceLi = getLiDocument(marketObj, currencys, 'choice-');
document.getElementById("market-choice-ul").appendChild(choiceLi);
setMarket(marketObj,'choice-');
setMarket(marketObj, 'choice-');
liListener(choiceLi, marketObj.currencyPair);
}else{
} else {
document.getElementById('choice-' + currencyPair + '-market-li').remove();
}
});
/**
* 汇率改变事件
*/
window.addEventListener("exchangeRate", function(event) {
initData();
});
/**
* 首页自选跳转
*/
window.addEventListener("choiceTab", function(event) {
var current = document.querySelector(".mui-control-item.mui-active");
var dom = document.getElementById('choice-item');
if(dom !== current) {
current.classList.remove('mui-active');
dom.classList.add('mui-active');
document.querySelector(".mui-control-content.mui-active").classList.remove('mui-active');
document.getElementById('choice').classList.add('mui-active');
}
dataInfo.currentIndex=0
});
}
function setWebsocket(){
console.log=function(){}
function setWebsocket() {
var socket = new SockJS(app.currencyBaseUrl + "/websocket");
var stompClient = Stomp.over(socket);
stompClient.debug = null;
stompClient.connect({}, function(frame) {
//订阅讲座消息
stompClient.subscribe('/topic/market', function(greeting) {
var obj = JSON.parse(greeting.body);
var currencys = obj.currencyPair.split('-');
if(JSON.stringify(currencysObj) == '{}'){
if (JSON.stringify(currencysObj) == '{}') {
initData();
}
if(currencysObj[currencys[1]] && currencysObj[currencys[1]][currencys[0]]){
if (currencysObj[currencys[1]] && currencysObj[currencys[1]][currencys[0]]) {
currencysObj[currencys[1]][currencys[0]].marketObj = obj;
setMarket(obj,'base-');
if(choiceMarketsObj[obj.currencyPair]){
setMarket(obj,'choice-');
setMarket(obj, 'base-');
if (choiceMarketsObj[obj.currencyPair]) {
setMarket(obj, 'choice-');
}
sendChangeDataToView(obj);
}
});
});
socket.onclose = function() {
setWebsocket();
};
setWebsocket();
};
}
function getChangeMarket(currencyPair) {
@ -151,21 +202,20 @@ function getChangeMarket(currencyPair) {
type: "GET",
dataType: "json",
success: function(j) {
if(j.code == 200) {
if (j.code == 200) {
var currencys = currencyPair.split('-');
currencysObj[currencys[1]][currencys[0]].marketObj = j.data;
setMarket(j.data,'base-');
if(choiceMarketsObj[j.data.currencyPair]){
setMarket(j.data,'choice-');
setMarket(j.data, 'base-');
if (choiceMarketsObj[j.data.currencyPair]) {
setMarket(j.data, 'choice-');
}
sendChangeDataToView(j.data)
} else {}
},
error: function(xhr, type, errorThrown) {
console.log(type)
}
error: function(xhr, type, errorThrown) {}
});
}
var muiActive = false;
function getMarkets() {
var url = app.currencyBaseUrl + "market/getList";
@ -173,9 +223,9 @@ function getMarkets() {
type: "GET",
dataType: "json",
success: function(j) {
if(j.code == 200) {
if (j.code == 200) {
var markets = j.data;
for(var index in markets) {
for (var index in markets) {
setLiDocument(markets[index]);
app.setLocalStorage(app.marketKey + markets[index].currencyPair, markets[index]);
}
@ -196,15 +246,24 @@ function getMarket(currencyObj) {
}
function setMarket(marketObj,id) {
function setMarket(marketObj, id) {
var temp = marketObj.percent * 1
var tempClass
if (temp >= 0) {
tempClass = 'price1 percent-height-color'
} else {
tempClass = 'price1 percent-low-color'
}
'<span class="' + tempClass + '">'
var currencyName = marketObj.currencyPair;
document.getElementById(id + currencyName + '-total').innerText = '24H '+app.formatValue(marketObj.total);
document.getElementById(id + currencyName + '-total').innerText = '24H ' + app.formatValue(marketObj.total);
var marketEl = document.getElementById(id + currencyName + '-market');
marketEl.innerHTML = '<span class="price1">'+app.formatValue(marketObj.amount)+'</span>'+
'<span class="price2">' + app.formatValue(marketObj[app.getExchangeRateLocalStorage().toLowerCase() + 'Amount'] * marketObj.amount) + ' ' + app.getExchangeRateLocalStorage() +'</span>';
marketEl.innerHTML = '<span class="' + tempClass + '">' + app.formatValue(marketObj.amount) + '</span>' +
'<span class="price2">' + app.formatValue(marketObj[app.getExchangeRateLocalStorage().toLowerCase() + 'Amount'] *
marketObj.amount) + ' ' + app.getExchangeRateLocalStorage() + '</span>';
var percentEl = document.getElementById(id + currencyName + '-percent');
marketObj.percent = marketObj.percent;
if(marketObj.percent < 0) {
if (marketObj.percent < 0) {
percentEl.innerText = parseFloat(marketObj.percent * 100).toFixed(2) + '%';
percentEl.classList.remove('app-coin-percent-up');
percentEl.classList.remove('app-coin-percent-down');
@ -219,28 +278,41 @@ function setMarket(marketObj,id) {
function setLiDocument(marketObj) {
var currencys = marketObj.currencyPair.split('-');
var li = getLiDocument(marketObj,currencys,'base-');
var li = getLiDocument(marketObj, currencys, 'base-');
var ul = document.getElementById(currencys[1] + "-ul");
if(!ul){
var motherboard = document.getElementById("motherboard");
if (!ul) {
var a = document.createElement('a');
a.id = currencys[1] + '-item';
a.className = "mui-control-item";
if (muiActive == false) {
a.className = "mui-control-item mui-active";
} else {
a.className = "mui-control-item";
}
a.href = '#' + currencys[1];
a.innerHTML = currencys[1];
document.getElementById("sliderSegmentedControl").appendChild(a);
var motherboardInfo = document.getElementById("motherboard-info");
var div = document.createElement('div');
div.id = currencys[1];
div.className = "mui-control-content";
if (muiActive == false) {
div.className = "mui-control-content info mui-active";
} else {
div.className = "mui-control-content info";
}
document.getElementById("app-scroll").appendChild(div);
ul = document.createElement('ul');
ul.id = currencys[1] + "-ul";
ul.className = "dapp-table-view mui-table-view";
div.appendChild(ul);
motherboardInfo.appendChild(div);
muiActive = true;
}
ul.appendChild(li);
setMarket(marketObj,'base-');
if(!currencysObj[currencys[1]]) {
setMarket(marketObj, 'base-');
if (!currencysObj[currencys[1]]) {
currencysObj[currencys[1]] = {};
}
var currencyObj = {
@ -251,24 +323,24 @@ function setLiDocument(marketObj) {
}
currencysObj[currencys[1]][currencys[0]] = currencyObj;
liListener(li, marketObj.currencyPair);
if(choiceMarketsObj[marketObj.currencyPair]){
var choiceLi = getLiDocument(marketObj,currencys,'choice-');
if (choiceMarketsObj[marketObj.currencyPair]) {
var choiceLi = getLiDocument(marketObj, currencys, 'choice-');
document.getElementById("market-choice-ul").appendChild(choiceLi);
setMarket(marketObj,'choice-');
setMarket(marketObj, 'choice-');
liListener(choiceLi, marketObj.currencyPair);
}
}
function getLiDocument(marketObj,currencys,id){
function getLiDocument(marketObj, currencys, id) {
var li = document.createElement("li");
li.id = id + marketObj.currencyPair + '-market-li';
li.className = 'dapp-table-view-cell mui-table-view-cell mui-media';
li.innerHTML = '<div class="dapp-market-info">' +
'<span class="name1">' + currencys[0] + '<span class="dapp-market-currency">/' + currencys[1] + '</span>'+
'</span><span id="'+id + marketObj.currencyPair + '-total" class="name2"></span>'+
'</div>' +
'<div id="'+id + marketObj.currencyPair + '-market" class="dapp-market-info"></div>' +
'<div id="'+id + marketObj.currencyPair + '-percent" class="dapp-market-percent "></div>';
li.innerHTML = '<div class="dapp-market-info">' +
'<span class="name1">' + currencys[0] + '<span class="dapp-market-currency">/' + currencys[1] + '</span>' +
'</span><span id="' + id + marketObj.currencyPair + '-total" class="name2"></span>' +
'</div>' +
'<div id="' + id + marketObj.currencyPair + '-market" class="dapp-market-info"></div>' +
'<div id="' + id + marketObj.currencyPair + '-percent" class="dapp-market-percent "></div>';
return li;
}
@ -278,6 +350,9 @@ function liListener(li, currencyPair) {
});
}
window.addEventListener('test',function(e){
app.openWin('market_info.html', 'market_info.html', null, e.detail);
})
function openMarketInfo(currencyPair) {
var data = {
currencysObj: currencysObj,
@ -286,7 +361,6 @@ function openMarketInfo(currencyPair) {
}
app.openWin('market_info.html', 'market_info.html', null, data);
}
/**
* 把行情数据推送到其它窗口
*/
@ -297,7 +371,11 @@ function sendDataToView() {
mui.fire(cctPage, "marketList", currencysObj);
var walletPage = plus.webview.getWebviewById('html/wallet/html/wallet.html');
mui.fire(walletPage, "marketList", currencysObj);
setTimeout(function() {
mui.fire(homePage, "marketList", currencysObj);
mui.fire(cctPage, "marketList", currencysObj);
mui.fire(walletPage, "marketList", currencysObj);
}, 1000);
}
/**
@ -305,16 +383,21 @@ function sendDataToView() {
* @param {Object} data
*/
function sendChangeDataToView(data) {
var homePage = plus.webview.getWebviewById('html/home/html/home.html');
mui.fire(homePage, "marketChange", data);
sendDataToView();
var infoPage = plus.webview.getWebviewById('market_info.html');
if (infoPage) {
mui.fire(infoPage, "marketChange", data);
}
var cctPage = plus.webview.getWebviewById('html/cct/html/cct_index.html');
if (cctPage) {
mui.fire(cctPage, "marketChange", data);
}
var homePage = plus.webview.getWebviewById('html/home/html/home.html');
mui.fire(homePage, "marketChange", data);
sendDataToView();
var infoPage = plus.webview.getWebviewById('market_info.html');
if (infoPage) {
mui.fire(infoPage, "marketChange", data);
}
var cctPage = plus.webview.getWebviewById('html/cct/html/cct_index.html');
if (cctPage) {
mui.fire(cctPage, "marketChange", data);
}
}
}
//暫未開放説明
mui('.mui-segmented-control').on('tap', '.short', function() {
mui.toast(dataInfo.langue.alertToast);
});

File diff suppressed because it is too large Load Diff

@ -0,0 +1,319 @@
//1、每个页面写自己的国际化语言变量,例子:
var langues = {
zh_CN: {
title: '行情',
price: '价格',
all: '全部',
change: '涨跌幅',
favorites: "自选",
fullMarket:'全部'
},
zh_HK: {
title: '行情',
price: '價格',
all: '全部',
change: '漲跌幅',
favorites: " 自選",
fullMarket:'全部'
},
en_US: {
title: 'Market',
price: 'Price',
all: 'All',
change: 'Change',
favorites: "Favorites",
fullMarket:'All'
}
};
//2、页面上所有需要国际化的文字,包括提示,都通过Vue去引用,例子:
var langueKey = app.getLanguageLocalStorage(); //获取国际化语种
var langue = langues[langueKey]; // 获取国际化语种数据
var dataInfo = new Vue({
el: "#js-data-info",
data: {
langue: langue,
marketList: []
}
})
//3、每个页面都需要加上以下的方法:
window.addEventListener('switchLangueData', function(e) {
//dataInfo为Vue对象的名称
dataInfo.langue = langues[e.detail];
});
var currencysObj = {};
var choiceMarketsObj;
console.log=function(){}
mui.plusReady(function() {
initData();
listener();
});
function initData() {
choiceMarketsObj = app.getLocalStorage(app.marketChoiceKey);
if(JSON.stringify(choiceMarketsObj) != "{}"){
document.getElementById("choice-item").classList.add("mui-active");
document.getElementById("choice").classList.add("mui-active");
}else{
document.getElementById("USDT-item").classList.add("mui-active");
document.getElementById("USDT").classList.add("mui-active");
}
getMarkets();
}
function listener() {
setWebsocket();
/**
* 监听行情改变事件
*/
window.addEventListener("marketChange", function(event) {
var changeData = event.detail;
if(changeData.type == 'deal') { //成交
getChangeMarket(changeData.unitName + '-' + changeData.coinName)
} else { //盘口
var infoPage = plus.webview.getWebviewById('market_info.html');
if(infoPage) {
mui.fire(infoPage, "depthChange", changeData);
}
}
});
/**
* 监听自选改变事件
*/
window.addEventListener("marketChoice", function(event) {
var currencyPair = event.detail;
choiceMarketsObj = app.getLocalStorage(app.marketChoiceKey);
if(choiceMarketsObj[currencyPair]){
var currencys = currencyPair.split('-');
var marketObj = currencysObj[currencys[1]][currencys[0]].marketObj;
var choiceLi = getLiDocument(marketObj,currencys,'choice-');
document.getElementById("market-choice-ul").appendChild(choiceLi);
setMarket(marketObj,'choice-');
liListener(choiceLi, marketObj.currencyPair);
}else{
document.getElementById('choice-' + currencyPair + '-market-li').remove();
}
});
/**
* 汇率改变事件
*/
window.addEventListener("exchangeRate", function(event) {
initData();
});
/**
* 首页自选跳转
*/
window.addEventListener("choiceTab", function(event) {
var current = document.querySelector(".mui-control-item.mui-active");
var dom = document.getElementById('choice-item');
if(dom !== current) {
current.classList.remove('mui-active');
dom.classList.add('mui-active');
document.querySelector(".mui-control-content.mui-active").classList.remove('mui-active');
document.getElementById('choice').classList.add('mui-active');
}
});
}
function setWebsocket(){
console.log=function(){}
var socket = new SockJS(app.currencyBaseUrl + "/websocket");
var stompClient = Stomp.over(socket);
stompClient.connect({}, function(frame) {
//订阅讲座消息
stompClient.subscribe('/topic/market', function(greeting) {
var obj = JSON.parse(greeting.body);
var currencys = obj.currencyPair.split('-');
if(JSON.stringify(currencysObj) == '{}'){
initData();
}
if(currencysObj[currencys[1]] && currencysObj[currencys[1]][currencys[0]]){
currencysObj[currencys[1]][currencys[0]].marketObj = obj;
setMarket(obj,'base-');
if(choiceMarketsObj[obj.currencyPair]){
setMarket(obj,'choice-');
}
sendChangeDataToView(obj);
}
});
});
socket.onclose = function() {
setWebsocket();
};
}
function getChangeMarket(currencyPair) {
var url = app.currencyBaseUrl + "market/get?currencyPair=" + currencyPair;
mui.ajax(url, {
type: "GET",
dataType: "json",
success: function(j) {
if(j.code == 200) {
var currencys = currencyPair.split('-');
currencysObj[currencys[1]][currencys[0]].marketObj = j.data;
setMarket(j.data,'base-');
if(choiceMarketsObj[j.data.currencyPair]){
setMarket(j.data,'choice-');
}
sendChangeDataToView(j.data)
} else {}
},
error: function(xhr, type, errorThrown) {
console.log(type)
}
});
}
function getMarkets() {
var url = app.currencyBaseUrl + "market/getList";
mui.ajax(url, {
type: "GET",
dataType: "json",
success: function(j) {
if(j.code == 200) {
var markets = j.data;
for(var index in markets) {
setLiDocument(markets[index]);
app.setLocalStorage(app.marketKey + markets[index].currencyPair, markets[index]);
}
sendDataToView();
} else {}
},
error: function(xhr, type, errorThrown) {
console.log(type)
}
});
}
function getMarket(currencyObj) {
var now = new Date();
var timestamp = app.formatDate(now.getTime());
var currencyName = currencyObj.currencyName;
var currencyPair = currencyObj.currencyPair;
}
function setMarket(marketObj,id) {
var currencyName = marketObj.currencyPair;
document.getElementById(id + currencyName + '-total').innerText = '24H '+app.formatValue(marketObj.total);
var marketEl = document.getElementById(id + currencyName + '-market');
marketEl.innerHTML = '<span class="price1">'+app.formatValue(marketObj.amount)+'</span>'+
'<span class="price2">' + app.formatValue(marketObj[app.getExchangeRateLocalStorage().toLowerCase() + 'Amount'] * marketObj.amount) + ' ' + app.getExchangeRateLocalStorage() +'</span>';
var percentEl = document.getElementById(id + currencyName + '-percent');
marketObj.percent = marketObj.percent;
if(marketObj.percent < 0) {
percentEl.innerText = parseFloat(marketObj.percent * 100).toFixed(2) + '%';
percentEl.classList.remove('app-coin-percent-up');
percentEl.classList.remove('app-coin-percent-down');
percentEl.classList.add('app-coin-percent-down');
} else {
percentEl.innerText = '+' + parseFloat(marketObj.percent * 100).toFixed(2) + '%';
percentEl.classList.remove('app-coin-percent-down');
percentEl.classList.remove('app-coin-percent-up');
percentEl.classList.add('app-coin-percent-up');
}
}
function setLiDocument(marketObj) {
var currencys = marketObj.currencyPair.split('-');
var li = getLiDocument(marketObj,currencys,'base-');
var ul = document.getElementById(currencys[1] + "-ul");
if(!ul){
var a = document.createElement('a');
a.id = currencys[1] + '-item';
a.className = "mui-control-item";
a.href = '#' + currencys[1];
a.innerHTML = currencys[1];
document.getElementById("sliderSegmentedControl").appendChild(a);
var div = document.createElement('div');
div.id = currencys[1];
div.className = "mui-control-content";
document.getElementById("app-scroll").appendChild(div);
ul = document.createElement('ul');
ul.id = currencys[1] + "-ul";
ul.className = "dapp-table-view mui-table-view";
div.appendChild(ul);
}
ul.appendChild(li);
setMarket(marketObj,'base-');
if(!currencysObj[currencys[1]]) {
currencysObj[currencys[1]] = {};
}
var currencyObj = {
'marketObj': marketObj,
'title': currencys[0] + '/' + currencys[1],
'basecoin': currencys[1],
'coin': currencys[0]
}
currencysObj[currencys[1]][currencys[0]] = currencyObj;
liListener(li, marketObj.currencyPair);
if(choiceMarketsObj[marketObj.currencyPair]){
var choiceLi = getLiDocument(marketObj,currencys,'choice-');
document.getElementById("market-choice-ul").appendChild(choiceLi);
setMarket(marketObj,'choice-');
liListener(choiceLi, marketObj.currencyPair);
}
}
function getLiDocument(marketObj,currencys,id){
var li = document.createElement("li");
li.id = id + marketObj.currencyPair + '-market-li';
li.className = 'dapp-table-view-cell mui-table-view-cell mui-media';
li.innerHTML = '<div class="dapp-market-info">' +
'<span class="name1">' + currencys[0] + '<span class="dapp-market-currency">/' + currencys[1] + '</span>'+
'</span><span id="'+id + marketObj.currencyPair + '-total" class="name2"></span>'+
'</div>' +
'<div id="'+id + marketObj.currencyPair + '-market" class="dapp-market-info"></div>' +
'<div id="'+id + marketObj.currencyPair + '-percent" class="dapp-market-percent "></div>';
return li;
}
function liListener(li, currencyPair) {
li.addEventListener('tap', function() {
openMarketInfo(currencyPair);
});
}
function openMarketInfo(currencyPair) {
var data = {
currencysObj: currencysObj,
currencyPair: currencyPair,
choiceMarketsObj: choiceMarketsObj
}
app.openWin('market_info.html', 'market_info.html', null, data);
}
/**
* 把行情数据推送到其它窗口
*/
function sendDataToView() {
var homePage = plus.webview.getWebviewById('html/home/html/home.html');
mui.fire(homePage, "marketList", currencysObj);
var cctPage = plus.webview.getWebviewById('html/cct/html/cct_index.html');
mui.fire(cctPage, "marketList", currencysObj);
var walletPage = plus.webview.getWebviewById('html/wallet/html/wallet.html');
mui.fire(walletPage, "marketList", currencysObj);
}
/**
* 把新行情数据推送到其它窗口
* @param {Object} data
*/
function sendChangeDataToView(data) {
var homePage = plus.webview.getWebviewById('html/home/html/home.html');
mui.fire(homePage, "marketChange", data);
sendDataToView();
var infoPage = plus.webview.getWebviewById('market_info.html');
if (infoPage) {
mui.fire(infoPage, "marketChange", data);
}
var cctPage = plus.webview.getWebviewById('html/cct/html/cct_index.html');
if (cctPage) {
mui.fire(cctPage, "marketChange", data);
}
}

@ -9,6 +9,7 @@
<!--引入公共样式-->
<link href="../../lib/css/basic.css" rel="stylesheet" />
<link href="../../lib/css/icons-extra.css" rel="stylesheet" />
<link rel="stylesheet" type="text/css" href="css/market_info.css"/>
<script src="../../lib/js/rem-layout.js"></script>
<script type="text/javascript" src="../../lib/js/mui.min.js"></script>
<script type="text/javascript" src="../../lib/js/mui.pullToRefresh.js"></script>
@ -17,17 +18,21 @@
<script type="text/javascript" src="../../lib/js/app.js"></script>
<script type="text/javascript" src="../../lib/js/sockjs.min.js"></script>
<script type="text/javascript" src="../../lib/js/stomp.min.js"></script>
<style type="text/css">
html,
body {
background: #FFFFFF;
}
.mui-slider-indicator.mui-segmented-control {
color: #333333;
margin: .05rem 0px;
background: #FFFFFF;
display: flex;
}
.mui-segmented-control .mui-control-item {
display: table-cell;
/* flex: 1; */
width: 1.8rem;
height: 100%;
}
.mui-icon,
.mui-icon-extra {
border: none !important;
@ -37,48 +42,88 @@
width: 40px;
height: 30px;
}
.mui-segmented-control.mui-segmented-control-inverted .mui-control-item.mui-active {
color: #007aff;
color: #FFFFFF;
border-bottom: none;
border-radius: .05rem;
text-decoration: underline;
display: flex;
justify-content: center;
/*width: 2px;*/
/* background: #E8C141; */
}
.nav {
width: 85%;
height: 100%;
margin: 0 auto;
}
.mui-active .nav {
background-color: #0978FF;
}
#sliderSegmentedControl {
margin-top: .1rem;
}
#motherboard-info {
background: #FFFFFF;
margin-top: .1rem;
}
.mui-control-content.info {
margin-top: .05rem;
}
#sliderSegmentedControl .mui-control-item.mui-active {
color: #0978FF;
background: none;
}
.mui-table-view-cell.mui-active {
background-color: #EEEEEE;
}
.app-fullscreen {
position: relative;
}
.dapp-table-view {
background: #FFFFFF;
}
.dapp-table-view:before {
height: 0;
}
.dapp-table-view:after {
height: 0;
}
.dapp-table-view-cell {
display: flex;
align-items: center;
}
.dapp-table-view-cell:after {
height: 0px;
height: 1px;
}
.mui-table-view-cell {
padding: 6px 15px;
}
.mui-table-view-cell:after {
right: 15px;
background-color: #EEEEEE;
}
.dapp-table-view-cell-head {
padding: .15rem 5%;
color: #FFFFFF;
}
.dapp-table-view-cell-head:after {
position: absolute;
right: 0;
@ -88,7 +133,7 @@
content: '';
background-color: #EEEEEE;
}
.dapp-table-view-cell .dapp-market-info {
font-size: .24rem;
font-weight: 400;
@ -97,20 +142,20 @@
line-height: .43rem;
color: #333333;
flex: 1;
margin-left: .3rem;
/* margin-left: .3rem; */
}
.dapp-table-view-cell-head .dapp-market-info {
font-weight: 400;
}
.dapp-table-view-cell-head .dapp-market-info:last-child {
width: 40%;
}
.dapp-table-view-cell .dapp-market-percent {
width:1.12rem;
height:.43rem;
width: 1.12rem;
height: .43rem;
border-radius: .07rem;
font-size: .2rem;
font-weight: 600;
@ -118,22 +163,22 @@
text-align: center;
line-height: .43rem;
}
.app-coin-percent-up {
background: #73D13D;
background: #50BC78;
border-radius: 4px;
}
.app-coin-percent-down {
background: #E32E33;
background: #E95F61;
border-radius: 4px;
}
.dapp-market-currency {
color: #666666;
font-size: .17rem;
}
.name2,
.price2 {
font-size: .2rem;
@ -141,7 +186,36 @@
color: #999999;
line-height: .2rem;
display: block;
padding: .2rem 0;
padding: .15rem 0;
}
.gain-title {
width: 90%;
/* margin: .1rem auto; */
display: flex;
font-size: .25rem;
font-weight: 500;
color: #333333;
padding-top: .1rem;
}
.gain-title span:nth-child(1),
.gain-title span:nth-child(2) {
flex: 1;
margin-left: .3rem;
}
.gain-title span:nth-child(3) {
width: 1.12rem;
text-align: right;
}
.percent-height-color {
color: #50BC78;
}
.percent-low-color {
color: #E95F61;
}
</style>
</head>
@ -155,40 +229,85 @@
<div class="mui-content">
<div class="app-fullscreen">
<div id="app-scroll" class="mui-scroll">
<div id="sliderSegmentedControl" class="mui-slider-indicator mui-segmented-control mui-segmented-control-inverted">
<a id="choice-item" class="mui-control-item" href="#choice">
{{langue.favorites}}
</a>
<a id="USDT-item" class="mui-control-item" href="#USDT">
USDT
</a>
<div>
<div class="mui-slider-indicator mui-segmented-control mui-segmented-control-inverted">
<a class="mui-control-item" href="#choice" @tap.stop="navTap(0)" :class="[currentIndex==0?'mui-active':'']">
<span class="nav">{{langue.nav1}}</span>
</a>
<a class="mui-control-item " :class="[currentIndex==1 ? 'mui-active':'']" @tap.stop="navTap(1)"href="#motherboard">
<span class="nav">{{langue.nav2}}</span>
</a>
<!-- <a class="mui-control-item short" href="#1">
<span class="nav">{{langue.nav3}}</span>
</a>
<a class="mui-control-item short" href="#2">
<span class="nav">{{langue.nav4}}</span>
</a>
<a class="mui-control-item short" href="#3">
<span class="nav">{{langue.nav5}}</span>
</a> -->
</div>
</div>
<div id="USDT" class="mui-control-content">
<ul id="USDT-ul" class="dapp-table-view mui-table-view">
<!--<li class="dapp-table-view-cell mui-table-view-cell mui-media">
<div class="dapp-market-info">
<span class="name1">ETH<span class="dapp-market-currency">/USDT</span></span>
<span class="name2">24H 2453333.56</span>
</div>
<div id="BTC-market" class="dapp-market-info">
<span class="price1">0.0006744</span>
<span class="price2">¥0.07</span>
<div>
<div id="motherboard" class="mui-control-content " :class="[currentIndex==1?'mui-active':'']">
<div id="sliderSegmentedControl" class="mui-slider-indicator mui-segmented-control mui-segmented-control-inverted">
<!--<a id="choice-item" class="mui-control-item" href="#choice">
{{langue.favorites}}
</a>-->
<!-- <a id="USDT-item" class="mui-control-item mui-active" href="#USDT">
USDT
</a> -->
</div>
<div id="motherboard-info" >
<div class="gain-title">
<span>{{langue.tab1}}</span>
<span>{{langue.tab2}}</span>
<span>{{langue.tab3}}</span>
</div>
<div id="BTC-percent" class="dapp-market-percent app-coin-percent-down ">-10.93%</div>
</li>-->
</ul>
</div>
<div id="choice" class="mui-control-content">
<ul id="market-choice-ul" class="dapp-table-view mui-table-view">
</ul>
</div>
</div>
<div id="USDT" class="mui-control-content mui-active">
<!-- <ul id="USDT-ul" class="dapp-table-view mui-table-view"> -->
<!-- <li class="dapp-table-view-cell mui-table-view-cell mui-media">
<div class="dapp-market-info">
<span class="name1">ETH<span class="dapp-market-currency">/USDT</span></span>
<span class="name2">24H 2453333.56</span>
</div>
<div id="BTC-market" class="dapp-market-info">
<span class="price1">0.0006744</span>
<span class="price2">¥0.07</span>
</div>
<div id="BTC-percent" class="dapp-market-percent app-coin-percent-down ">-10.93%</div>
</li>
<li class="dapp-table-view-cell mui-table-view-cell mui-media">
<div class="dapp-market-info">
<span class="name1">ETH<span class="dapp-market-currency">/USDT</span></span>
<span class="name2">24H 2453333.56</span>
</div>
<div id="BTC-market" class="dapp-market-info">
<span class="price1">0.0006744</span>
<span class="price2">¥0.07</span>
</div>
<div id="BTC-percent" class="dapp-market-percent app-coin-percent-down ">-10.93%</div>
</li> -->
<!-- </ul> -->
</div>
<div id="1" class="mui-control-content ">
</div>
<div id="2" class="mui-control-content ">
</div>
<div id="3" class="mui-control-content ">
</div>
<div id="choice" class="mui-control-content" :class="[currentIndex==0?'mui-active':'']">
<ul id="market-choice-ul" class="dapp-table-view mui-table-view">
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
<script type="text/javascript" src="js/market.js"></script>
</html>
</html>

@ -21,14 +21,13 @@
<script src="js/data.js"></script>
<script src="js/echarts_options.js"></script>
<style>
html{
background-color: #fff;
}
.mui-slider-indicator.mui-segmented-control {
background-color: #FFFFFF;
}
.mui-table-view-cell.mui-active {
background-color: #EEEEEE;
}
.app-chart {
background-color: #FFFFFF;
}
@ -64,7 +63,6 @@
}
.buttons {
display: flex;
margin-left: 0.1rem;
}
.buttons>div {
@ -73,8 +71,58 @@
text-align: center;
}
.active {
color: #0094ff;
text-decoration: underline;
color: #0978FF;
}
.mui-segmented-control.mui-segmented-control-inverted{
width: 100%;
}
.mui-segmented-control.mui-segmented-control-inverted .mui-control-item.mui-active{
border: none;
position: relative;
}
.mui-segmented-control.mui-segmented-control-inverted .mui-control-item.mui-active::after{
position: absolute;
content: '';
width: 100%;
height: 3px;
background-color: #007aff;
left: 50%;
bottom: 0;
transform: translateX(-50%);
}
.mui-segmented-control.mui-segmented-control-inverted .mui-control-item{
font-size:15px;
font-family:PingFangSC-Regular,PingFangSC;
font-weight:400;
}
.market-bottom-wrap{
width: 100%;
background:rgba(0,21,42,1)
}
.no-meaning-div{
width: 100%;
height:.25rem;
}
.no-meaning-div.info{
height: 1rem;
width: 100%;
}
.buying-selling{
/* background-color: #00152A; */
color:#758598;
}
#item6,#item7,#item8{
/* background-color: #FFFFFF !important; */
}
.introduction h3{
margin: 0 auto;
}
.transaction{
margin-top: 0;
}
#item8{
/* background-color: #152136; */
}
</style>
</head>
@ -82,7 +130,7 @@
<body>
<header class="mui-bar mui-bar-nav">
<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
<a class="mui-icon mui-icon-list mui-icon-left-nav" id="icon-popover" style="color: #333333; margin-left: .5rem; font-size: 22px;"></a>
<a class="mui-icon mui-icon-list mui-icon-left-nav" id="icon-popover" style="margin-left: .5rem; font-size: 22px;"></a>
<h1 id="title" class="mui-title" style="text-align: left; margin-left: 1rem;"></h1>
<a id="choice" class="mui-icon mui-icon-starhalf mui-pull-right mui-icon-right-nav" ></a>
</header>
@ -201,32 +249,34 @@
<div class="timebutton" data-interval="4H">4H</div>
<div class="timebutton" data-interval="1D">1D</div>
<div class="timebutton" data-interval="1W">1W</div>
<!--<div class="timebutton" data-interval="1M">1M</div>-->
<div class="timebutton" data-interval="1M">1M</div>
</div>
<div id="TradingView" style="width:100%;height:380px;" v-loading="loading"></div>
</div>
<!--深度,成交,简介-->
<div class="market-bottom">
<div id="market-bottom-a" class="mui-slider-indicator mui-segmented-control mui-segmented-control-inverted">
<a class="mui-control-item mui-active" href="#item6">{{langue.depth}}</a>
<a class="mui-control-item" href="#item7">{{langue.deal}}</a>
<a class="mui-control-item" href="#item8">{{langue.introduction.introduction}}</a>
<div class="market-bottom-wrap">
<div id="market-bottom-a" class="mui-slider-indicator mui-segmented-control mui-segmented-control-inverted">
<a class="mui-control-item mui-active" href="#item6">{{langue.depth}}</a>
<a class="mui-control-item" href="#item7">{{langue.deal}}</a>
<a class="mui-control-item" href="#item8">{{langue.introduction.introduction}}</a>
</div>
</div>
<div id="item6" class="mui-control-content mui-active">
<!--深度图容器-->
<div id="container" style="width: 100%;height:260px; background: #FFFFFF;"></div>
<div id="container" style="width: 100%;height:260px; "></div>
<!--买卖情况-->
<div class="buying-selling">
<ul id="depth-ul">
<!--<li class="buying-selling-title">
<!-- <li class="buying-selling-title">
<span>买盘</span>
<span>数量(THETA)</span>
<span>价格(USDT)</span>
<span>数量(THETA)</span>
<span>卖盘</span>
</li>
<li class="buying-selling-info">
</li> -->
<!-- <li class="buying-selling-info">
<span class="buy-sale">小林</span>
<span class="buy-sale-num">11907.9794</span>
<p class="price">
@ -235,16 +285,15 @@
</p>
<span class="buy-sale-num">21907.9794</span>
<span class="buy-sale">小丽</span>
</li>-->
</li> -->
</ul>
</div>
</div>
<div id="item7" class="mui-control-content">
<!--成交-->
<div class="transaction">
<ul id="list-record">
<!--<li class="transaction-title">
<!-- <li class="transaction-title">
<span>时间</span>
<span>方向</span>
<span>价格(USDT)</span>
@ -261,14 +310,15 @@
<span class="transaction-direction-sale">卖出</span>
<span class="transaction-price">2000.0938</span>
<span class="transaction-num">07.9794</span>
</li>-->
</li> -->
</ul>
</div>
</div>
<div id="item8" class="mui-control-content">
<!--简介-->
<div class="no-meaning-div"></div>
<div class="introduction">
<h3><span id="currencyFullName"></span>(<span id="currencyName"></span>)</h3>
<h3 class="title"><span id="currencyFullName"></span>(<span id="currencyName"></span>)</h3>
<div class="introduction-item">
<ul>
<li class="introduction-item-list">
@ -301,11 +351,13 @@
</li>
</ul>
</div>
<h3>{{langue.introduction.introduction}}</h3>
<h3 class="datail">{{langue.introduction.introduction}}</h3>
<p id="descr"></p>
</div>
</div>
</div>
<div class="no-meaning-div info"></div>
<!--买入卖出公用按钮-->
<div class="btn-group">
<div id="buy-currency" class="btn-group-buy">{{langue.buy}}</div>
@ -316,5 +368,5 @@
</div>
</body>
<script type="text/javascript" src="js/market_info.js"></script>
</html>
<!-- <script type="text/javascript" src="js/test.js"></script> -->
</html>

@ -0,0 +1,194 @@
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no,viewport-fit=cover">
<link href="../../lib/css/mui.min.css" rel="stylesheet" />
<!--引入公共样式-->
<link href="../../lib/css/basic.css" rel="stylesheet" />
<link href="../../lib/css/icons-extra.css" rel="stylesheet" />
<script src="../../lib/js/rem-layout.js"></script>
<script type="text/javascript" src="../../lib/js/mui.min.js"></script>
<script type="text/javascript" src="../../lib/js/mui.pullToRefresh.js"></script>
<script type="text/javascript" src="../../lib/js/mui.pullToRefresh.material.js"></script>
<script type="text/javascript" src="../../lib/js/vue.min.js"></script>
<script type="text/javascript" src="../../lib/js/app.js"></script>
<script type="text/javascript" src="../../lib/js/sockjs.min.js"></script>
<script type="text/javascript" src="../../lib/js/stomp.min.js"></script>
<style type="text/css">
html,
body {
background: #FFFFFF;
}
.mui-slider-indicator.mui-segmented-control {
color: #333333;
margin: .05rem 0px;
}
.mui-icon,
.mui-icon-extra {
border: none !important;
margin: 0 !important;
font-size: 20px;
line-height: 30px;
width: 40px;
height: 30px;
}
.mui-segmented-control.mui-segmented-control-inverted .mui-control-item.mui-active {
color: #007aff;
border-bottom: none;
border-radius: .05rem;
text-decoration: underline;
}
.mui-table-view-cell.mui-active {
background-color: #EEEEEE;
}
.app-fullscreen {
position: relative;
}
.dapp-table-view {
background: #FFFFFF;
}
.dapp-table-view:before {
height: 0;
}
.dapp-table-view:after {
height: 0;
}
.dapp-table-view-cell {
display: flex;
align-items: center;
}
.dapp-table-view-cell:after {
height: 0px;
}
.dapp-table-view-cell-head {
padding: .15rem 5%;
color: #FFFFFF;
}
.dapp-table-view-cell-head:after {
position: absolute;
right: 0;
top: .78rem;
left: 0;
height: 1px;
content: '';
background-color: #EEEEEE;
}
.dapp-table-view-cell .dapp-market-info {
font-size: .24rem;
font-weight: 400;
width: 30%;
text-align: left;
line-height: .43rem;
color: #333333;
flex: 1;
margin-left: .3rem;
}
.dapp-table-view-cell-head .dapp-market-info {
font-weight: 400;
}
.dapp-table-view-cell-head .dapp-market-info:last-child {
width: 40%;
}
.dapp-table-view-cell .dapp-market-percent {
width:1.12rem;
height:.43rem;
border-radius: .07rem;
font-size: .2rem;
font-weight: 600;
color: #fff;
text-align: center;
line-height: .43rem;
}
.app-coin-percent-up {
background: #73D13D;
border-radius: 4px;
}
.app-coin-percent-down {
background: #E32E33;
border-radius: 4px;
}
.dapp-market-currency {
color: #666666;
font-size: .17rem;
}
.name2,
.price2 {
font-size: .2rem;
font-weight: 400;
color: #999999;
line-height: .2rem;
display: block;
padding: .2rem 0;
}
</style>
</head>
<body>
<div id="js-data-info">
<header class="mui-bar mui-bar-nav">
<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
<h1 class="mui-title">{{langue.title}}</h1>
</header>
<div class="mui-content">
<div class="app-fullscreen">
<div id="app-scroll" class="mui-scroll">
<div id="sliderSegmentedControl" class="mui-slider-indicator mui-segmented-control mui-segmented-control-inverted">
<a id="choice-item" class="mui-control-item" href="#choice">
{{langue.favorites}}
</a>
<a id="USDT-item" class="mui-control-item" href="#USDT">
USDT
</a>
</div>
<div id="USDT" class="mui-control-content">
<ul id="USDT-ul" class="dapp-table-view mui-table-view">
<!--<li class="dapp-table-view-cell mui-table-view-cell mui-media">
<div class="dapp-market-info">
<span class="name1">ETH<span class="dapp-market-currency">/USDT</span></span>
<span class="name2">24H 2453333.56</span>
</div>
<div id="BTC-market" class="dapp-market-info">
<span class="price1">0.0006744</span>
<span class="price2">¥0.07</span>
</div>
<div id="BTC-percent" class="dapp-market-percent app-coin-percent-down ">-10.93%</div>
</li>-->
</ul>
</div>
<div id="choice" class="mui-control-content">
<ul id="market-choice-ul" class="dapp-table-view mui-table-view">
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
<script type="text/javascript" src="js/market.js"></script>
</html>

@ -0,0 +1,25 @@
@media only screen and (-webkit-device-pixel-ratio: 3) and (device-height: 812px) and (device-width: 375px) {
.mui-bar-nav~.mui-content {
position: absolute;
top: .8rem;
right: 15px;
left: 15px;
bottom: 0;
margin: 0;
padding: 0 !important;
overflow: scroll;
-webkit-overflow-scrolling: touch;
}
::-webkit-scrollbar {
display: none;
}
.mui-bar-nav{
height: .6rem;
}
.mui-bar.mui-bar-nav {
top: 0 !important;
padding: 0;
margin: 0;
}
}

@ -9,6 +9,8 @@
<link rel="stylesheet" type="text/css" href="../../../lib/css/mui.min.css">
<link rel="stylesheet" type="text/css" href="../../../lib/css/basic.css" />
<link rel="stylesheet" type="text/css" href="../../css/base.css" />
<!-- iphone_styles -->
<script src="../../../lib/js/mui.min.js"></script>
<script src="../../../lib/js/vue.js"></script>
<script src="../../../lib/js/app.js"></script>

@ -18,7 +18,31 @@
</head>
<style>
@media only screen and (-webkit-device-pixel-ratio: 3) and (device-height: 812px) and (device-width: 375px) {
.mui-bar-nav~.mui-content {
position: absolute;
top: .8rem;
right: 15px;
left: 15px;
bottom: 0;
margin: 0;
padding: 0 !important;
overflow: scroll;
-webkit-overflow-scrolling: touch;
}
::-webkit-scrollbar {
display: none;
}
.mui-bar-nav{
height: .6rem;
}
.mui-bar.mui-bar-nav {
top: 0 !important;
padding: 0;
margin: 0;
}
}
</style>
<body>
@ -34,6 +58,7 @@
{{item.title}}
</a>
</li>
<!--<li class="mui-table-view-cell">
<a class="mui-navigate-right view-herf" view-id="mine/html/my/my_help_center_subordinate/my_help_center_add_wallet.html" view-url="my_help_center_subordinate/my_help_center_add_wallet.html" >
{{dataBase.MyHelpCenterAddWalletTitle}}

@ -21,38 +21,78 @@
</head>
<style>
.mui-content {
html,body{
width: 100%;
height: 100%;
}
.mui-content {
/* width: 100%; */
overflow: hidden;
padding: 0.25rem 0.5rem;
margin: 0;
/* padding: 0.25rem 0.5rem; */
margin: 0 !important;
padding: 0 !important;
}
#app-text {
width: 100% !important;
.app-text {
width: 98%;
margin: 0 auto;
background-color: #fff;
}
h2,h3,h4,h5{
text-align: center;
line-height: .6rem;
height: .6rem;
width: 100%;
}
p,
span {
line-height: 1.5em;
}
img {
width: 100% !important;
border: 1px solid #2C2E4E;
border-radius: 5px;
/* width: 100% !important; */
/* border: 1px solid #2C2E4E; */
/* border-radius: 5px; */
display: block;
margin: 0 auto;
}
@media only screen and (-webkit-device-pixel-ratio: 3) and (device-height: 812px) and (device-width: 375px) {
.mui-bar-nav~.mui-content {
position: absolute;
top: .8rem;
right: 15px;
left: 15px;
bottom: 0;
margin: 0;
padding: 0 !important;
overflow: scroll;
-webkit-overflow-scrolling: touch;
}
::-webkit-scrollbar {
display: none;
}
.mui-bar.mui-bar-nav {
top: 0 !important;
padding: 0;
margin: 0;
}
.mui-bar-nav{
height: .6rem;
}
}
</style>
<body>
<div id="data-info">
<header class="mui-bar mui-bar-nav app-header app-header-darkly">
<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
<h1 class="mui-title" id="helpCenterTitle"></h1>
<!-- <h1 class="mui-title" id="helpCenterTitle"></h1> -->
<h1 class="mui-title" id="helpCenterTitle">123123</h1>
</header>
<div class="mui-content">
<p class="app-text" id="helpCenterContent">
</p>
<div class="app-text" id="helpCenterContent">
</div>
</div>
</div>
</body>

@ -76,6 +76,31 @@
font-size: 0.25rem;
line-height: 1.5em;
}
@media only screen and (-webkit-device-pixel-ratio: 3) and (device-height: 812px) and (device-width: 375px) {
.mui-bar-nav~.mui-content {
position: absolute;
top: .8rem;
right: 15px;
left: 15px;
bottom: 0;
margin: 0;
padding: 0 !important;
overflow: scroll;
-webkit-overflow-scrolling: touch;
}
::-webkit-scrollbar {
display: none;
}
.mui-bar-nav{
height: .6rem;
}
.mui-bar.mui-bar-nav {
top: 0 !important;
padding: 0;
margin: 0;
}
}
</style>
<body>
@ -232,7 +257,7 @@
});
//验证码登录
document.getElementById('js-pass-login').addEventListener('tap', function() {
colseWin();
// colseWin();
app.openWin("wallet_pass_login.html", "mine/html/wallet_pass_login.html");
})

@ -22,6 +22,20 @@
</head>
<style>
html,
body,
#data-info {
width: 100%;
height: 100%;
}
#data-info {
position: relative;
/* ios滑动不流畅 */
/* -webkit-overflow-scrolling:touch, */
/* overflow:hidden */
}
.app-header {
padding-right: 0.25rem;
font-size: 0.3rem;
@ -136,13 +150,38 @@
vertical-align: text-bottom;
margin-right: .23rem;
}
@media only screen and (-webkit-device-pixel-ratio: 3) and (device-height: 812px) and (device-width: 375px) {
.mui-bar-nav~.mui-content {
position: absolute;
top: .8rem;
right: 15px;
left: 15px;
bottom: 0;
margin: 0;
padding: 0 !important;
overflow: scroll;
-webkit-overflow-scrolling: touch;
}
::-webkit-scrollbar {
display: none;
}
.mui-bar-nav{
height: .6rem;
}
.mui-bar.mui-bar-nav {
top: 0 !important;
padding: 0;
margin: 0;
}
}
</style>
<body>
<div id="data-info">
<header class="mui-bar mui-bar-nav">
<h1 class="mui-title">{{langue.title}}</h1>
<!-- <a id="cancel-M" class=" mui-pull-right mui-icon-right-nav" style=" font-size: .24rem;bottom:15px;">{{langue.cancelMarket}}</a> -->
</header>
<div class="mui-content">
<div id="user-info" class="app-background-color">
@ -396,7 +435,7 @@
success: function(data) {
console.log(JSON.stringify(data))
console.log(app.getTokenStorage())
if ("200" == data.code) {
// 更新用户缓存数据
app.setUserLocalStorage(data.data);
@ -460,9 +499,22 @@
app.removeTokenStorage();
app.removeIsWalletPassLocalStorage();
}
mui.init({
gestureConfig: {
tap: true, //默认为true
doubletap: true, //默认为false
longtap: true, //默认为false
swipe: true, //默认为true
drag: true, //默认为true
hold: true, //默认为false,不监听
release: false //默认为false,不监听
}
});
mui.plusReady(function() {
saveUserInfoData();
plus.webview.currentWebview().setStyle({
scrollIndicator: 'none'
})
//下拉刷新
mui("#data-info").pullToRefresh({
down: {

@ -78,6 +78,31 @@
font-size: 0.25rem;
line-height: 1.5em;
}
@media only screen and (-webkit-device-pixel-ratio: 3) and (device-height: 812px) and (device-width: 375px) {
.mui-bar-nav~.mui-content {
position: absolute;
top: .8rem;
right: 15px;
left: 15px;
bottom: 0;
margin: 0;
padding: 0 !important;
overflow: scroll;
-webkit-overflow-scrolling: touch;
}
::-webkit-scrollbar {
display: none;
}
.mui-bar-nav{
height: .6rem;
}
.mui-bar.mui-bar-nav {
top: 0 !important;
padding: 0;
margin: 0;
}
}
</style>
<body>
@ -85,7 +110,7 @@
<header class="mui-bar mui-bar-nav app-header app-header-darkly">
<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
<h1 class="mui-title">{{langue.title}}</h1>
<a id="js-code-login" class="mui-pull-right" style="position: absolute; right: 12px;bottom: .28rem;">{{langue.Codelogin}}</a>
<a id="js-code-login" class="mui-pull-right" style="position: absolute; right: 12px;bottom: .28rem; display: none;">{{langue.Codelogin}}</a>
</header>
<div class="mui-content" style="margin-top: 0.5rem;">
<div id="user-login" class="app-input-group app-input-group-darkly">

@ -21,14 +21,19 @@
<script src="../js/base/getClientInfo.js"></script>
</head>
<style>
html,body,#data-info{
width: 100%;
height: 100%;
}
#user-login {
margin: 0.25rem 0.25rem;
}
#user-login label {
#user-login .app-input-row-list label {
width: 1.25rem;
}
#user-login .app-input {
width: 60%;
}
@ -67,11 +72,12 @@
}
.login-btn {
position: relative;
position: absolute;
z-index: 999;
margin-top: 7rem;
/* margin-top: 7rem; */
margin-left: 0.3rem;
margin-right: 0.3rem;
width: 100%;
}
#login-btn {
@ -119,6 +125,34 @@
display: none;
visibility: hidden;
}
@media only screen and (-webkit-device-pixel-ratio: 3) and (device-height: 812px) and (device-width: 375px) {
.mui-bar-nav~.mui-content {
position: absolute;
top: .6rem;
right: 15px;
left: 15px;
bottom: 0;
margin: 0;
padding: 0 !important;
overflow: scroll;
-webkit-overflow-scrolling: touch;
}
.mui-bar-nav~.mui-content .mui-slider.mui-fullscreen{
top: 0 !important;
}
::-webkit-scrollbar {
display: none;
}
.mui-bar-nav{
height: .6rem;
}
.mui-bar.mui-bar-nav {
top: 0 !important;
padding: 0;
margin: 0;
}
}
</style>
<body>
@ -129,10 +163,6 @@
</header>
<div class="mui-content">
<div id="slider" class="mui-slider mui-fullscreen login-slider">
<div id="sliderSegmentedControl" class="mui-scroll-wrapper mui-slider-indicator mui-segmented-control mui-segmented-control-inverted">
<div class="mui-scroll app-scroll-darkly">
</div>
</div>
<div class="mui-slider-group">
<div id="item1mobile" class="mui-slider-item mui-control-content mui-active">
<div id="scroll1" class="mui-scroll-wrapper">
@ -163,6 +193,17 @@
{{langue.sendCode}}
</button>
</div>
<div class="login-btn">
<div class="mui-input-row mui-checkbox mui-left">
<label>
<p id="login-text-info" class="mui-text-left">{{langue.registerText}}
<a id="protocol">{{langue.registerHref}}</a>
</p>
</label>
<input v-model="agreeServiceAgreement" type="checkbox" class="agree-input">
</div>
<button id="login-btn" class="app-btn app-btn-darkly">{{langue.register}}</button>
</div>
</div>
</div>
</div>
@ -170,25 +211,7 @@
</div>
</div>
<div class="login-btn">
<div class="mui-input-row mui-checkbox mui-left">
<label>
<p id="login-text-info" class="mui-text-center">{{langue.registerText}}
<a id="protocol">{{langue.registerHref}}</a>
</p>
</label>
<input v-model="agreeServiceAgreement" type="checkbox" class="agree-input">
</div>
<button id="login-btn" class="app-btn app-btn-darkly">{{langue.register}}</button>
<!--<div class="mui-input-row mui-checkbox mui-left" style="margin-top: 0.2rem;">
<label>
<p id="login-text-info" class="mui-text-center">{{langue.registerText}}
<a id="protocol">{{langue.registerHref}}</a>
</p>
</label>
<input v-model="agreeServiceAgreement" type="checkbox">
</div>-->
</div>
</div>

@ -35,10 +35,34 @@
#text-content P:first-child{
text-align: center;
}
g
#text-content img {
width: 100%;
}
@media only screen and (-webkit-device-pixel-ratio: 3) and (device-height: 812px) and (device-width: 375px) {
.mui-bar-nav~.mui-content {
position: absolute;
top: .8rem;
right: 15px;
left: 15px;
bottom: 0;
margin: 0;
padding: 0 !important;
overflow: scroll;
-webkit-overflow-scrolling: touch;
}
::-webkit-scrollbar {
display: none;
}
.mui-bar-nav{
height: .6rem;
}
.mui-bar.mui-bar-nav {
top: 0 !important;
padding: 0;
margin: 0;
}
}
</style>
<body>

Loading…
Cancel
Save