fix: 修复保存场景后查询版本报认证失败的问题

--bug=1017822 --user=刘瑞斌 【接口测试】新建场景中导入任意接口或者导入场景,自定义请求后,保存都提示授权认证失败 https://www.tapd.cn/55049933/s/1262070
This commit is contained in:
CaptainB 2022-10-14 17:33:16 +08:00 committed by 刘瑞斌
parent 9939b966ba
commit 6fc114a046
2 changed files with 14 additions and 12 deletions

View File

@ -609,9 +609,7 @@ export default {
this.initPlugins();
});
if (hasLicense()) {
this.getVersionHistory();
}
this.getVersionHistory();
},
mounted() {
this.$nextTick(() => {
@ -2198,6 +2196,9 @@ export default {
this.$refs.scenarioVariableAdvance.open();
},
getVersionHistory() {
if (!hasLicense()) {
return;
}
getScenarioVersions(this.currentScenario.id).then(response => {
if (this.currentScenario.copy) {
this.versionData = response.data.filter(v => v.versionId === this.currentScenario.versionId);

View File

@ -101,15 +101,13 @@ export default {
},
methods: {
getVersionOptionList(callback) {
if (hasLicense()) {
getProjectVersions(this.currentProjectId)
.then(response => {
this.versionOptions = response.data.filter(v => v.status === 'open');
if (callback) {
callback(this.versionOptions);
}
});
}
getProjectVersions(this.currentProjectId)
.then(response => {
this.versionOptions = response.data.filter(v => v.status === 'open');
if (callback) {
callback(this.versionOptions);
}
});
},
updateUserDataByExternal() {
if (this.testUsers && this.testUsers.length > 0) {
@ -174,6 +172,9 @@ export default {
},
watch: {
versionData() {
if (!hasLicense()) {
return;
}
isProjectVersionEnable(this.currentProjectId)
.then(response => {
this.versionEnable = response.data;