Commit d2028b1f authored by 晓彤's avatar 晓彤

提交接口添加参数报错问题

parent 0e0ff489
......@@ -276,6 +276,7 @@ export default {
},
created() {
this.$bus.$on('msg', (row) => {
console.log(row, '传递参数信息')
if (row !== null) {
if (row === '新增') {
this.interfaceForm.id = ''
......@@ -294,9 +295,22 @@ export default {
this.interfaceForm.method = row.method
this.interfaceForm.url = row.url
this.interfaceForm.paramType = row.paramType
this.headersList = JSON.parse(row.headers)
this.paramList = JSON.parse(row.paramTemplate)
this.responseList = JSON.parse(row.responseTemplate)
if (row.headers === 'null') {
this.headersList = []
} else {
this.headersList = JSON.parse(row.headers)
}
if (row.paramTemplate === 'null') {
this.paramList = []
} else {
this.paramList = JSON.parse(row.paramTemplate)
}
if (row.responseTemplate === 'null') {
this.responseList = []
} else {
this.responseList = JSON.parse(row.responseTemplate)
}
}
}
})
......@@ -326,7 +340,6 @@ export default {
paramsName: '',
paramsValue: '',
isRequired: true,
// examples: '',
remarks: ''
})
},
......@@ -418,7 +431,6 @@ export default {
} else {
getInterfaceUrl({ code: this.curlForm.interfaceCurl }).then(
(resp) => {
// console.log('iiii', resp)
var newHeaderList = resp.data.data.headersList
newHeaderList.map((item) => {
this.headersList.push(
......
......@@ -433,6 +433,7 @@ export default {
focusevent(name) {
getGitBranchList({ projectName: name }).then((resp) => {
this.serviceBranchList = resp.data.data.data
console.log('集合为', this.serviceBranchList)
})
},
// 选择服务下拉框触发事件
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment