fix(接口测试): 修复场景变量不显示问题
This commit is contained in:
parent
cf53040931
commit
a18c682e09
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue