Commit 5f64f554 by 无尘

fix:修改接口

parent b380cd63
<!DOCTYPE html><html><head><meta charset=utf-8><link rel="shortcut icon" href=./favicon.ico><title>API网关管理平台</title><link href=./static/css/app.19c96a813096180901918bf034ff494c.css rel=stylesheet></head><body style="min-width: 1400px;"><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.6.6/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/components/img-preview.2.0.00.js></script><script>// Raven.config('https://3715a345910d4c768e7a1ec14619c2d5@sentry.io/1413672').install();</script><script src=//web-1251519181.file.myqcloud.com/components/input.2.0.15.js></script><script src=//web-1251519181.file.myqcloud.com/components/delete.2.0.01.js></script><script type=text/javascript src=./static/js/manifest.42ca3adc5b4365634591.js></script><script type=text/javascript src=./static/js/vendor.71dc162eb690bf6a36a0.js></script><script type=text/javascript src=./static/js/app.6b740cc0d36bda3fa826.js></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><link rel="shortcut icon" href=./favicon.ico><title>API网关管理平台</title><link href=./static/css/app.901b2b4e151b616474113bd37bdf5936.css rel=stylesheet></head><body style="min-width: 1400px;"><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.6.6/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/components/img-preview.2.0.00.js></script><script>// Raven.config('https://3715a345910d4c768e7a1ec14619c2d5@sentry.io/1413672').install();</script><script src=//web-1251519181.file.myqcloud.com/components/input.2.0.15.js></script><script src=//web-1251519181.file.myqcloud.com/components/delete.2.0.01.js></script><script type=text/javascript src=./static/js/manifest.fe60218666c9bcff04ee.js></script><script type=text/javascript src=./static/js/vendor.71dc162eb690bf6a36a0.js></script><script type=text/javascript src=./static/js/app.6b740cc0d36bda3fa826.js></script></body></html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
!function(e){var n=window.webpackJsonp;window.webpackJsonp=function(r,c,f){for(var a,d,b,i=0,u=[];i<r.length;i++)d=r[i],t[d]&&u.push(t[d][0]),t[d]=0;for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&(e[a]=c[a]);for(n&&n(r,c,f);u.length;)u.shift()();if(f)for(i=0;i<f.length;i++)b=o(o.s=f[i]);return b};var r={},t={24:0};function o(n){if(r[n])return r[n].exports;var t=r[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.e=function(e){var n=t[e];if(0===n)return new Promise(function(e){e()});if(n)return n[2];var r=new Promise(function(r,o){n=t[e]=[r,o]});n[2]=r;var c=document.getElementsByTagName("head")[0],f=document.createElement("script");f.type="text/javascript",f.charset="utf-8",f.async=!0,f.timeout=12e4,o.nc&&f.setAttribute("nonce",o.nc),f.src=o.p+"static/js/"+e+"."+{0:"9375e55c4a69923b85b0",1:"0ebe3ead93207dc78a78",2:"746c1aff28909fa81065",3:"ee2db5932cf0c94dec20",4:"8986d02b4b782618f642",5:"c4f5b760372b244e0dd7",6:"e4fb3b8fe9848c1e3cdd",7:"b2a85a42ddd430235a63",8:"0774f888c4ec018000f4",9:"c98145195e68a6e13faf",10:"638039a7b39908980436",11:"f27d1de28264fbbe30ff",12:"ccbc18453e41490e2dba",13:"b109164d2be44afb7733",14:"9825bb69e60b8030c230",15:"6700988b665e14f99d41",16:"6e70f43452cbef826036",17:"8354f7b686256ddf47fb",18:"e7685f45ec4dd5b70ae4",19:"40fd9824f7542ed7f56d",20:"c163ea91d150e0ca1cb1",21:"55879284ad4d1f03fbe0"}[e]+".js";var a=setTimeout(d,12e4);function d(){f.onerror=f.onload=null,clearTimeout(a);var n=t[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return f.onerror=f.onload=d,c.appendChild(f),r},o.m=e,o.c=r,o.d=function(e,n,r){o.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},o.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,"a",n),n},o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},o.p="./",o.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
!function(e){var n=window.webpackJsonp;window.webpackJsonp=function(r,c,f){for(var a,d,i,u=0,b=[];u<r.length;u++)d=r[u],t[d]&&b.push(t[d][0]),t[d]=0;for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&(e[a]=c[a]);for(n&&n(r,c,f);b.length;)b.shift()();if(f)for(u=0;u<f.length;u++)i=o(o.s=f[u]);return i};var r={},t={24:0};function o(n){if(r[n])return r[n].exports;var t=r[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.e=function(e){var n=t[e];if(0===n)return new Promise(function(e){e()});if(n)return n[2];var r=new Promise(function(r,o){n=t[e]=[r,o]});n[2]=r;var c=document.getElementsByTagName("head")[0],f=document.createElement("script");f.type="text/javascript",f.charset="utf-8",f.async=!0,f.timeout=12e4,o.nc&&f.setAttribute("nonce",o.nc),f.src=o.p+"static/js/"+e+"."+{0:"9375e55c4a69923b85b0",1:"0ebe3ead93207dc78a78",2:"746c1aff28909fa81065",3:"ee2db5932cf0c94dec20",4:"8986d02b4b782618f642",5:"a2dcd228e86f2340568b",6:"e4fb3b8fe9848c1e3cdd",7:"b2a85a42ddd430235a63",8:"0774f888c4ec018000f4",9:"c98145195e68a6e13faf",10:"638039a7b39908980436",11:"f27d1de28264fbbe30ff",12:"ccbc18453e41490e2dba",13:"b109164d2be44afb7733",14:"9825bb69e60b8030c230",15:"6700988b665e14f99d41",16:"6e70f43452cbef826036",17:"8354f7b686256ddf47fb",18:"e7685f45ec4dd5b70ae4",19:"40fd9824f7542ed7f56d",20:"c163ea91d150e0ca1cb1",21:"55879284ad4d1f03fbe0"}[e]+".js";var a=setTimeout(d,12e4);function d(){f.onerror=f.onload=null,clearTimeout(a);var n=t[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return f.onerror=f.onload=d,c.appendChild(f),r},o.m=e,o.c=r,o.d=function(e,n,r){o.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},o.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,"a",n),n},o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},o.p="./",o.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
......@@ -2,27 +2,22 @@
* @Descripttion : 当前组件信息
* @Author : 无尘
* @Date : 2020-04-03 16:18:11
* @LastEditors : 无尘
* @LastEditTime : 2020-04-03 17:59:47
* @LastEditors: 无尘
* @LastEditTime: 2020-05-18 11:28:51
* @FilePath : \Hapi-demoj:\公司\api-gateway\src\components\plug\log-list.vue
-->
<template>
<div style="margin-top:20px">
<div class="table-content">
<el-table :data="tableData" style="width: 100%" tooltip-effect="dark" v-loading="loading" :height="tableHeight">
<el-table-column label="请求ip" prop="projectName">
<el-table :data="tableData" style="width: 100%" tooltip-effect="dark" :height="tableHeight">
<el-table-column label="traceid" prop="projectName">
<template slot-scope="scope">
{{ scope.row.requestIp }}
{{ scope.row.traceId || '--' }}
</template>
</el-table-column>
<el-table-column label="应用" prop="groupName">
<template slot-scope="scope">
{{ scope.row.app }}
</template>
</el-table-column>
<el-table-column label="开发者账号" prop="interfaceName">
<template slot-scope="scope">
{{ scope.row.developer }}
{{ scope.row.name || '--' }}
</template>
</el-table-column>
<el-table-column label="请求时间" prop="bindTime">
......@@ -33,32 +28,28 @@
</el-table-column>
<el-table-column label="商户" prop="interfaceName">
<template slot-scope="scope">
{{ scope.row.merchant }}
{{ scope.row.enterpriseName || '--' }}
</template>
</el-table-column>
<el-table-column label="接口" prop="interfaceName">
<template slot-scope="scope">
{{ scope.row.interface }}
</template>
</el-table-column>
<el-table-column label="请求内容" prop="interfaceName">
<template slot-scope="scope">
{{ scope.row.requestContent }}
<div>{{ scope.row.projectName || '--' }}-{{ scope.row.groupName || '--' }}</div>
<div>{{ scope.row.interfaceName || '--' }}</div>
</template>
</el-table-column>
<el-table-column label="返回内容" prop="interfaceName">
<el-table-column label="请求内容" prop="interfaceName" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.responseContent }}
{{ scope.row.requestParams || '--' }}
</template>
</el-table-column>
<el-table-column label="状态" prop="interfaceName">
<el-table-column label="返回内容" prop="interfaceName" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.status }}
{{ scope.row.responseParams || '--' }}
</template>
</el-table-column>
<el-table-column label="备注">
<template slot-scope="scope">
{{ scope.row.remarks }}
{{ scope.row.remarks || '--' }}
</template>
</el-table-column>
</el-table>
......@@ -67,7 +58,7 @@
</template>
<script>
import { getRequest } from '@/api/api';
// import { getRequest } from '@/api/api';
export default {
props: {
tableData: {
......@@ -80,29 +71,12 @@ export default {
data() {
return {};
},
methods: {
cancelBind(item) {
var that = this;
let params = {
id: item.openPlatformInterfaceId
};
getRequest('/gateway-manage/platform/white/unbind', params)
.then(res => {
if (res.data.code == '0000') {
this.$emit('getList');
} else {
this.$message.error(res.data.message);
}
})
.catch(function(error) {
that.$message.error({
duration: 1000,
message: error.message
});
});
}
},
methods: {},
components: {}
};
</script>
<style lang="less" scoped></style>
<style lang="less" scoped>
.line-18 {
line-height: 18px;
}
</style>
......@@ -3,8 +3,8 @@
* @version: 1.0.0
* @Author: 无尘
* @Date: 2019-09-05 10:03:31
* @LastEditors : 无尘
* @LastEditTime : 2020-04-03 20:21:55
* @LastEditors: 无尘
* @LastEditTime: 2020-05-18 11:22:00
-->
<template>
<div class="api-body-content border-box">
......@@ -45,12 +45,12 @@
</el-tab-pane>
<el-tab-pane label="日志" name="four" v-loading="loading">
<div class="log-search flex">
<el-date-picker class="" v-model="requestDate" type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择请求时间" :editable="false" @change="changeDate"> </el-date-picker><el-input class="w-250 marginLeft10" placeholder="请输入开发者账号/ip/商户名称" prefix-icon="el-icon-search" v-model="searchValue" clearable @clear="clearSearch" @keyup.native="value => searchEnterFun(value, searchValue)"> </el-input> <el-select v-model="requestProjectId" placeholder="请选择项目" class="w-140 marginLeft10" size="small" style="display:inline-block" clearable @change="changePro()"> <el-option v-for="item in projectList" :key="item.id" :label="item.name" :value="item.id"> </el-option> </el-select
><el-select v-model="requestStatus" placeholder="请选择状态" class="w-140 marginLeft10" size="small" style="display:inline-block" clearable @change="changeStatus()">
<el-date-picker class="" v-model="logSearch.requestDate" type="daterange" format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择请求时间" :editable="false" @change="changeDate"> </el-date-picker><el-input class="w-250 marginLeft10" placeholder="请输入开发者账号/ip/商户名称/接口名称" prefix-icon="el-icon-search" v-model="logSearch.searchValue" clearable @clear="clearSearch" @keyup.native="value => searchEnterFun(value, searchValue)"> </el-input> <el-select v-model="logSearch.requestProjectId" placeholder="请选择项目" class="w-140 marginLeft10" size="small" style="display:inline-block" clearable @change="changePro"> <el-option v-for="item in projectList" :key="item.id" :label="item.name" :value="item.id"> </el-option> </el-select><el-select v-if="logSearch.requestProjectId" v-model="logSearch.requestGroupId" placeholder="请选择项目" class="w-140 marginLeft10" size="small" style="display:inline-block" clearable @change="changeGroup"> <el-option v-for="item in groupList" :key="item.id" :label="item.name" :value="item.id"> </el-option> </el-select
><!-- <el-select v-model="logSearch.requestStatus" placeholder="请选择状态" class="w-140 marginLeft10" size="small" style="display:inline-block" clearable @change="changeStatus">
<el-option label="全部状态" value=""></el-option>
<el-option label="成功" value="1"></el-option>
<el-option label="失败" value="0"></el-option>
</el-select>
</el-select> -->
</div>
<log-list :tableData="tableData" @getList="getList"></log-list>
</el-tab-pane>
......@@ -69,8 +69,8 @@
<script>
import navBread from '@/components/nav/nav-bread.vue';
/*eslint-disable*/
import { getRequest } from '@/api/api';
import { postRequest } from '@/api/api';
import { getRequest, postRequest } from '@/api/api';
import { _debounce } from '@/assets/js/public';
// import request from '@/api/api';
import selectEnv from '@/components/plug/environment-list';
import whiteList from '@/components/plug/white-list';
......@@ -125,14 +125,46 @@ export default {
type: '',
loading: false,
// log
requestDate: '',
searchValue: '',
requestProjectId: '',
requestStatus: ''
logSearch: {
requestDate: [],
searchValue: '',
requestProjectId: '',
requestGroupId: '',
requestStatus: ''
}
};
},
methods: {
/**
* 改变log请求时间
*/
changeDate() {
const that = this;
that.currentPage = 1;
that.getList();
},
changeStatus() {
const that = this;
that.currentPage = 1;
that.getList();
},
changePro() {
const that = this;
that.currentPage = 1;
that.getList();
},
searchEnterFun: _debounce(function() {
const that = this;
that.currentPage = 1;
that.getList();
},200),
clearSearch() {
const that = this;
that.currentPage = 1;
that.getList();
},
/**
* tab 切换
*/
/* eslint-disable */
......@@ -174,7 +206,7 @@ export default {
},
//获取列表
getList() {
var that = this;
const that = this;
let url = '';
let params = {};
if (this.activeName === 'first') {
......@@ -205,6 +237,21 @@ export default {
pageNum: this.currentPage,
pageSize: this.pageSize
};
}else {
// log
url = '/gateway-manage/page-log';
if (!that.logSearch.requestDate) {
that.logSearch.requestDate = [];
}
params = {
startTime: that.logSearch.requestDate[0],
endTime: that.logSearch.requestDate[1],
requestProjectId: that.logSearch.requestProjectId,
requestGroupId: that.logSearch.requestGroupId,
requestStatus: that.logSearch.requestStatus,
pageNum: this.currentPage,
pageSize: this.pageSize
};
}
if (this.activeName === 'first' || this.activeName === 'second') {
this.loading = true;
......@@ -220,10 +267,12 @@ export default {
}
this.loading = false;
} else {
this.loading = false;
this.$message.error(res.data.message);
}
})
.catch(function(error) {
this.loading = false;
that.$message.error({
duration: 1000,
message: error.message
......@@ -243,10 +292,12 @@ export default {
}
this.loading = false;
} else {
this.loading = false;
this.$message.error(res.data.message);
}
})
.catch(function(error) {
this.loading = false;
that.$message.error({
duration: 1000,
message: error.message
......@@ -257,7 +308,7 @@ export default {
//获取项目列表
getProjectList() {
var that = this;
getRequest('/gateway-manage//plugin/interface/tree', {})
getRequest('/gateway-manage/plugin/interface/tree', {})
.then(res => {
if (res.data.code == '0000') {
if (res.data.result) {
......
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