Commit de158f57 authored by 王晓旭's avatar 王晓旭

平台设置-api服务--默认展示全部接口信息

平台设置-api服务-搜索无效
parent b9280317
......@@ -67,7 +67,12 @@ export default {
data() {
return {
searchVal: "",
stepsList: [],
stepsList: [
{
id:'',
productName:'全部',
}
],
isSearch: false,
active: 0,
......@@ -86,13 +91,22 @@ export default {
getProduct({
page: 1,
size: -1, //每页条数
productName: `%${this.searchVal}%`,
// productName: `%${this.searchVal}%`,
}).then((res) => {
let { code, data } = res;
if (code == 1) {
if (data.data.length) {
this.stepsList = data.data;
this.getApiDetail(data.data[0]);
let arr = [
{
id:'',
productName:'全部',
}
]
data.data.forEach(item => {
arr.push(item)
});
this.stepsList = arr
this.getApiDetail(this.stepsList[0]);
} else {
this.curApiInfo = {};
}
......@@ -101,7 +115,7 @@ export default {
},
getApiDetail(item) {
getInterfaceList({ page: 1, size: -1, productId: item.id }).then(
getInterfaceList({ page: 1, size: -1, productId: item.id , interfaceName: `%${this.searchVal}%`,}).then(
(res) => {
let { code, data } = res;
if (code == 1) {
......@@ -115,8 +129,9 @@ export default {
);
},
handleSearch() {
this.active = 0;
this.getServiceApiList();
// this.active = 0;
// this.getServiceApiList();
this.getApiDetail(this.stepsList[this.active])
// this.isSearch = !this.isSearch;
// if (this.isSearch) {
......
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