fix(系统设置): 模块类型的环境导出时信息丢失

--bug=1013205
--user=李玉号
【系统设置】github#13600,从项目A导出的环境信息,在项目B导入后,在Http配置tab页出现header信息丢失
https://www.tapd.cn/55049933/s/1168244

Closes #13600
This commit is contained in:
shiziyuan9527 2022-05-30 15:19:54 +08:00 committed by f2c-ci-robot[bot]
parent 9ac9134f9e
commit 55910894f9
2 changed files with 10 additions and 6 deletions

View File

@ -348,9 +348,11 @@ export default {
if (env.config) { //config if (env.config) { //config
let tempConfig = JSON.parse(env.config); let tempConfig = JSON.parse(env.config);
if (tempConfig.httpConfig.conditions && tempConfig.httpConfig.conditions.length > 0) { if (tempConfig.httpConfig.conditions && tempConfig.httpConfig.conditions.length > 0) {
tempConfig.httpConfig.conditions = tempConfig.httpConfig.conditions.filter(condition => { // tempConfig.httpConfig.conditions.map(condition => {
return condition.type !== 'MODULE'; if (condition.type === 'MODULE') {
}); condition.details = [];
}
})
env.config = JSON.stringify(tempConfig); env.config = JSON.stringify(tempConfig);
} }
} }

View File

@ -394,9 +394,11 @@ export default {
if (env.config) { //config if (env.config) { //config
let tempConfig = JSON.parse(env.config); let tempConfig = JSON.parse(env.config);
if (tempConfig.httpConfig.conditions && tempConfig.httpConfig.conditions.length > 0) { if (tempConfig.httpConfig.conditions && tempConfig.httpConfig.conditions.length > 0) {
tempConfig.httpConfig.conditions = tempConfig.httpConfig.conditions.filter(condition => { // tempConfig.httpConfig.conditions.map(condition => {
return condition.type !== 'MODULE'; if (condition.type === 'MODULE') {
}); condition.details = [];
}
})
env.config = JSON.stringify(tempConfig); env.config = JSON.stringify(tempConfig);
} }
} }