mirror of
https://github.com/YMFE/yapi.git
synced 2025-03-01 14:05:44 +08:00
Merge branch 'dev' of gitlab.corp.qunar.com:mfe/yapi into dev
This commit is contained in:
commit
7ebc654416
@ -62,8 +62,13 @@ YApi 是<strong>高效</strong>、<strong>易用</strong>、<strong>功能强大
|
||||
* 安百科技
|
||||
* 好玩友
|
||||
* Nexusguard
|
||||
* 木木工作室
|
||||
|
||||
|
||||
### Authors
|
||||
* [suxiaoxin](https://github.com/suxiaoxin)
|
||||
* [zwjamnsss](https://github.com/amnsss)
|
||||
* [dwb1994](https://github.com/dwb1994)
|
||||
* [fungezi](https://github.com/fungezi)
|
||||
### License
|
||||
Apache Licene 2.0
|
||||
|
||||
|
@ -15,6 +15,7 @@ import InterfaceColMenu from './InterfaceCol/InterfaceColMenu.js'
|
||||
import InterfaceColContent from './InterfaceCol/InterfaceColContent.js'
|
||||
import InterfaceCaseContent from './InterfaceCol/InterfaceCaseContent.js'
|
||||
import { getProject } from '../../../reducer/modules/project';
|
||||
import { setColData } from '../../../reducer/modules/interfaceCol.js';
|
||||
const contentRouter = {
|
||||
path: '/project/:id/interface/:action/:actionId',
|
||||
exact: true
|
||||
@ -48,6 +49,7 @@ InterfaceRoute.propTypes = {
|
||||
isShowCol: state.interfaceCol.isShowCol
|
||||
}
|
||||
},{
|
||||
setColData,
|
||||
getProject
|
||||
}
|
||||
)
|
||||
@ -57,7 +59,8 @@ class Interface extends Component {
|
||||
history: PropTypes.object,
|
||||
location: PropTypes.object,
|
||||
isShowCol: PropTypes.bool,
|
||||
getProject: PropTypes.func
|
||||
getProject: PropTypes.func,
|
||||
setColData: PropTypes.func
|
||||
}
|
||||
|
||||
constructor(props) {
|
||||
@ -75,6 +78,9 @@ class Interface extends Component {
|
||||
this.props.history.push('/project/' + params.id + '/interface/' + action)
|
||||
}
|
||||
componentWillMount(){
|
||||
this.props.setColData({
|
||||
isShowCol: true
|
||||
})
|
||||
this.props.getProject(this.props.match.params.id)
|
||||
}
|
||||
render() {
|
||||
|
@ -375,7 +375,7 @@ class InterfaceColContent extends Component {
|
||||
const { interfaceColList } = nextProps;
|
||||
const { actionId: oldColId, id } = this.props.match.params
|
||||
let newColId = nextProps.match.params.actionId
|
||||
if (!interfaceColList.find(item => +item._id === +newColId)) {
|
||||
if (!interfaceColList.find(item => +item._id === +newColId)&&interfaceColList[0]._id) {
|
||||
this.props.history.push('/project/' + id + '/interface/col/' + interfaceColList[0]._id)
|
||||
} else if ((oldColId !== newColId) || interfaceColList !== this.props.interfaceColList) {
|
||||
if (newColId && newColId != 0) {
|
||||
|
@ -257,7 +257,7 @@ export default class InterfaceColMenu extends Component {
|
||||
}
|
||||
|
||||
render() {
|
||||
let { currColId, currCaseId, isShowCol } = this.props;
|
||||
const { currColId, currCaseId, isShowCol } = this.props;
|
||||
const { colModalType, colModalVisible, filterValue, importInterVisible } = this.state;
|
||||
|
||||
// const menu = (col) => {
|
||||
@ -288,9 +288,7 @@ export default class InterfaceColMenu extends Component {
|
||||
// this.props.interfaceColList.caseList = caseList;
|
||||
// }
|
||||
|
||||
// console.log(this.props.match);
|
||||
console.log(currColId)
|
||||
// currColId = this.props.match.params.id?this.props.match.params.id:currColId;
|
||||
|
||||
return (
|
||||
<div>
|
||||
<div className="interface-filter">
|
||||
|
@ -1 +1 @@
|
||||
module.exports = {"qsso" : {module: require('plugins/yapi-plugin-qsso/client.js'),options: null},"import-postman" : {module: require('exts/yapi-plugin-import-postman/client.js'),options: null},"import-har" : {module: require('exts/yapi-plugin-import-har/client.js'),options: null},"advanced-mock" : {module: require('exts/yapi-plugin-advanced-mock/client.js'),options: null},"import-swagger" : {module: require('exts/yapi-plugin-import-swagger/client.js'),options: null}}
|
||||
module.exports = {"import-postman" : {module: require('exts/yapi-plugin-import-postman/client.js'),options: null},"import-har" : {module: require('exts/yapi-plugin-import-har/client.js'),options: null},"advanced-mock" : {module: require('exts/yapi-plugin-advanced-mock/client.js'),options: null},"import-swagger" : {module: require('exts/yapi-plugin-import-swagger/client.js'),options: null}}
|
@ -278,6 +278,8 @@ class interfaceColController extends baseController{
|
||||
let interfaceData = await this.interfaceModel.getBaseinfo(params.interface_list[i]);
|
||||
data.interface_id = params.interface_list[i];
|
||||
data.casename = interfaceData.title;
|
||||
data.req_body_other = interfaceData.req_body_other;
|
||||
data.req_body_type = interfaceData.req_body_type;
|
||||
await this.caseModel.save(data);
|
||||
let username = this.getUsername();
|
||||
this.colModel.get(params.col_id).then((col)=>{
|
||||
|
@ -80,7 +80,7 @@ class interfaceModel extends baseModel {
|
||||
getBaseinfo(id){
|
||||
return this.model.findOne({
|
||||
_id: id
|
||||
}).select('path method uid title project_id cat_id status').exec()
|
||||
}).select('path method uid title project_id cat_id status req_body_other req_body_type').exec()
|
||||
}
|
||||
|
||||
getVar(project_id, method){
|
||||
|
1
static/prd/assets.js
Normal file
1
static/prd/assets.js
Normal file
@ -0,0 +1 @@
|
||||
window.WEBPACK_ASSETS = {"index.js":{"js":"index@6517cb5409d23b9859ea.js","css":"index@6517cb5409d23b9859ea.css"},"lib":{"js":"lib@20c8368f068420863aa6.js"},"lib2":{"js":"lib2@6cdf7efffb3310dfcd30.js"},"manifest":{"js":"manifest@b67af9f8b578904e66c5.js"}}
|
1
static/prd/index@6517cb5409d23b9859ea.css
Normal file
1
static/prd/index@6517cb5409d23b9859ea.css
Normal file
File diff suppressed because one or more lines are too long
BIN
static/prd/index@6517cb5409d23b9859ea.css.gz
Normal file
BIN
static/prd/index@6517cb5409d23b9859ea.css.gz
Normal file
Binary file not shown.
1
static/prd/index@6517cb5409d23b9859ea.js
Normal file
1
static/prd/index@6517cb5409d23b9859ea.js
Normal file
File diff suppressed because one or more lines are too long
BIN
static/prd/index@6517cb5409d23b9859ea.js.gz
Normal file
BIN
static/prd/index@6517cb5409d23b9859ea.js.gz
Normal file
Binary file not shown.
1
static/prd/lib2@6cdf7efffb3310dfcd30.js
Normal file
1
static/prd/lib2@6cdf7efffb3310dfcd30.js
Normal file
File diff suppressed because one or more lines are too long
BIN
static/prd/lib2@6cdf7efffb3310dfcd30.js.gz
Normal file
BIN
static/prd/lib2@6cdf7efffb3310dfcd30.js.gz
Normal file
Binary file not shown.
1
static/prd/lib@20c8368f068420863aa6.js
Normal file
1
static/prd/lib@20c8368f068420863aa6.js
Normal file
File diff suppressed because one or more lines are too long
BIN
static/prd/lib@20c8368f068420863aa6.js.gz
Normal file
BIN
static/prd/lib@20c8368f068420863aa6.js.gz
Normal file
Binary file not shown.
1
static/prd/manifest@b67af9f8b578904e66c5.js
Normal file
1
static/prd/manifest@b67af9f8b578904e66c5.js
Normal file
@ -0,0 +1 @@
|
||||
!function(e){function t(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return e[n].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n=window.webpackJsonp;window.webpackJsonp=function(s,o){for(var u,f,l=0,c=[];l<s.length;l++)f=s[l],i[f]&&c.push.apply(c,i[f]),i[f]=0;for(u in o)e[u]=o[u];for(n&&n(s,o);c.length;)c.shift().call(null,t);if(o[0])return r[0]=0,t(0)};var r={},i={3:0};t.e=function(e,n){if(0===i[e])return n.call(null,t);if(void 0!==i[e])i[e].push(n);else{i[e]=[n];var r=document.getElementsByTagName("head")[0],s=document.createElement("script");s.type="text/javascript",s.charset="utf-8",s.async=!0,s.src=t.p+""+e+".chunk.min.js",r.appendChild(s)}},t.m=e,t.c=r,t.p=""}([])
|
Loading…
Reference in New Issue
Block a user