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

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

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