支持全局异常和统一返回结果,未完待续

This commit is contained in:
648540858
2022-08-21 22:22:34 +08:00
parent ecd14d6757
commit 5461b8ebf2
74 changed files with 844 additions and 15397 deletions

View File

@@ -243,15 +243,16 @@ export default {
}
})
.then(function (res) {
that.total = res.data.total;
that.gbChannels = res.data.list;
if (res.data.code === 0 ) {
that.total = res.data.data.total;
that.gbChannels = res.data.data.list;
that.gbChoosechannel = {};
// 防止出现表格错位
that.$nextTick(() => {
that.$refs.gbChannelsTable.doLayout();
that.eventEnable = true;
})
console.log(that.gbChoosechannel)
}
// 防止出现表格错位
that.$nextTick(() => {
that.$refs.gbChannelsTable.doLayout();
that.eventEnable = true;
})
})
.catch(function (error) {
console.log(error);

View File

@@ -605,13 +605,15 @@ export default {
url: '/api/playback/start/' + this.deviceId + '/' + this.channelId + '?startTime=' + row.startTime + '&endTime=' +
row.endTime
}).then(function (res) {
that.streamInfo = res.data;
if (res.data.code === 0) {
that.streamInfo = res.data.data;
that.app = that.streamInfo.app;
that.streamId = that.streamInfo.stream;
that.mediaServerId = that.streamInfo.mediaServerId;
that.ssrc = that.streamInfo.ssrc;
that.videoUrl = that.getUrlByStreamInfo();
that.recordPlay = true;
}
that.recordPlay = true;
});
}
},

View File

@@ -194,13 +194,16 @@ export default {
url:`/api/platform/server_config`
}).then(function (res) {
console.log(res);
that.platform.deviceGBId = res.data.username;
that.platform.deviceIp = res.data.deviceIp;
that.platform.devicePort = res.data.devicePort;
that.platform.username = res.data.username;
that.platform.password = res.data.password;
that.platform.treeType = "BusinessGroup";
that.platform.administrativeDivision = res.data.username.substr(0, 6);
if (res.data.code === 0) {
that.platform.deviceGBId = res.data.data.username;
that.platform.deviceIp = res.data.data.deviceIp;
that.platform.devicePort = res.data.data.devicePort;
that.platform.username = res.data.data.username;
that.platform.password = res.data.data.password;
that.platform.treeType = "BusinessGroup";
that.platform.administrativeDivision = res.data.data.username.substr(0, 6);
}
}).catch(function (error) {
console.log(error);
});
@@ -328,7 +331,9 @@ export default {
method: 'post',
url:`/api/platform/exit/${deviceGbId}`})
.then(function (res) {
result = res.data;
if (res.data.code === 0) {
result = res.data.data;
}
})
.catch(function (error) {
console.log(error);