Commit a941201f authored by ninglx's avatar ninglx

处理pako解压数据为空

parent 795327b1
......@@ -130,12 +130,17 @@ export default {
trackApi[this.apiName](this.params).then((res) => {
// trackApi[this.apiName](customParam).then((res) => {
let data = pako.inflate(res); // pako解压为protobuf
let realData = FrameList.decode(data); // protobuf根据定义类型转json
this.fullTrack = realData.frameInfo;
this.$nextTick(() => {
this.loading = false;
this.$refs.pathMap.render();
});
console.log("protobuf data", data);
if (data) {
let realData = FrameList.decode(data); // protobuf根据定义类型转json
this.fullTrack = realData.frameInfo;
this.$nextTick(() => {
this.$refs.pathMap.render();
});
} else {
this.$message("暂无轨迹数据");
}
this.loading = false;
});
},
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