|
|
|
@ -103,8 +103,6 @@ class Model { |
|
|
|
} |
|
|
|
|
|
|
|
sendMessage(data) { |
|
|
|
// debugger
|
|
|
|
console.log(">>>>>>>>>>" + JSON.stringify(data)); |
|
|
|
// 已经open状态
|
|
|
|
if (this.socket.checkOpen()) this.socket.send(data); |
|
|
|
else{ |
|
|
|
@ -139,7 +137,6 @@ class Model { |
|
|
|
if (sub === this.sub_msg) { |
|
|
|
|
|
|
|
if (type == "history") { |
|
|
|
// console.log("<<<<<<<<<History");
|
|
|
|
let list = []; |
|
|
|
for (let item of data) { |
|
|
|
list.push({ |
|
|
|
@ -159,8 +156,6 @@ class Model { |
|
|
|
this.lastTime = list[list.length - 1].time; |
|
|
|
|
|
|
|
} else if (type == "dynamic") { |
|
|
|
// 最新的数据值
|
|
|
|
// console.log('<<<<<<<<<New');
|
|
|
|
// 检测是否已经加载历史数据
|
|
|
|
if (!this.lastTime) return; |
|
|
|
else { |
|
|
|
@ -194,7 +189,6 @@ class Model { |
|
|
|
} |
|
|
|
|
|
|
|
getConfig() { |
|
|
|
console.log("Model.getConfig"); |
|
|
|
return { |
|
|
|
// supports_search: true,
|
|
|
|
supports_group_request: true, |
|
|
|
@ -282,8 +276,6 @@ class Model { |
|
|
|
|
|
|
|
getBars(symbolInfo, resolution, rangeStartDate, rangeEndDate, onLoadedCallback) { |
|
|
|
|
|
|
|
console.log("Model.getHistory"); |
|
|
|
|
|
|
|
if (this.getHistoryCallback instanceof Function) { // ajax加载
|
|
|
|
|
|
|
|
// 通过图表动作 切换分时 需要同步数据和分时值
|
|
|
|
|