This commit is contained in:
qitmac000249 2017-08-22 16:37:37 +08:00
commit be04f17cdc
35 changed files with 604 additions and 189 deletions

View File

@ -1,13 +1,24 @@
## YApi
### 一、平台介绍
<img src="./doc/images/yapi-base-flow.jpg" width = "500" style="margin:0px auto;display:block;" alt="图片名称" align=center />
![avatar](http://ov2tuszjv.bkt.clouddn.com/yapi-flow-base.png)
<p style='text-indent:2em;line-height:1.8em'>YApi是<strong>高效</strong><strong>易用</strong><strong>功能强大</strong>的api管理平台旨在为开发、产品、测试人员提供更优雅的接口管理服务。可以帮助开发者轻松创建、发布、维护 APIYApi还为用户提供了优秀的交互体验开发人员只需利用平台提供的接口数据写入工具以及简单的点击操作就可以实现接口的管理。</p>
### 二、为什么使用 YApi
1. 基于 Json5 和 Mockjs 定义接口返回数据的结构和文档,效率提升多倍
2. 扁平化权限设计,即保证了企业级项目管理,又保证了易用性
3. 不仅有类似postman的接口调试功能还可将每次测试接口保存成一个测试用例到测试集在测试集可一次性测试该测试集下所有测试用例返回结果格式
4. 免费开源
2. 扁平化权限设计,即保证了大型企业级项目的管理,又保证了易用性
3. 不仅有类似postman的接口调试还有强大的测试集功能
4. 免费开源,内网部署,信息再也不怕泄露了!
### 三、部署
首先在在服务器安装nodejs, mongodb, npm, git
1. git clone
2. npm install
3. 初次安装需要执行npm run install-server
4. npm run server

View File

@ -3,14 +3,15 @@
.footer-wrapper{
border-top: 1px solid #ddd;
height: 2rem;
height: 2.4rem;
width: 100%;
}
.footer-container{
@include row-width-limit;
margin:0 auto;
margin: 0 auto !important;
padding-top: .48rem;
padding-bottom: .48rem;
.icon {
font-size: .16rem;
margin-right: .08rem;

View File

@ -1,12 +1,6 @@
@import '../../styles/common.scss';
@import '../../styles/mixin.scss';
$color-white : #fff;
$color-blue : #108ee9;
$color-blue-deeper: #34495E;
$color-grey-deep : #929aac;
$color-black-light : #404040;
.nav-tooltip {
color: red;
}
@ -72,7 +66,7 @@ $color-black-light : #404040;
.nav-toolbar {
font-size: .15rem;
float: left;
}
.user-toolbar{
@ -91,7 +85,7 @@ $color-black-light : #404040;
margin-left: .16rem;
transition: color .4s;
.dropdown-link {
color: #999;
color: #ccc;
transition: color .4s;
.ant-avatar-image{
margin-bottom: -10px;
@ -102,7 +96,7 @@ $color-black-light : #404040;
}
&:hover{
.dropdown-link {
color: #fff;
color: #ccc;
}
}
.name {

View File

@ -9,6 +9,7 @@ import { setCurrGroup } from '../../../reducer/modules/group'
import { changeMenuItem } from '../../../reducer/modules/menu'
const Option = AutoComplete.Option;
@connect(
state => ({
groupList: state.group.groupList,

View File

@ -51,13 +51,13 @@ class ProjectCard extends Component {
// </Popconfirm>
render() {
const { projectData, isFollowed } = this.props;
console.log(projectData);
return (
<div className="card-container">
<Card bordered={false} bodyStyle={{padding: 16}} className="m-card" onClick={() => this.props.history.push('/project/' + projectData._id)}>
<div className="m-card-logo">
<Icon type="area-chart" className="icon" />
<p className="name">{projectData.name || projectData.projectname}</p>
</div>
<Card bordered={false} className="m-card" onClick={() => this.props.history.push('/project/' + projectData._id)}>
<Icon type="area-chart" className="ui-logo" />
<h4 className="ui-title">{projectData.name || projectData.projectname}</h4>
<p className="ui-desc">{projectData.desc || projectData.desc}</p>
</Card>
<div className="card-btns">
<Tooltip placement="rightTop" title={isFollowed ? '取消关注' : '添加关注'}>

View File

@ -1,25 +1,35 @@
@import '../../styles/mixin.scss';
.card-container {
position: relative;
transition: all .2s;
.m-card, .card-btns {
transform: translateY(0);
transition: all .2s;
}
&:hover {
.m-card{
background-color: #efefef;
.m-card, .card-btns {
transform: translateY(-4px);
}
.card-btns {
display: block;
}
&:active {
.m-card, .card-btns {
transform: translateY(4px);
}
}
// 按钮组
.card-btns {
display: none;
position: absolute;
top: 0;
right: 0;
width: .48rem;
height: .48rem;
background: linear-gradient(225deg, #ccc, #ccc 50%, transparent 0);
// 卡片右上角按钮
.icon {
cursor: pointer;
font-size: .2rem;
padding: .08rem;
font-size: .16rem;
padding: .06rem;
position: absolute;
right: 0;
top: 0;
@ -29,12 +39,44 @@
.m-card {
cursor: pointer;
text-align: center;
margin-bottom: .16rem;
background-color: #fff;
margin-bottom: .36rem;
transition: all .4s;
color: rgba(0, 0, 0, 0.65);
position: relative;
.m-card-logo {
.ant-card-body {
background-color: $color-bg-gray;
border-radius: 4px;
padding-top: .9rem;
box-shadow: 0 4px 6px rgba(50,50,93,.11), 0 1px 3px rgba(0,0,0,.08);
}
.ui-logo {
width: 1rem;
height: 1rem;
border-radius: 50%;
position: absolute;
left: 50%;
top: 0;
transform: translate(-50%, -20%);
font-size: .4rem;
color: #fff;
background-color: #2395f1;
line-height: 1rem;
box-shadow: 0 4px 6px rgba(50,50,93,.11), 0 1px 3px rgba(0,0,0,.08);
}
.ui-title {
font-size: .19rem;
margin-bottom: .08rem;
font-weight: normal;
}
.ui-desc {
font-size: .16rem;
height: .24rem;
line-height: .24rem;
overflow: hidden;
text-overflow:ellipsis;
white-space: nowrap;
color: rgba(39, 56, 72, 0.43);
}
.m-card-body {
.icon {
font-size: .8rem;
}
@ -43,4 +85,5 @@
margin-top: .16rem;
}
}
}

View File

@ -1,3 +1,28 @@
export default {
PAGE_LIMIT: 10 // 默认每页展示10条数据
PAGE_LIMIT: 10, // 默认每页展示10条数据
HTTP_METHOD: {
'GET': {
request_body: false
},
'POST': {
request_body: true
},
'PUT': {
request_body: true
},
'DELETE': {
request_body: true
},
'HEAD': {
request_body: false
},
'OPTIONS': {
request_body: false
},
'PATCH': {
request_body: true
}
}
}

View File

@ -69,10 +69,10 @@ class Follows extends Component {
path: '/follow'
}]}/>
<div className="g-row">
<Row gutter={16} className="follow-box">
<Row gutter={24} className="follow-box card-panel">
{data.map((item, index) => {
return (
<Col span={6} key={index}>
<Col span={8} key={index}>
<ProjectCard projectData={item} isFollowed={true} callbackResult={this.receiveRes} />
</Col>);
})}

View File

@ -103,11 +103,11 @@ class ProjectList extends Component {
render() {
const projectData = this.state.projectData;
return (
<div className="m-panel">
<Row gutter={16}>
<div className="m-panel card-panel">
<Row gutter={24}>
{projectData.length ? projectData.map((item, index) => {
return (
<Col span={8} key={index}>
<Col span={12} key={index}>
<ProjectCard projectData={item} />
</Col>);
}) : <ErrMsg type="noProject"/>}

View File

@ -344,6 +344,7 @@ $color-bg-lightblue: #c6e2ff;
margin-top: .48rem;
}
.section-card {
padding-bottom: 1rem;
.ant-card {
font-size: .17rem;
border-radius: .04rem;

View File

@ -33,6 +33,7 @@
.card-login {
margin-top: 1.6rem;
margin-bottom: 1.6rem;
border-radius: .04rem;
position: relative;
.login-logo {

View File

@ -1,11 +1,18 @@
import React,{Component} from 'react'
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { Form, Input, Select, Button } from 'antd';
import constants from '../../../../constants/variable.js'
const HTTP_METHOD = constants.HTTP_METHOD;
const HTTP_METHOD_KEYS = Object.keys(HTTP_METHOD);
const FormItem = Form.Item;
const Option = Select.Option;
function hasErrors(fieldsError) {
return Object.keys(fieldsError).some(field => fieldsError[field]);
}
class AddInterfaceForm extends Component {
static propTypes = {
form: PropTypes.object,
@ -23,7 +30,7 @@ class AddInterfaceForm extends Component {
});
}
render() {
const { getFieldDecorator, getFieldsError } = this.props.form;
@ -31,12 +38,11 @@ class AddInterfaceForm extends Component {
initialValue: 'GET'
})(
<Select style={{ width: 75 }}>
<Option value="GET">GET</Option>
<Option value="POST">POST</Option>
<Option value="PUT">PUT</Option>
<Option value="DELETE">DELETE</Option>
{HTTP_METHOD_KEYS.map(item => {
return <Option key={item} value={item}>{item}</Option>
})}
</Select>
);
);
const formItemLayout = {
labelCol: {
xs: { span: 24 },
@ -47,10 +53,10 @@ class AddInterfaceForm extends Component {
sm: { span: 14 }
}
};
return (
<Form onSubmit={this.handleSubmit}>
<FormItem
{...formItemLayout}
@ -62,7 +68,7 @@ class AddInterfaceForm extends Component {
}]
})(
<Input placeholder="接口名称" />
)}
)}
</FormItem>
<FormItem
@ -75,11 +81,11 @@ class AddInterfaceForm extends Component {
}]
})(
<Input addonBefore={prefixSelector} placeholder="/path" />
)}
)}
</FormItem>
<br />
<FormItem wrapperCol={{ span: 24, offset: 8 }} >
<Button onClick={this.props.onCancel} style={{marginRight: "10px"}} >取消</Button>
<Button onClick={this.props.onCancel} style={{ marginRight: "10px" }} >取消</Button>
<Button
type="primary"
htmlType="submit"
@ -88,7 +94,7 @@ class AddInterfaceForm extends Component {
提交
</Button>
</FormItem>
</Form>
);

View File

@ -3,8 +3,11 @@
.interface-edit-item{
margin-bottom: 10px;
}
.interface-edit-item-content{
margin-bottom: 10px;
}
.interface-edit-del-icon{
margin-top: 4px;
margin-top: 10px;
margin-left: 5px;
cursor: pointer
}

View File

@ -1,9 +1,10 @@
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import _ from 'underscore'
import constants from '../../../../constants/variable.js'
import {
Form, Select, Input,Tooltip,
Form, Select, Input, Tooltip,
Button, Row, Col, Radio, Icon
} from 'antd';
@ -14,11 +15,13 @@ const RadioGroup = Radio.Group;
const dataTpl = {
req_query: { name: "", required: "1", desc: "" },
req_headers: { name: "", required: "1", desc: "" },
req_params: { name: "", desc: "" }
req_params: { name: "", desc: "" },
req_body_form: {name: "", type: "text", required: "1", desc: ""}
}
const mockEditor = require('./mockEditor.js');
const HTTP_METHOD = constants.HTTP_METHOD;
const HTTP_METHOD_KEYS = Object.keys(HTTP_METHOD);
class InterfaceEditForm extends Component {
static propTypes = {
@ -103,9 +106,14 @@ class InterfaceEditForm extends Component {
})
}
}
values.req_headers = values.req_headers.filter((item) => item.name !== '')
values.req_body_form = values.req_body_form.filter((item) => item.name !== '')
values.req_params = values.req_params.filter(item => item.name !== '')
values.req_headers = values.req_headers ?values.req_headers.filter((item) => item.name !== '') : []
values.req_body_form = values.req_body_form ? values.req_body_form.filter((item) => item.name !== ''): []
values.req_params = values.req_params ? values.req_params.filter(item => item.name !== ''): []
values.req_query = values.req_query ? values.req_query.filter(item => item.name !== ''): []
if(HTTP_METHOD[values.method].request_body !== true){
values.req_params = []
}
this.props.onSubmit(values)
}
});
@ -184,10 +192,9 @@ class InterfaceEditForm extends Component {
labelCol: { span: 4 },
wrapperCol: { span: 18 }
};
const queryTpl = (data, index) => {
return <Row key={index}>
return <Row key={index} className="interface-edit-item-content">
<Col span="4">
{getFieldDecorator('req_query[' + index + '].name', {
initialValue: data.name
@ -220,7 +227,7 @@ class InterfaceEditForm extends Component {
}
const headerTpl = (data, index) => {
return <Row key={index}>
return <Row key={index} className="interface-edit-item-content">
<Col span="4">
{getFieldDecorator('req_headers[' + index + '].name', {
initialValue: data.name
@ -250,7 +257,7 @@ class InterfaceEditForm extends Component {
}
const requestBodyTpl = (data, index) => {
return <Row key={index}>
return <Row key={index} className="interface-edit-item-content">
<Col span="8">
{getFieldDecorator('req_body_form[' + index + '].name', {
initialValue: data.name
@ -282,7 +289,7 @@ class InterfaceEditForm extends Component {
}
const paramsTpl = (data, index) => {
return <Row key={index}>
return <Row key={index} className="interface-edit-item-content">
<Col span="6">
{getFieldDecorator('req_params[' + index + '].name', {
initialValue: data.name
@ -342,7 +349,7 @@ class InterfaceEditForm extends Component {
label="选择分类"
>
{getFieldDecorator('catid', {
initialValue: _.find(this.props.cat, item=> item._id === this.state.catid).name,
initialValue: _.find(this.props.cat, item => item._id === this.state.catid).name,
rules: [
{ required: true, message: '请选择一个分类' }
]
@ -362,10 +369,9 @@ class InterfaceEditForm extends Component {
>
<InputGroup compact>
<Select value={this.state.method} onChange={val => this.setState({ method: val })} style={{ width: "15%" }}>
<Option value="GET">GET</Option>
<Option value="POST">POST</Option>
<Option value="PUT">PUT</Option>
<Option value="DELETE">DELETE</Option>
{HTTP_METHOD_KEYS.map(item => {
return <Option key={item} value={item}>{item}</Option>
})}
</Select>
<Tooltip title="接口基本路径,可在项目配置里修改">
@ -445,42 +451,44 @@ class InterfaceEditForm extends Component {
</Col>
</Row>
{HTTP_METHOD[this.state.method].request_body ? <div >
<FormItem
className="interface-edit-item"
{...formItemLayout}
label="请求Body"
>
{getFieldDecorator('req_body_type', {
initialValue: this.state.req_body_type
})(
<RadioGroup>
<Radio value="form">form</Radio>
<Radio value="json">json</Radio>
<Radio value="file">file</Radio>
<Radio value="raw">raw</Radio>
</RadioGroup>
)}
<FormItem
className="interface-edit-item"
{...formItemLayout}
label="请求Body"
>
{getFieldDecorator('req_body_type', {
initialValue: this.state.req_body_type
})(
<RadioGroup>
<Radio value="form">form</Radio>
<Radio value="json">json</Radio>
<Radio value="file">file</Radio>
<Radio value="raw">raw</Radio>
</RadioGroup>
)}
</FormItem>
{this.props.form.getFieldValue('req_body_type') === 'form' ?
<Row className="interface-edit-item">
<Col span={18} offset={4} style={{ minHeight: "50px" }}>
<Row>
<Col span="24" className="interface-edit-item">
</FormItem>
{this.props.form.getFieldValue('req_body_type') === 'form' ?
<Row className="interface-edit-item">
<Col span={18} offset={4} style={{ minHeight: "50px" }}>
<Row>
<Col span="24" className="interface-edit-item">
<Button size="small" type="primary" onClick={() => this.addParams('req_body_form')}>添加form参数</Button>
<Button size="small" type="primary" onClick={() => this.addParams('req_body_form')}>添加form参数</Button>
</Col>
</Col>
</Row>
{requestBodyList}
</Col>
</Row>
{requestBodyList}
</Col>
</Row>
:
null
}
</Row>
:
null
}
</div>
: null}
<Row className="interface-edit-item" style={{ display: this.props.form.getFieldValue('req_body_type') === 'json' ? 'block' : 'none' }}>

View File

@ -208,7 +208,7 @@ class InterfaceMenu extends Component {
case 'POST': color = "blue"; break;
case 'PUT': color = "yellow"; break;
case 'DELETE': color = 'red'; break;
default: color = "green";
default: color = "yellow";
}
return <TreeNode
title={<div onMouseEnter={() => this.enterItem(item._id)} onMouseLeave={this.leaveItem} >

View File

@ -32,14 +32,19 @@
padding: 0;
}
.card-item {
display: flex;
align-items: center;
padding: .1rem .15rem;
position: relative;
.item-img {
width: .2rem;
height: .2rem;
margin-right: .08rem;
vertical-align: middle;
}
.item-name {
position: absolute;
left: .43rem;
top: 50%;
transform: translateY(-50%);
}
.item-role {
position: absolute;

View File

@ -48,11 +48,11 @@ em {
min-height: 100%;
height: auto !important;
height: 100%;
margin-bottom: -2rem;
margin-bottom: -2.4rem;
&::after {
content: '';
display: block;
height: 2rem;
height: 2.4rem;
}
}
@ -81,3 +81,7 @@ em {
.ant-confirm .ant-modal-body{
padding: .24rem !important;
}
.card-panel {
padding: .36rem .24rem 0;
}

View File

@ -1,3 +1,11 @@
$color-white : #fff;
$color-bg-gray: #ececec;
$color-blue : #108ee9;
$color-blue-deeper: #34495E;
$color-grey-deep : #929aac;
$color-black-light : #404040;
$color-bg-dark: #273848; // 背景色 - 深蓝
@mixin row-width-limit {
max-width: 12.2rem;
min-width: 10.2rem;

View File

@ -1,4 +1,320 @@
@import '~antd/dist/antd.less';
@ant-prefix : ant;
@primary-color : blue;
// -------- Colors -----------
@primary-color : #2395f1;
@info-color : #2395f1;
@success-color : #57cf27;
@error-color : #ff561b;
@highlight-color : #ff561b;
@warning-color : #fac200;
@normal-color : #d9d9d9;
// Color used by default to control hover and active backgrounds and for
// alert info backgrounds.
@primary-1: color(~`colorPalette("@{primary-color}", 1)`); // replace tint(@primary-color, 90%)
@primary-2: color(~`colorPalette("@{primary-color}", 2)`); // replace tint(@primary-color, 80%)
// unused
@primary-3: color(~`colorPalette("@{primary-color}", 3)`);
@primary-4: color(~`colorPalette("@{primary-color}", 4)`);
// Color used to control the text color in many active and hover states.
@primary-5: color(~`colorPalette("@{primary-color}", 5)`); // replace tint(@primary-color, 20%)
@primary-6: @primary-color; // don't use, use @primary-color
// Color used to control the text color of active buttons.
@primary-7: color(~`colorPalette("@{primary-color}", 7)`); // replace shade(@primary-color, 5%)
// unused
@primary-8: color(~`colorPalette("@{primary-color}", 8)`);
// unused
@primary-9: color(~`colorPalette("@{primary-color}", 9)`);
// unused
@primary-10: color(~`colorPalette("@{primary-color}", 10)`);
// Base Scaffolding Variables
// ---
// Background color for `<body>`
@body-background : #ececec;
// Base background color for most components
@component-background : #fff;
@font-family-no-number : -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
@font-family : "Helvetica Neue For Number", @font-family-no-number;
@code-family : Consolas, Menlo, Courier, monospace;
@heading-color : fade(#273848, 85%);
@text-color : fade(#0d1b3e, 65%);
@text-color-secondary : fade(#0d1b3e, 43%);
@heading-color-dark : fade(#fff, 97%);
@text-color-dark : fade(#fff, 91%);
@text-color-secondary-dark: fade(#fff, 67%);
@font-size-base : 12px;
@font-size-lg : @font-size-base + 3px;
@line-height-base : 1.5;
@border-radius-base : 4px;
@border-radius-sm : 2px;
// The background colors for active and hover states for things like
// list items or table cells.
@item-active-bg : @primary-1;
@item-hover-bg : @primary-1;
// ICONFONT
@iconfont-css-prefix : anticon;
@icon-url : "https://at.alicdn.com/t/font_zck90zmlh7hf47vi";
// LINK
@link-color : @primary-color;
@link-hover-color : @primary-5;
@link-active-color : @primary-7;
@link-hover-decoration : none;
// Animation
@ease-out : cubic-bezier(0.215, 0.61, 0.355, 1);
@ease-in : cubic-bezier(0.55, 0.055, 0.675, 0.19);
@ease-in-out : cubic-bezier(0.645, 0.045, 0.355, 1);
@ease-out-back : cubic-bezier(0.12, 0.4, 0.29, 1.46);
@ease-in-back : cubic-bezier(0.71, -0.46, 0.88, 0.6);
@ease-in-out-back : cubic-bezier(0.71, -0.46, 0.29, 1.46);
@ease-out-circ : cubic-bezier(0.08, 0.82, 0.17, 1);
@ease-in-circ : cubic-bezier(0.6, 0.04, 0.98, 0.34);
@ease-in-out-circ : cubic-bezier(0.78, 0.14, 0.15, 0.86);
@ease-out-quint : cubic-bezier(0.23, 1, 0.32, 1);
@ease-in-quint : cubic-bezier(0.755, 0.05, 0.855, 0.06);
@ease-in-out-quint : cubic-bezier(0.86, 0, 0.07, 1);
// Border color
@border-color-base : #d9d9d9; // base border outline a component
@border-color-split : #e9e9e9; // split border inside a component
@border-width-base : 1px; // width of the border for a component
@border-style-base : solid; // style of a components border
// Outline
@outline-blur-size : 0;
@outline-width : 2px;
@outline-color : @primary-color;
// Default background color for disabled states, Collapse wrappers,
// and several active and hover states.
@background-color-base : #f7f7f7;
@background-color-active: #eee;
// Disabled states
@disabled-color : fade(#0d1b3e, 25%);
@disabled-bg : @background-color-base;
@disabled-color-dark : fade(#fff, 35%);
// Shadow
@shadow-color : rgba(0, 0, 0, .2);
@box-shadow-base : @shadow-1-down;
@shadow-1-up : 0 -1px 6px @shadow-color;
@shadow-1-down : 0 1px 6px @shadow-color;
@shadow-1-left : -1px 0 6px @shadow-color;
@shadow-1-right : 1px 0 6px @shadow-color;
@shadow-2 : 0 2px 8px @shadow-color;
// Buttons
@btn-font-weight : 400;
@btn-border-radius-base : @border-radius-base;
@btn-border-radius-sm : @border-radius-base;
@btn-primary-color : #fff;
@btn-primary-bg : @primary-color;
@btn-default-color : @text-color;
@btn-default-bg : #fff;
@btn-default-border : @border-color-base;
@btn-danger-color : @error-color;
@btn-danger-bg : @background-color-base;
@btn-danger-border : @border-color-base;
@btn-disable-color : @disabled-color;
@btn-disable-bg : @disabled-bg;
@btn-disable-border : @border-color-base;
@btn-padding-base : 2px 15px;
@btn-font-size-lg : @font-size-lg;
@btn-padding-lg : @btn-padding-base;
@btn-padding-sm : 0 7px;
@btn-height-base : 28px + 4px;
@btn-height-lg : 32px + 4px;
@btn-height-sm : 22px + 4px;
@btn-circle-size : @btn-height-base;
@btn-circle-size-lg : @btn-height-lg;
@btn-circle-size-sm : @btn-height-sm;
@btn-group-border : @primary-7;
// Radio buttons
@radio-button-bg : @btn-default-bg;
@radio-button-color : @btn-default-color;
// Layout
// @layout-body-background : #ececec;
@layout-header-background : #202d3a;
@layout-header-height : 56px;
// @layout-header-padding : 0 50px;
// @layout-footer-padding : 24px 50px;
// @layout-sider-background : @layout-header-background;
// @layout-trigger-height : 48px;
// @layout-trigger-background : tint(@heading-color, 20%);
// @layout-trigger-color : #fff;
// @layout-zero-trigger-width : 36px;
// @layout-zero-trigger-height : 42px;
// Animation
@animation-duration-slow: .3s -.1s; // Modal
@animation-duration-base: .2s;
@animation-duration-fast: .1s; // Tooltip
// Form
// ---
@label-required-color : @highlight-color;
@label-color : @heading-color;
@form-item-margin-bottom : 24px;
@form-item-trailing-colon : true;
// Input
// ---
@input-height-base : 28px + 4px;
@input-height-lg : 32px + 4px;
@input-height-sm : 22px + 4px;
@input-padding-horizontal : 7px + 2px;
@input-padding-vertical-base : 4px + 2px;
@input-padding-vertical-sm : 1px + 2px;
@input-padding-vertical-lg : 6px + 2px;
@input-placeholder-color : @disabled-color;
@input-color : @text-color;
@input-border-color : @border-color-base;
@input-bg : #fff;
@input-addon-bg : #eee;
@input-hover-border-color : @primary-color;
@input-disabled-bg : @disabled-bg;
// Tooltip
// ---
//* Tooltip max width
@tooltip-max-width: 250px;
//** Tooltip text color
@tooltip-color: #fff;
//** Tooltip background color
@tooltip-bg: rgba(64, 64, 64, .85);
//** Tooltip arrow width
@tooltip-arrow-width: 5px;
//** Tooltip distance with trigger
@tooltip-distance: @tooltip-arrow-width - 1px + 4px;
//** Tooltip arrow color
@tooltip-arrow-color: @tooltip-bg;
// Popover
// ---
//** Popover body background color
@popover-bg: #fff;
//** Popover text color
@popover-color: @text-color;
//** Popover maximum width
@popover-min-width: 177px;
//** Popover arrow width
@popover-arrow-width: 4px;
//** Popover arrow color
@popover-arrow-color: @popover-bg;
//** Popover outer arrow width
@popover-arrow-outer-width: (@popover-arrow-width + 1px);
//** Popover outer arrow color
@popover-arrow-outer-color: fadeout(@border-color-base, 30%);
//** Popover distance with trigger
@popover-distance: @popover-arrow-width + 4px;
// Modal
// --
@modal-mask-bg: rgba(55, 55, 55, 0.6);
// Progress
// --
@process-default-color: @primary-color;
@progress-remaining-color: @background-color-base;
// Menu
// ---
@menu-dark-bg: @layout-header-background;
@menu-dark-submenu-bg: #333;
@menu-collapsed-width: 64px;
// Spin
// ---
@spin-dot-size-sm: 14px + 2px;
@spin-dot-size: 20px + 3px;
@spin-dot-size-lg: 32px + 4px;
// Table
// --
@table-header-bg: @background-color-base;
@table-header-sort-bg: @background-color-active;
@table-row-hover-bg: @primary-1;
@table-selected-row-bg: #fafafa;
@table-padding-vertical: 16px + 2px;
@table-padding-horizontal: 8px + 2px;
// Tag
// --
@tag-default-bg: #f3f3f3;
@tag-default-color: @text-color;
@tag-font-size: @font-size-base;
// TimePicker
// ---
@time-picker-panel-column-width: 56px;
@time-picker-panel-width: @time-picker-panel-column-width * 3;
@time-picker-selected-bg: @background-color-base;
// Carousel
// ---
@carousel-dot-width: 16px + 4px;
@carousel-dot-height: 3px + 2px;
@carousel-dot-active-width: 24px + 4px;
// Badge
// ---
@badge-height: 20px + 4px;
@badge-dot-size: 8px + 4px;
@badge-font-size: @font-size-base + 2px;
// Rate
// ---
@rate-star-color: #f5a623;
@rate-star-bg: #e9e9e9;
// Card
// ---
@card-head-height: 48px;
@card-head-color: @heading-color;
@card-head-background: @component-background;
.ant-card-wider-padding .ant-card-body {
padding: 0;
}
// Tabs
// ---
// @tabs-card-head-background: #f9f9f9;
// @tabs-title-font-size: @font-size-lg;
.ant-tabs-bar {
margin-bottom: 0;
}
// BackTop
@back-top-color: #fff;
@back-top-bg: rgba(64, 64, 64, 0.4);
@back-top-hover-bg: rgba(64, 64, 64, 0.6);
// Avatar
@avatar-size-base: 32px;
@avatar-size-lg: 40px;
@avatar-size-sm: 24px;
@avatar-font-size-base: 18px;
@avatar-font-size-lg: 24px;
@avatar-font-size-sm: 14px;
@avatar-bg: #ccc;
@avatar-color: #fff;
@avatar-border-radius: @border-radius-base;

View File

@ -1,13 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>my yApi</title>
<link rel="stylesheet" href="prd/index@dev.css">
</head>
<body>
<div id="yapi" style="height: 100%;"></div>
<script src="prd/index@dev.js"></script>
</body>
</html>

View File

@ -6,6 +6,7 @@
"scripts": {
"build-server": "babel server -d server_dist",
"dev-server": "nodemon server_dist/app.js dev -L",
"server": "node server_dist/app.js",
"install-server": "node server_dist/install.js",
"dev": "gulp --silent",
"build": "gulp build --silent",

View File

@ -65,7 +65,7 @@ app.use(_router2.default.allowedMethods());
(0, _websocket2.default)(app);
app.use(function () {
var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(ctx, next) {
var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(ctx, next) {
return _regenerator2.default.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {

View File

@ -59,7 +59,7 @@ var baseController = function () {
(0, _createClass3.default)(baseController, [{
key: 'init',
value: function () {
var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(ctx) {
var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(ctx) {
var ignoreRouter;
return _regenerator2.default.wrap(function _callee$(_context) {
while (1) {
@ -103,7 +103,7 @@ var baseController = function () {
}, {
key: 'checkLogin',
value: function () {
var _ref2 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee2(ctx) {
var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(ctx) {
var token, uid, userInst, result, decoded;
return _regenerator2.default.wrap(function _callee2$(_context2) {
while (1) {
@ -170,7 +170,7 @@ var baseController = function () {
}, {
key: 'getLoginStatus',
value: function () {
var _ref3 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee3(ctx) {
var _ref3 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(ctx) {
var result;
return _regenerator2.default.wrap(function _callee3$(_context3) {
while (1) {
@ -222,7 +222,7 @@ var baseController = function () {
}, {
key: 'getProjectRole',
value: function () {
var _ref4 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee4(id, type) {
var _ref4 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4(id, type) {
var _this = this;
var result, interfaceInst, interfaceData, projectInst, projectData, memberData, groupInst, groupData, groupMemberData;
@ -379,7 +379,7 @@ var baseController = function () {
}, {
key: 'checkAuth',
value: function () {
var _ref5 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee5(id, type, action) {
var _ref5 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5(id, type, action) {
var role;
return _regenerator2.default.wrap(function _callee5$(_context5) {
while (1) {

View File

@ -84,7 +84,7 @@ var followController = function (_baseController) {
(0, _createClass3.default)(followController, [{
key: 'list',
value: function () {
var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(ctx) {
var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(ctx) {
var uid, page, limit, result, count;
return _regenerator2.default.wrap(function _callee$(_context) {
while (1) {
@ -155,7 +155,7 @@ var followController = function (_baseController) {
}, {
key: 'del',
value: function () {
var _ref2 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee2(ctx) {
var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(ctx) {
var params, result;
return _regenerator2.default.wrap(function _callee2$(_context2) {
while (1) {
@ -220,7 +220,7 @@ var followController = function (_baseController) {
}, {
key: 'add',
value: function () {
var _ref3 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee3(ctx) {
var _ref3 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(ctx) {
var params, checkRepeat, data, result;
return _regenerator2.default.wrap(function _callee3$(_context3) {
while (1) {

View File

@ -88,7 +88,7 @@ var groupController = function (_baseController) {
(0, _createClass3.default)(groupController, [{
key: 'get',
value: function () {
var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(ctx) {
var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(ctx) {
var params, groupInst, result;
return _regenerator2.default.wrap(function _callee$(_context) {
while (1) {
@ -160,7 +160,7 @@ var groupController = function (_baseController) {
}, {
key: 'add',
value: function () {
var _ref2 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee2(ctx) {
var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(ctx) {
var params, groupUserdata, groupInst, checkRepeat, data, result;
return _regenerator2.default.wrap(function _callee2$(_context2) {
while (1) {
@ -272,7 +272,7 @@ var groupController = function (_baseController) {
}, {
key: 'getUserdata',
value: function () {
var _ref3 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee3(uid, role) {
var _ref3 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(uid, role) {
var userInst, userData;
return _regenerator2.default.wrap(function _callee3$(_context3) {
while (1) {
@ -333,7 +333,7 @@ var groupController = function (_baseController) {
}, {
key: 'addMember',
value: function () {
var _ref4 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee4(ctx) {
var _ref4 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4(ctx) {
var params, groupInst, check, groupUserdata, result;
return _regenerator2.default.wrap(function _callee4$(_context4) {
while (1) {
@ -446,7 +446,7 @@ var groupController = function (_baseController) {
}, {
key: 'changeMemberRole',
value: function () {
var _ref5 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee5(ctx) {
var _ref5 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5(ctx) {
var params, groupInst, check, result;
return _regenerator2.default.wrap(function _callee5$(_context5) {
while (1) {
@ -547,7 +547,7 @@ var groupController = function (_baseController) {
}, {
key: 'getMemberList',
value: function () {
var _ref6 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee6(ctx) {
var _ref6 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6(ctx) {
var params, groupInst, group;
return _regenerator2.default.wrap(function _callee6$(_context6) {
while (1) {
@ -611,7 +611,7 @@ var groupController = function (_baseController) {
}, {
key: 'delMember',
value: function () {
var _ref7 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee7(ctx) {
var _ref7 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(ctx) {
var params, groupInst, check, result;
return _regenerator2.default.wrap(function _callee7$(_context7) {
while (1) {
@ -709,7 +709,7 @@ var groupController = function (_baseController) {
}, {
key: 'list',
value: function () {
var _ref8 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee8(ctx) {
var _ref8 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8(ctx) {
var groupInst, result;
return _regenerator2.default.wrap(function _callee8$(_context8) {
while (1) {
@ -762,7 +762,7 @@ var groupController = function (_baseController) {
}, {
key: 'del',
value: function () {
var _ref9 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee10(ctx) {
var _ref9 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10(ctx) {
var _this2 = this;
var groupInst, projectInst, interfaceInst, interfaceColInst, interfaceCaseInst, _id, projectList, result;
@ -802,7 +802,7 @@ var groupController = function (_baseController) {
projectList = _context10.sent;
projectList.forEach(function () {
var _ref10 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee9(p) {
var _ref10 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9(p) {
return _regenerator2.default.wrap(function _callee9$(_context9) {
while (1) {
switch (_context9.prev = _context9.next) {
@ -881,7 +881,7 @@ var groupController = function (_baseController) {
}, {
key: 'up',
value: function () {
var _ref11 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee11(ctx) {
var _ref11 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee11(ctx) {
var groupInst, _id2, data, result;
return _regenerator2.default.wrap(function _callee11$(_context11) {

View File

@ -100,7 +100,7 @@ var interfaceController = function (_baseController) {
(0, _createClass3.default)(interfaceController, [{
key: 'add',
value: function () {
var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(ctx) {
var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(ctx) {
var params, checkRepeat, data, result;
return _regenerator2.default.wrap(function _callee$(_context) {
while (1) {
@ -239,7 +239,7 @@ var interfaceController = function (_baseController) {
}, {
key: 'get',
value: function () {
var _ref2 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee2(ctx) {
var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(ctx) {
var params, result;
return _regenerator2.default.wrap(function _callee2$(_context2) {
while (1) {
@ -301,7 +301,7 @@ var interfaceController = function (_baseController) {
}, {
key: 'list',
value: function () {
var _ref3 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee3(ctx) {
var _ref3 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(ctx) {
var project_id, result;
return _regenerator2.default.wrap(function _callee3$(_context3) {
while (1) {
@ -351,7 +351,7 @@ var interfaceController = function (_baseController) {
}, {
key: 'listByCat',
value: function () {
var _ref4 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee4(ctx) {
var _ref4 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4(ctx) {
var catid, result;
return _regenerator2.default.wrap(function _callee4$(_context4) {
while (1) {
@ -401,7 +401,7 @@ var interfaceController = function (_baseController) {
}, {
key: 'listByMenu',
value: function () {
var _ref5 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee5(ctx) {
var _ref5 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5(ctx) {
var project_id, result, newResult, i, item, list, j;
return _regenerator2.default.wrap(function _callee5$(_context5) {
while (1) {
@ -506,7 +506,7 @@ var interfaceController = function (_baseController) {
}, {
key: 'up',
value: function () {
var _ref6 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee6(ctx) {
var _ref6 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6(ctx) {
var params, id, interfaceData, checkRepeat, data, result;
return _regenerator2.default.wrap(function _callee6$(_context6) {
while (1) {
@ -672,7 +672,7 @@ var interfaceController = function (_baseController) {
}, {
key: 'del',
value: function () {
var _ref7 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee7(ctx) {
var _ref7 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(ctx) {
var id, data, result;
return _regenerator2.default.wrap(function _callee7$(_context7) {
while (1) {
@ -747,7 +747,7 @@ var interfaceController = function (_baseController) {
}, {
key: 'solveConflict',
value: function () {
var _ref8 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee8(ctx) {
var _ref8 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8(ctx) {
var _this2 = this;
var id, result, userInst, userinfo, data;
@ -830,7 +830,7 @@ var interfaceController = function (_baseController) {
}, {
key: 'addCat',
value: function () {
var _ref9 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee9(ctx) {
var _ref9 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9(ctx) {
var params, result;
return _regenerator2.default.wrap(function _callee9$(_context9) {
while (1) {
@ -902,7 +902,7 @@ var interfaceController = function (_baseController) {
}, {
key: 'upCat',
value: function () {
var _ref10 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee10(ctx) {
var _ref10 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10(ctx) {
var params, result;
return _regenerator2.default.wrap(function _callee10$(_context10) {
while (1) {
@ -947,7 +947,7 @@ var interfaceController = function (_baseController) {
}, {
key: 'delCat',
value: function () {
var _ref11 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee11(ctx) {
var _ref11 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee11(ctx) {
var id, catData, auth, result, r;
return _regenerator2.default.wrap(function _callee11$(_context11) {
while (1) {

View File

@ -74,7 +74,7 @@ var interfaceColController = function (_baseController) {
(0, _createClass3.default)(interfaceColController, [{
key: 'list',
value: function () {
var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(ctx) {
var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(ctx) {
var id, result, i;
return _regenerator2.default.wrap(function _callee$(_context) {
while (1) {
@ -149,7 +149,7 @@ var interfaceColController = function (_baseController) {
}, {
key: 'addCol',
value: function () {
var _ref2 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee2(ctx) {
var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(ctx) {
var params, result;
return _regenerator2.default.wrap(function _callee2$(_context2) {
while (1) {
@ -233,7 +233,7 @@ var interfaceColController = function (_baseController) {
}, {
key: 'getCaseList',
value: function () {
var _ref3 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee3(ctx) {
var _ref3 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(ctx) {
var id, inst, result;
return _regenerator2.default.wrap(function _callee3$(_context3) {
while (1) {
@ -298,7 +298,7 @@ var interfaceColController = function (_baseController) {
}, {
key: 'addCase',
value: function () {
var _ref4 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee4(ctx) {
var _ref4 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4(ctx) {
var params, result;
return _regenerator2.default.wrap(function _callee4$(_context4) {
while (1) {
@ -392,7 +392,7 @@ var interfaceColController = function (_baseController) {
}, {
key: 'getCase',
value: function () {
var _ref5 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee5(ctx) {
var _ref5 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5(ctx) {
var id, result;
return _regenerator2.default.wrap(function _callee5$(_context5) {
while (1) {
@ -446,7 +446,7 @@ var interfaceColController = function (_baseController) {
}, {
key: 'upCol',
value: function () {
var _ref6 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee6(ctx) {
var _ref6 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6(ctx) {
var params, result;
return _regenerator2.default.wrap(function _callee6$(_context6) {
while (1) {
@ -503,7 +503,7 @@ var interfaceColController = function (_baseController) {
}, {
key: 'upCaseIndex',
value: function () {
var _ref7 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee7(ctx) {
var _ref7 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(ctx) {
var _this2 = this;
var params;
@ -562,7 +562,7 @@ var interfaceColController = function (_baseController) {
}, {
key: 'delCol',
value: function () {
var _ref8 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee8(ctx) {
var _ref8 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8(ctx) {
var id, colData, auth, result;
return _regenerator2.default.wrap(function _callee8$(_context8) {
while (1) {
@ -639,7 +639,7 @@ var interfaceColController = function (_baseController) {
}, {
key: 'delCase',
value: function () {
var _ref9 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee9(ctx) {
var _ref9 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9(ctx) {
var _caseid, caseData, auth, result;
return _regenerator2.default.wrap(function _callee9$(_context9) {

View File

@ -75,7 +75,7 @@ var logController = function (_baseController) {
(0, _createClass3.default)(logController, [{
key: 'list',
value: function () {
var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(ctx) {
var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(ctx) {
var typeid, page, limit, type, result, count;
return _regenerator2.default.wrap(function _callee$(_context) {
while (1) {

View File

@ -144,7 +144,7 @@ var projectController = function (_baseController) {
}, {
key: 'add',
value: function () {
var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(ctx) {
var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(ctx) {
var params, checkRepeat, data, result, username;
return _regenerator2.default.wrap(function _callee$(_context) {
while (1) {
@ -288,7 +288,7 @@ var projectController = function (_baseController) {
}, {
key: 'addMember',
value: function () {
var _ref2 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee2(ctx) {
var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(ctx) {
var params, check, userdata, result, username, project;
return _regenerator2.default.wrap(function _callee2$(_context2) {
while (1) {
@ -418,7 +418,7 @@ var projectController = function (_baseController) {
}, {
key: 'delMember',
value: function () {
var _ref3 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee3(ctx) {
var _ref3 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(ctx) {
var params, check, result, username, project, member;
return _regenerator2.default.wrap(function _callee3$(_context3) {
while (1) {
@ -524,7 +524,7 @@ var projectController = function (_baseController) {
}, {
key: 'getUserdata',
value: function () {
var _ref4 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee4(uid, role) {
var _ref4 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4(uid, role) {
var userInst, userData;
return _regenerator2.default.wrap(function _callee4$(_context4) {
while (1) {
@ -582,7 +582,7 @@ var projectController = function (_baseController) {
}, {
key: 'getMemberList',
value: function () {
var _ref5 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee5(ctx) {
var _ref5 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5(ctx) {
var params, project;
return _regenerator2.default.wrap(function _callee5$(_context5) {
while (1) {
@ -644,7 +644,7 @@ var projectController = function (_baseController) {
}, {
key: 'get',
value: function () {
var _ref6 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee6(ctx) {
var _ref6 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6(ctx) {
var params, result, catInst, cat;
return _regenerator2.default.wrap(function _callee6$(_context6) {
while (1) {
@ -729,7 +729,7 @@ var projectController = function (_baseController) {
}, {
key: 'list',
value: function () {
var _ref7 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee7(ctx) {
var _ref7 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(ctx) {
var group_id, auth, result, uids, _users, users;
return _regenerator2.default.wrap(function _callee7$(_context7) {
@ -815,7 +815,7 @@ var projectController = function (_baseController) {
}, {
key: 'del',
value: function () {
var _ref8 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee8(ctx) {
var _ref8 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8(ctx) {
var id, interfaceInst, interfaceColInst, interfaceCaseInst, result;
return _regenerator2.default.wrap(function _callee8$(_context8) {
while (1) {
@ -908,7 +908,7 @@ var projectController = function (_baseController) {
}, {
key: 'changeMemberRole',
value: function () {
var _ref9 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee9(ctx) {
var _ref9 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9(ctx) {
var params, projectInst, check, result, username, project, member;
return _regenerator2.default.wrap(function _callee9$(_context9) {
while (1) {
@ -1038,7 +1038,7 @@ var projectController = function (_baseController) {
}, {
key: 'upSet',
value: function () {
var _ref10 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee10(ctx) {
var _ref10 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10(ctx) {
var id, data, result;
return _regenerator2.default.wrap(function _callee10$(_context10) {
while (1) {
@ -1099,7 +1099,7 @@ var projectController = function (_baseController) {
}, {
key: 'up',
value: function () {
var _ref11 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee11(ctx) {
var _ref11 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee11(ctx) {
var id, params, projectData, checkRepeat, data, result, username;
return _regenerator2.default.wrap(function _callee11$(_context11) {
while (1) {
@ -1264,7 +1264,7 @@ var projectController = function (_baseController) {
}, {
key: 'search',
value: function () {
var _ref12 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee12(ctx) {
var _ref12 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee12(ctx) {
var q, projectList, groupList, projectRules, groupRules, queryList;
return _regenerator2.default.wrap(function _callee12$(_context12) {
while (1) {
@ -1339,7 +1339,7 @@ var projectController = function (_baseController) {
}, {
key: 'download',
value: function () {
var _ref13 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee13(ctx) {
var _ref13 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee13(ctx) {
var project_id, interfaceInst, count, arr, fileName, res;
return _regenerator2.default.wrap(function _callee13$(_context13) {
while (1) {

View File

@ -99,7 +99,7 @@ var userController = function (_baseController) {
(0, _createClass3.default)(userController, [{
key: 'login',
value: function () {
var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(ctx) {
var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(ctx) {
var userInst, email, password, result;
return _regenerator2.default.wrap(function _callee$(_context) {
while (1) {
@ -190,7 +190,7 @@ var userController = function (_baseController) {
}, {
key: 'logout',
value: function () {
var _ref2 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee2(ctx) {
var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(ctx) {
return _regenerator2.default.wrap(function _callee2$(_context2) {
while (1) {
switch (_context2.prev = _context2.next) {
@ -248,7 +248,7 @@ var userController = function (_baseController) {
}, {
key: 'loginByToken',
value: function () {
var _ref3 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee3(ctx) {
var _ref3 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(ctx) {
var config, token, ret, login;
return _regenerator2.default.wrap(function _callee3$(_context3) {
while (1) {
@ -300,7 +300,7 @@ var userController = function (_baseController) {
}, {
key: 'handleThirdLogin',
value: function () {
var _ref4 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee4(email, username) {
var _ref4 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4(email, username) {
var user, data, passsalt, userInst;
return _regenerator2.default.wrap(function _callee4$(_context4) {
while (1) {
@ -384,7 +384,7 @@ var userController = function (_baseController) {
}, {
key: 'changePassword',
value: function () {
var _ref5 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee5(ctx) {
var _ref5 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5(ctx) {
var params, userInst, user, passsalt, data, result;
return _regenerator2.default.wrap(function _callee5$(_context5) {
while (1) {
@ -512,7 +512,7 @@ var userController = function (_baseController) {
}, {
key: 'reg',
value: function () {
var _ref6 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee6(ctx) {
var _ref6 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6(ctx) {
var userInst, params, checkRepeat, passsalt, data, user;
return _regenerator2.default.wrap(function _callee6$(_context6) {
while (1) {
@ -636,7 +636,7 @@ var userController = function (_baseController) {
}, {
key: 'list',
value: function () {
var _ref7 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee7(ctx) {
var _ref7 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(ctx) {
var page, limit, userInst, user, count;
return _regenerator2.default.wrap(function _callee7$(_context7) {
while (1) {
@ -694,7 +694,7 @@ var userController = function (_baseController) {
}, {
key: 'findById',
value: function () {
var _ref8 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee8(ctx) {
var _ref8 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8(ctx) {
var userInst, id, result;
return _regenerator2.default.wrap(function _callee8$(_context8) {
while (1) {
@ -770,7 +770,7 @@ var userController = function (_baseController) {
}, {
key: 'del',
value: function () {
var _ref9 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee9(ctx) {
var _ref9 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9(ctx) {
var userInst, id, result;
return _regenerator2.default.wrap(function _callee9$(_context9) {
while (1) {
@ -846,7 +846,7 @@ var userController = function (_baseController) {
}, {
key: 'update',
value: function () {
var _ref10 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee10(ctx) {
var _ref10 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10(ctx) {
var params, userInst, id, data, checkRepeat, result;
return _regenerator2.default.wrap(function _callee10$(_context10) {
while (1) {
@ -952,7 +952,7 @@ var userController = function (_baseController) {
}, {
key: 'uploadAvatar',
value: function () {
var _ref11 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee11(ctx) {
var _ref11 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee11(ctx) {
var basecode, pngPrefix, jpegPrefix, type, strLength, avatarInst, result;
return _regenerator2.default.wrap(function _callee11$(_context11) {
while (1) {
@ -1054,7 +1054,7 @@ var userController = function (_baseController) {
}, {
key: 'avatar',
value: function () {
var _ref12 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee12(ctx) {
var _ref12 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee12(ctx) {
var uid, avatarInst, data, dataBuffer, type;
return _regenerator2.default.wrap(function _callee12$(_context12) {
while (1) {
@ -1118,7 +1118,7 @@ var userController = function (_baseController) {
}, {
key: 'search',
value: function () {
var _ref13 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee13(ctx) {
var _ref13 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee13(ctx) {
var q, queryList, rules, filteredRes;
return _regenerator2.default.wrap(function _callee13$(_context13) {
while (1) {
@ -1190,7 +1190,7 @@ var userController = function (_baseController) {
}, {
key: 'project',
value: function () {
var _ref14 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee14(ctx) {
var _ref14 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee14(ctx) {
var _ctx$request$query, id, type, result, interfaceInst, interfaceData, projectInst, projectData, ownerAuth, devAuth, groupInst, groupData, _ownerAuth, _devAuth;
return _regenerator2.default.wrap(function _callee14$(_context14) {

View File

@ -47,7 +47,7 @@ function matchApi(apiPath, apiRule) {
}
module.exports = function () {
var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(ctx, next) {
var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(ctx, next) {
var hostname, config, path, paths, projectId, projectInst, project, interfaceData, newData, newpath, interfaceInst, _newData, findInterface, res;
return _regenerator2.default.wrap(function _callee$(_context) {

View File

@ -351,7 +351,7 @@ function createAction(controller, action, path, method) {
var _this = this;
router[method]("/api" + INTERFACE_CONFIG[controller].prefix + path, function () {
var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(ctx) {
var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(ctx) {
var inst;
return _regenerator2.default.wrap(function _callee$(_context) {
while (1) {

View File

@ -26,7 +26,7 @@ function websocket(app) {
return next(ctx);
});
router.get('/api/interface/solve_conflict', function () {
var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(ctx) {
var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(ctx) {
var inst;
return _regenerator2.default.wrap(function _callee$(_context) {
while (1) {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 305 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB