Commit a941201f authored by ninglx's avatar ninglx

处理pako解压数据为空

parent 795327b1
...@@ -130,12 +130,17 @@ export default { ...@@ -130,12 +130,17 @@ export default {
trackApi[this.apiName](this.params).then((res) => { trackApi[this.apiName](this.params).then((res) => {
// trackApi[this.apiName](customParam).then((res) => { // trackApi[this.apiName](customParam).then((res) => {
let data = pako.inflate(res); // pako解压为protobuf let data = pako.inflate(res); // pako解压为protobuf
let realData = FrameList.decode(data); // protobuf根据定义类型转json console.log("protobuf data", data);
this.fullTrack = realData.frameInfo; if (data) {
this.$nextTick(() => { let realData = FrameList.decode(data); // protobuf根据定义类型转json
this.loading = false; this.fullTrack = realData.frameInfo;
this.$refs.pathMap.render(); this.$nextTick(() => {
}); this.$refs.pathMap.render();
});
} else {
this.$message("暂无轨迹数据");
}
this.loading = false;
}); });
}, },
playClick() { playClick() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment