mirror of
https://github.com/YMFE/yapi.git
synced 2024-12-21 05:19:42 +08:00
Merge branch 'dev' of http://gitlab.corp.qunar.com/mfe/yapi into dev
This commit is contained in:
commit
a729750e79
@ -9,7 +9,7 @@ import { changeMenuItem } from '../../reducer/modules/menu'
|
||||
import { withRouter } from 'react-router';
|
||||
import Srch from './Search/Search'
|
||||
const { Header } = Layout;
|
||||
import { logoSVG } from '../../common.js';
|
||||
import { logoSVG, betaSVG } from '../../common.js';
|
||||
|
||||
const MenuUser = (props) => (
|
||||
<Menu className="user-menu" >
|
||||
@ -167,7 +167,7 @@ export default class HeaderCom extends Component {
|
||||
<div className="content g-row">
|
||||
<div className="logo">
|
||||
<Link to="/group" onClick={this.relieveLink} className="href">
|
||||
<span className="img">{logoSVG('32px')}</span><span className="logo-name">YAPI<span className="ui-badge"></span></span>
|
||||
<span className="img">{logoSVG('32px')}</span><span className="logo-name">YAPI<span className="ui-badge">{betaSVG}</span></span>
|
||||
</Link>
|
||||
</div>
|
||||
<div className="user-toolbar">
|
||||
|
@ -32,12 +32,13 @@
|
||||
}
|
||||
.ui-badge {
|
||||
position: absolute;
|
||||
right: -20px;
|
||||
top: 10px;
|
||||
right: -18px;
|
||||
top: 6px;
|
||||
width: 30px;
|
||||
height: 21px;
|
||||
background-size: 240px 21px;
|
||||
background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48c3ZnIHZlcnNpb249IjEuMSIgaWQ9IuWbvuWxgl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDgwMCA3MCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgODAwIDcwOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+PHN0eWxlIHR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x0c3BhbiB4PSIxMjAiIHk9IjEwIj5CZXRhPC90c3Bhbj48L3RleHQ+PHRleHQgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMiAxKSI+PHRzcGFuIHg9IjE1MCIgeT0iMTAiPkJldGE8L3RzcGFuPjwvdGV4dD48dGV4dCB0cmFuc2Zvcm09InRyYW5zbGF0ZSgyIDEpIj48dHNwYW4geD0iMTgwIiB5PSIxMCI+QmV0YTwvdHNwYW4+PC90ZXh0Pjx0ZXh0IHRyYW5zZm9ybT0idHJhbnNsYXRlKDIgMSkiPjx0c3BhbiB4PSIyMTAiIHk9IjEwIj5CZXRhPC90c3Bhbj48L3RleHQ+PC9nPjwvZz48L3N2Zz4=);
|
||||
animation: flag .8s steps(8) infinite;
|
||||
}
|
||||
@keyframes flag {
|
||||
|
@ -8,7 +8,7 @@ import URL from 'url';
|
||||
|
||||
import './Postman.scss'
|
||||
|
||||
// const { TextArea } = Input;
|
||||
const { TextArea } = Input;
|
||||
const InputGroup = Input.Group;
|
||||
const Option = Select.Option;
|
||||
const Panel = Collapse.Panel;
|
||||
@ -25,8 +25,8 @@ export default class Run extends Component {
|
||||
}
|
||||
|
||||
state = {
|
||||
res: '',
|
||||
resHeader: '',
|
||||
res: {},
|
||||
resHeader: {},
|
||||
method: 'GET',
|
||||
domains: [],
|
||||
pathname: '',
|
||||
@ -55,7 +55,7 @@ export default class Run extends Component {
|
||||
|
||||
componentDidMount() {
|
||||
const { bodyType } = this.state;
|
||||
if(bodyType !== 'file' && bodyType !== 'form') {
|
||||
if(bodyType && bodyType !== 'file' && bodyType !== 'form') {
|
||||
this.loadBodyEditor()
|
||||
}
|
||||
}
|
||||
@ -109,7 +109,7 @@ export default class Run extends Component {
|
||||
bodyType: req_body_type || 'form',
|
||||
loading: false
|
||||
}, () => {
|
||||
if(req_body_type !== 'file' && req_body_type !== 'form') {
|
||||
if(req_body_type && req_body_type !== 'file' && req_body_type !== 'form') {
|
||||
this.loadBodyEditor()
|
||||
}
|
||||
});
|
||||
@ -404,8 +404,9 @@ export default class Run extends Component {
|
||||
|
||||
render () {
|
||||
|
||||
const { method, domains, pathParam, pathname, query, headers, bodyForm, currDomain, bodyType } = this.state;
|
||||
const { method, domains, pathParam, pathname, query, headers, bodyForm, currDomain, bodyType, resHeader } = this.state;
|
||||
const hasPlugin = this.hasCrossRequestPlugin();
|
||||
const isResJson = resHeader && resHeader['content-type'] && resHeader['content-type'].indexOf('application/json') !== -1
|
||||
let path = pathname;
|
||||
pathParam.forEach(item => {
|
||||
path = path.replace(`:${item.name}`, item.value || `:${item.name}`);
|
||||
@ -420,11 +421,23 @@ export default class Run extends Component {
|
||||
<Alert
|
||||
message={
|
||||
<div>
|
||||
温馨提示:当前正在使用接口测试服务,请安装我们为您免费提供的
|
||||
<a
|
||||
target="blank"
|
||||
href="https://chrome.google.com/webstore/detail/cross-request/cmnlfmgbjmaciiopcgodlhpiklaghbok?hl=en-US"
|
||||
>测试增强插件 [点击获取]!</a>
|
||||
温馨提示:当前正在使用接口测试服务,请安装我们为您免费提供的测试增强插件
|
||||
<div>
|
||||
<a
|
||||
target="blank"
|
||||
href="https://chrome.google.com/webstore/detail/cross-request/cmnlfmgbjmaciiopcgodlhpiklaghbok?hl=en-US"
|
||||
> [Google 商店获取(需翻墙)]</a>
|
||||
</div>
|
||||
<div>
|
||||
<a
|
||||
target="blank"
|
||||
href="/attachment/cross-request.crx"
|
||||
> [手动下载安装] </a>
|
||||
<a
|
||||
target="blank"
|
||||
href="http://www.jianshu.com/p/12ca04c61fc6"
|
||||
> [安装教程] </a>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
type="warning"
|
||||
@ -477,7 +490,7 @@ export default class Run extends Component {
|
||||
)
|
||||
})
|
||||
}
|
||||
<Button type="primary" icon="plus" onClick={this.addPathParam}>Add path parameter</Button>
|
||||
<Button type="primary" icon="plus" onClick={this.addPathParam}>添加Path参数</Button>
|
||||
</Panel>
|
||||
<Panel header="QUERY PARAMETERS" key="1">
|
||||
{
|
||||
@ -492,7 +505,7 @@ export default class Run extends Component {
|
||||
)
|
||||
})
|
||||
}
|
||||
<Button type="primary" icon="plus" onClick={this.addQuery}>Add query parameter</Button>
|
||||
<Button type="primary" icon="plus" onClick={this.addQuery}>添加Query参数</Button>
|
||||
</Panel>
|
||||
<Panel header="HEADERS" key="2" >
|
||||
{
|
||||
@ -507,7 +520,7 @@ export default class Run extends Component {
|
||||
)
|
||||
})
|
||||
}
|
||||
<Button type="primary" icon="plus" onClick={this.addHeader}>Add header</Button>
|
||||
<Button type="primary" icon="plus" onClick={this.addHeader}>添加Header</Button>
|
||||
</Panel>
|
||||
<Panel
|
||||
header={
|
||||
@ -558,7 +571,7 @@ export default class Run extends Component {
|
||||
)
|
||||
})
|
||||
}
|
||||
<Button type="primary" icon="plus" onClick={this.addBody}>Add form parameter</Button>
|
||||
<Button type="primary" icon="plus" onClick={this.addBody}>添加Form参数</Button>
|
||||
</div>
|
||||
}
|
||||
{
|
||||
@ -580,11 +593,12 @@ export default class Run extends Component {
|
||||
<div className="res-code"></div>
|
||||
<Collapse defaultActiveKey={['0', '1']} bordered={true}>
|
||||
<Panel header="BODY" key="0" >
|
||||
{/*<TextArea
|
||||
<div id="res-body-pretty" className="pretty-editor" style={{display: isResJson ? '' : 'none'}}></div>
|
||||
<TextArea
|
||||
style={{display: isResJson ? 'none' : ''}}
|
||||
value={typeof this.state.res === 'object' ? JSON.stringify(this.state.res, null, 2) : this.state.res.toString()}
|
||||
autosize={{ minRows: 2, maxRows: 10 }}
|
||||
></TextArea>*/}
|
||||
<div id="res-body-pretty" className="pretty-editor"></div>
|
||||
></TextArea>
|
||||
</Panel>
|
||||
<Panel header="HEADERS" key="1" >
|
||||
{/*<TextArea
|
||||
|
@ -67,9 +67,10 @@ class ProjectCard extends Component {
|
||||
|
||||
render() {
|
||||
const { projectData, inFollowPage } = this.props;
|
||||
console.log(projectData);
|
||||
return (
|
||||
<div className="card-container">
|
||||
<Card bordered={false} className="m-card" onClick={() => this.props.history.push('/project/' + projectData._id)}>
|
||||
<Card bordered={false} className="m-card" onClick={() => this.props.history.push('/project/' + (projectData.projectid || projectData._id))}>
|
||||
<Icon type={projectData.icon || 'star-o'} className="ui-logo" style={{ backgroundColor: constants.PROJECT_COLOR[projectData.color] || constants.PROJECT_COLOR.blue }} />
|
||||
<h4 className="ui-title">{projectData.name || projectData.projectname}</h4>
|
||||
</Card>
|
||||
|
@ -33,7 +33,6 @@ class Follows extends Component {
|
||||
}
|
||||
|
||||
receiveRes = () => {
|
||||
console.log('receive res!');
|
||||
this.props.getFollowList(this.props.uid).then((res) => {
|
||||
console.log(res);
|
||||
if (res.payload.data.errcode === 0) {
|
||||
|
@ -388,7 +388,7 @@ class InterfaceEditForm extends Component {
|
||||
<span>
|
||||
接口路径
|
||||
<Tooltip title="接口路径,支持动态路由,例如:'/api/user/:id'">
|
||||
<Icon type="question" style={{ width: "10px" }} />
|
||||
<Icon type="question-circle-o" style={{ width: "10px" }} />
|
||||
</Tooltip>
|
||||
|
||||
</span>
|
||||
|
@ -321,8 +321,8 @@ class InterfaceMenu extends Component {
|
||||
{menuList.length > 0 ?
|
||||
<Tree
|
||||
className="interface-list"
|
||||
expandedKeys={currentKes.expands}
|
||||
selectedKeys={currentKes.selects}
|
||||
defaultExpandedKeys={currentKes.expands}
|
||||
defaultSelectedKeys={currentKes.selects}
|
||||
onSelect={this.onSelect}
|
||||
>
|
||||
<TreeNode title={<Link style={{ fontSize: '14px' }} to={"/project/" + matchParams.id + "/interface/api"}><Icon type="folder-open" style={{ marginRight: 5 }} />全部接口</Link>} key="root" />
|
||||
|
@ -218,8 +218,7 @@ class ProjectMember extends Component {
|
||||
{this.state.groupMemberList.length ? this.state.groupMemberList.map((item, index) => {
|
||||
return (<div key={index} className="card-item">
|
||||
<img src={location.protocol + '//' + location.host + '/api/user/avatar?uid=' + item.uid} className="item-img" />
|
||||
<p className="item-name">{item.username}</p>
|
||||
{item.uid === this.props.uid ? <Badge count={'我'} style={{ backgroundColor: '#689bd0', marginLeft: '8px', borderRadius: '4px' }} /> : null}
|
||||
<p className="item-name">{item.username}{item.uid === this.props.uid ? <Badge count={'我'} style={{ backgroundColor: '#689bd0', fontSize: '12px', marginLeft: '8px', borderRadius: '4px' }} /> : null}</p>
|
||||
{item.role === 'owner' ? <p className="item-role">组长</p> : null}
|
||||
{item.role === 'dev' ? <p className="item-role">开发者</p> : null}
|
||||
</div>);
|
||||
|
55
index.html
Normal file
55
index.html
Normal file
@ -0,0 +1,55 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title></title>
|
||||
<style media="screen">
|
||||
.test {
|
||||
width: 400px;
|
||||
position: relative;
|
||||
min-height: 240px;
|
||||
background-color: #2395f1;
|
||||
overflow: hidden;
|
||||
}
|
||||
.test:before, .test:after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
min-width: 800px;
|
||||
min-height: 800px;
|
||||
background-color: #fff;
|
||||
animation-name: rotate;
|
||||
animation-iteration-count: infinite;
|
||||
animation-timing-function: linear;
|
||||
}
|
||||
.test:before {
|
||||
bottom: 180px;
|
||||
border-radius: 45%;
|
||||
animation-duration: 10s;
|
||||
}
|
||||
.test:after {
|
||||
top: 180px;
|
||||
opacity: .5;
|
||||
border-radius: 47%;
|
||||
animation-duration: 10s;
|
||||
}
|
||||
|
||||
@keyframes rotate {
|
||||
0% {
|
||||
transform: translate(-50%, 0) rotateZ(0deg);
|
||||
}
|
||||
50% {
|
||||
transform: translate(-50%, -2%) rotateZ(180deg);
|
||||
}
|
||||
100% {
|
||||
transform: translate(-50%, 0%) rotateZ(360deg);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="test">
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -229,7 +229,7 @@ class interfaceColController extends baseController{
|
||||
}
|
||||
|
||||
let caseData = await this.caseModel.get(params.id);
|
||||
let auth = await this.checkAuth(caseData.project_id, 'project', 'edit')
|
||||
let auth = await this.checkAuth(caseData.project_id, 'project', 'edit');
|
||||
if (!auth) {
|
||||
return ctx.body = yapi.commons.resReturn(null, 400, '没有权限');
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ app.use(compress({
|
||||
}));
|
||||
|
||||
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) {
|
||||
|
@ -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) {
|
||||
|
@ -74,7 +74,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;
|
||||
return _regenerator2.default.wrap(function _callee$(_context) {
|
||||
while (1) {
|
||||
@ -139,7 +139,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, uid, checkRepeat, result;
|
||||
return _regenerator2.default.wrap(function _callee2$(_context2) {
|
||||
while (1) {
|
||||
@ -217,7 +217,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, uid, checkRepeat, project, data, result;
|
||||
return _regenerator2.default.wrap(function _callee3$(_context3) {
|
||||
while (1) {
|
||||
|
@ -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) {
|
||||
|
@ -105,7 +105,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 _this2 = this;
|
||||
|
||||
var params, auth, checkRepeat, data, result;
|
||||
@ -273,7 +273,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) {
|
||||
@ -335,7 +335,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) {
|
||||
@ -385,7 +385,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) {
|
||||
@ -435,7 +435,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) {
|
||||
@ -540,7 +540,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 _this3 = this;
|
||||
|
||||
var params, id, interfaceData, auth, checkRepeat, data, result, username, cateid;
|
||||
@ -747,7 +747,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 _this4 = this;
|
||||
|
||||
var id, data, auth, inter, result, username;
|
||||
@ -840,7 +840,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 _this5 = this;
|
||||
|
||||
var id, result, userInst, userinfo, data;
|
||||
@ -923,7 +923,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, auth, result, username;
|
||||
return _regenerator2.default.wrap(function _callee9$(_context9) {
|
||||
while (1) {
|
||||
@ -1018,7 +1018,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, username, cate, auth;
|
||||
return _regenerator2.default.wrap(function _callee10$(_context10) {
|
||||
while (1) {
|
||||
@ -1090,7 +1090,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, username, result, r;
|
||||
return _regenerator2.default.wrap(function _callee11$(_context11) {
|
||||
while (1) {
|
||||
|
@ -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, auth, result, username;
|
||||
return _regenerator2.default.wrap(function _callee2$(_context2) {
|
||||
while (1) {
|
||||
@ -255,7 +255,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) {
|
||||
@ -319,7 +319,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 _this2 = this;
|
||||
|
||||
var params, auth, result, username;
|
||||
@ -448,7 +448,7 @@ var interfaceColController = function (_baseController) {
|
||||
}, {
|
||||
key: 'upCase',
|
||||
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 _this3 = this;
|
||||
|
||||
var params, caseData, auth, result, username;
|
||||
@ -561,7 +561,7 @@ var interfaceColController = function (_baseController) {
|
||||
}, {
|
||||
key: 'getCase',
|
||||
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 id, result;
|
||||
return _regenerator2.default.wrap(function _callee6$(_context6) {
|
||||
while (1) {
|
||||
@ -615,7 +615,7 @@ var interfaceColController = function (_baseController) {
|
||||
}, {
|
||||
key: 'upCol',
|
||||
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, id, colData, auth, result, username;
|
||||
return _regenerator2.default.wrap(function _callee7$(_context7) {
|
||||
while (1) {
|
||||
@ -700,7 +700,7 @@ var interfaceColController = function (_baseController) {
|
||||
}, {
|
||||
key: 'upCaseIndex',
|
||||
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 _this4 = this;
|
||||
|
||||
var params;
|
||||
@ -769,7 +769,7 @@ var interfaceColController = function (_baseController) {
|
||||
}, {
|
||||
key: 'delCol',
|
||||
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 id, colData, auth, result, username;
|
||||
return _regenerator2.default.wrap(function _callee9$(_context9) {
|
||||
while (1) {
|
||||
@ -855,7 +855,7 @@ var interfaceColController = function (_baseController) {
|
||||
}, {
|
||||
key: 'delCase',
|
||||
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 _this5 = this;
|
||||
|
||||
var caseid, caseData, auth, result, username;
|
||||
|
@ -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) {
|
||||
|
@ -148,7 +148,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, colInst, catInst, username;
|
||||
return _regenerator2.default.wrap(function _callee$(_context) {
|
||||
while (1) {
|
||||
@ -321,7 +321,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;
|
||||
return _regenerator2.default.wrap(function _callee2$(_context2) {
|
||||
while (1) {
|
||||
@ -444,7 +444,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 _this2 = this;
|
||||
|
||||
var params, check, result, username;
|
||||
@ -542,7 +542,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) {
|
||||
@ -600,7 +600,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) {
|
||||
@ -662,7 +662,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) {
|
||||
@ -747,7 +747,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, follow, uids, _users, users;
|
||||
|
||||
return _regenerator2.default.wrap(function _callee7$(_context7) {
|
||||
@ -847,7 +847,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) {
|
||||
@ -940,7 +940,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 _this3 = this;
|
||||
|
||||
var params, projectInst, check, result, username;
|
||||
@ -1056,7 +1056,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 _this4 = this;
|
||||
|
||||
var id, data, result;
|
||||
@ -1146,7 +1146,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) {
|
||||
@ -1292,7 +1292,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) {
|
||||
@ -1367,7 +1367,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) {
|
||||
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
@ -355,7 +355,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) {
|
||||
|
@ -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) {
|
||||
|
BIN
static/attachment/cross-request.crx
Normal file
BIN
static/attachment/cross-request.crx
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user