Browse Source

修改3

layui
liaoxinyu 2 years ago
parent
commit
5f3831de7a
  1. 2
      public/static/kline/src/klineCharts.js
  2. 29
      src/views/HomeView.vue

2
public/static/kline/src/klineCharts.js

@ -88,7 +88,7 @@ function loadMoreKline(data, is_first, key){
}
})
console.log(dataArr);
// console.log(dataArr);
// kcHistoryKeyId++;
if (dataArr.length <= 0) {
kcChart.applyMoreData(dataArr, false);

29
src/views/HomeView.vue

@ -9,13 +9,13 @@
<a href="gql.html"><p class="market_list border-bottom-grey">GQLUSDT</p></a>
<a href="rpn.html"><p class="market_list border-bottom-grey">RPNUSDT</p></a> -->
<p class="market_list border-bottom-grey" @click="handleClick('PYTN')"
:style="{'color': fullPath =='PytnUsdt'?'red':'white'}">PYTNUSDT</p>
:style="{'color': title =='PYTN'?'red':'white'}">PYTNUSDT</p>
<p class="market_list border-bottom-grey" @click="handleClick('OIGE')"
:style="{'color': fullPath =='OigeUsdt'?'red':'white'}">OIGEUSDT</p>
:style="{'color': title =='OIGE'?'red':'white'}">OIGEUSDT</p>
<p class="market_list border-bottom-grey" @click="handleClick('GQL')"
:style="{'color': fullPath =='GqlUsdt'?'red':'white'}">GQLUSDT</p>
:style="{'color': title =='GQL'?'red':'white'}">GQLUSDT</p>
<p class="market_list border-bottom-grey" @click="handleClick('RPN')"
:style="{'color': fullPath =='RpnUsdt'?'red':'white'}">RPNUSDT</p>
:style="{'color': title =='RPN'?'red':'white'}">RPNUSDT</p>
</div>
<!-- 右侧内容 -->
<div class="layui-body" style="top: 0 !important;bottom:0">
@ -70,8 +70,7 @@
},
data() {
return {
title: "PYTN",
fullPath:""
title: sessionStorage.getItem('title') || "PYTN"
};
},
computed: {
@ -125,16 +124,11 @@
$('.site-tree-mobile').on('click', function() {
$('body').addClass('site-mobile');
});
$('.site-mobile-shade').on('click', function() {
$('body').removeClass('site-mobile');
});
window.addEventListener('resize', this.handleResize);
// fullPath
this.fullPath = this.$route.fullPath.split('/')[1];
//
this.$router.afterEach((to, from) => {
this.fullPath = to.fullPath.split('/')[1];
});
},
destroyed() {
window.removeEventListener('resize', this.handleResize);
@ -147,29 +141,30 @@
},
handleClick(name) {
this.title = name
sessionStorage.setItem('title',name)
switch (name) {
case 'PYTN':
this.$router.push({
this.$router.replace({
path: '/PytnUsdt'
});
break;
case 'OIGE':
this.$router.push({
this.$router.replace({
path: '/OigeUsdt'
});
break;
case 'GQL':
this.$router.push({
this.$router.replace({
path: '/GqlUsdt'
});
break;
default:
this.$router.push({
this.$router.replace({
path: '/RpnUsdt'
});
break;
}
$('body').removeClass('site-mobile');
}
}
};

Loading…
Cancel
Save