fix(接口测试): 修复场景变量不显示问题

This commit is contained in:
fit2-zhao 2022-03-21 18:04:45 +08:00 committed by fit2-zhao
parent cf53040931
commit a18c682e09
1 changed files with 15 additions and 0 deletions

View File

@ -1528,6 +1528,21 @@ export default {
if (obj.headers) {
this.currentScenario.headers = obj.headers;
}
let index = 1;
if (obj.variables) {
obj.variables.forEach(item => {
//
if (item.name) {
if (!item.type) {
item.type = "CONSTANT";
item.id = getUUID();
}
item.num = index;
this.currentScenario.variables.push(item);
index++;
}
})
}
this.enableCookieShare = obj.enableCookieShare;
if (obj.onSampleError === undefined) {
this.onSampleError = true;