|
|
|
@ -65,6 +65,12 @@ export default { |
|
|
|
this.unsub(this.ajaxTv.getSymbol(o), this.timer); |
|
|
|
} |
|
|
|
}, |
|
|
|
periodCurrent(n,o){ |
|
|
|
if(n != o && o){ |
|
|
|
console.log('切换周期,页数为第一页') |
|
|
|
this.page[this.symbol] = 1;//切换周期,页数为第一页 |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
lang() { |
|
|
|
@ -122,7 +128,8 @@ data() { |
|
|
|
sub: "", |
|
|
|
isCreateSocket: false, |
|
|
|
page: {}, |
|
|
|
tt:undefined |
|
|
|
tt:undefined, |
|
|
|
periodCurrent: '' |
|
|
|
}; |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
@ -239,11 +246,15 @@ methods: { |
|
|
|
onErrorCallback |
|
|
|
) { |
|
|
|
// handleClick |
|
|
|
this.periodCurrent = this.resolution(resolution); |
|
|
|
console.log(this.page[this.symbol], 'this.page[this.symbol]') |
|
|
|
this.page[this.symbol] = this.page[this.symbol] || 1; |
|
|
|
let page = this.page[this.symbol] > 3 ? 3 : this.page[this.symbol]; |
|
|
|
// let page = this.page[this.symbol] > 3 ? 3 : this.page[this.symbol]; |
|
|
|
let page = this.page[this.symbol] > 20 ? 20 : this.page[this.symbol]; |
|
|
|
// let page = this.page[this.symbol]; |
|
|
|
let data = { |
|
|
|
symbol: this.ajaxTv.getSymbol(symbolInfo.name), |
|
|
|
period: this.resolution(resolution), |
|
|
|
period: this.periodCurrent, |
|
|
|
form: rangeStartDate, |
|
|
|
to: rangeEndDate, |
|
|
|
size: page * 200, |
|
|
|
@ -270,10 +281,11 @@ methods: { |
|
|
|
let arr = this.unzip(res.data).map((item) => { |
|
|
|
return this.getMap(item); |
|
|
|
}); |
|
|
|
this.page[this.symbol]++; |
|
|
|
this.page[this.symbol]++;//当前币种行情数据页数+1 |
|
|
|
onLoadedCallback(arr); |
|
|
|
setTimeout(() => { |
|
|
|
if (this.page[this.symbol] > 3) { |
|
|
|
// if (this.page[this.symbol] > 3) { |
|
|
|
if (this.page[this.symbol] > 20) { |
|
|
|
onLoadedCallback([]); |
|
|
|
} |
|
|
|
}, 60); |
|
|
|
@ -486,7 +498,7 @@ methods: { |
|
|
|
created(){ |
|
|
|
let tim=localStorage.getItem("tim"); |
|
|
|
if(tim){ |
|
|
|
this.timer=tim |
|
|
|
this.timer=tim; |
|
|
|
} |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
|