Merge branch 'dev' of gitlab.corp.qunar.com:mfe/yapi into dev

This commit is contained in:
zwjamnsss 2017-08-24 11:11:42 +08:00
commit 9a3f1ab239
18 changed files with 334 additions and 225 deletions

View File

@ -7,21 +7,30 @@
background: #FFF;
display: block;
min-height: 550px;
border-radius: 4px;
.news-timeline{
padding: 24px;
padding-left: 125px;
color: #6b6c6d;
.ant-timeline-item{
min-height: 60px;
.ant-timeline-item-head{
width: 40px;
height: 40px;
left: -13px;
top:8px;
// border-color:#e1e3e4;
border:2px solid #e1e3e4;
border-radius: 20px;
}
.ant-timeline-item-tail{
top: 30px;
}
}
.ant-timeline-item-head{
width: 30px;
height: 30px;
left: -8px;
top: -4px;
border-color:#e1e3e4;
.ant-avatar{
// border:2px solid gray;
}
.logusername{
color: #4eaef3;
padding: 0px 16px 0px 8px;
@ -72,6 +81,7 @@
padding: 0px;
padding-bottom: 16px;
min-width: 300px;
max-width: 600px;
border-radius: 8px;
.logMesHeade{
@ -85,9 +95,10 @@
left: -120px;
}
.logcontent{
text-indent: 2em;
// text-indent: 2em;
line-height: 1.5em;
margin-top: 16px;
padding: 0px 16px;
}
}
@ -97,6 +108,7 @@
.ant-timeline-item-content{
padding: 0px;
min-width: auto;
margin-top: 15px;
.loggetMore{
margin: 0px;
padding: 8px;

View File

@ -238,7 +238,7 @@ class View extends Component {
</div>
<div className="colMockUrl">
<span className="colKey">Mock地址</span>
<span className="colValue">{location.protocol + '//' + location.hostname + (location.port !== "" ? ":" + location.port : "") + `/mock/${this.props.currProject._id}${this.props.currProject.basepath}/${this.props.curData.path}`}</span>
<span className="colValue">{location.protocol + '//' + location.hostname + (location.port !== "" ? ":" + location.port : "") + `/mock/${this.props.currProject._id}${this.props.currProject.basepath}${this.props.curData.path}`}</span>
</div>
{this.props.curData.desc?<div className="colDesc">
<span className="colKey">接口描述</span>

View File

@ -115,7 +115,7 @@ class List extends Component {
}, {
title: '功能',
key: 'action',
width:"80px",
width:"90px",
render: (item) => {
return (
<span>

View File

@ -3,6 +3,7 @@ import { Row, Col, Input, Button, Select, message, Upload} from 'antd'
import axios from 'axios';
import {formatTime} from '../../common.js'
import PropTypes from 'prop-types'
import { Link } from 'react-router-dom'
import { connect } from 'react-redux'
@connect(state=>{
@ -252,52 +253,84 @@ class Profile extends Component {
</ButtonGroup>
</div>
}
let bacToPer = "";
if(userinfo.uid != this.props.curUid){
bacToPer = <div className="bacToPer"><Link to={`/user/profile/${this.props.curUid}`}><Button onClick={()=>{this.getUserInfo(this.props.curUid)}}>返回到当前用户</Button></Link></div>
}
return <div className="user-profile">
<Row className="user-item" type="flex" justify="start">
<Col span={24}>{userinfo.uid === this.props.curUid?<AvatarUpload uid={userinfo.uid}>点击上传头像</AvatarUpload>:<div className = "avatarImg"><img src = {`/api/user/avatar?uid=${userinfo.uid}`} /></div>}</Col>
<Col span={4}>用户id</Col>
<Col span={12}>
{userinfo.uid}
</Col>
</Row>
<Row className="user-item" type="flex" justify="start">
<Col span={4}>用户名</Col>
<Col span={12}>
{userNameEditHtml}
</Col>
</Row>
<Row className="user-item" type="flex" justify="start">
<Col span={4}>Email</Col>
<Col span={12}>
{emailEditHtml}
</Col>
</Row>
<Row className="user-item" style={{display: this.props.curRole === 'admin'? '': 'none'}} type="flex" justify="start">
<Col span={4}>角色</Col>
<Col span={12}>
{roleEditHtml}
</Col>
</Row>
<Row className="user-item" type="flex" justify="start">
<Col span={4}>创建账号时间</Col>
<Col span={12}>
{formatTime(userinfo.add_time)}
</Col>
</Row>
<Row className="user-item" type="flex" justify="start">
<Col span={4}>更新账号时间</Col>
<Col span={12}>
{formatTime(userinfo.up_time)}
</Col>
{
bacToPer
}
<Row className="avatarCon" type="flex" justify="start">
<div className="m-bg">
<div className="m-bg-mask m-bg-mask0"></div>
<div className="m-bg-mask m-bg-mask1"></div>
<div className="m-bg-mask m-bg-mask2"></div>
<div className="m-bg-mask m-bg-mask3"></div>
</div>
<Col span={24}>{userinfo.uid === this.props.curUid?<AvatarUpload uid={userinfo.uid}>点击上传头像</AvatarUpload>:<div className = "avatarImg"><img src = {`/api/user/avatar?uid=${userinfo.uid}`} /></div>}</Col>
</Row>
<div className="user-item-body">
<div className="user-item-mask-top"></div>
<div className="user-item-mask">
<div className="m-bg">
<div className="m-bg-mask m-bg-mask0"></div>
<div className="m-bg-mask m-bg-mask1"></div>
<div className="m-bg-mask m-bg-mask2"></div>
<div className="m-bg-mask m-bg-mask3"></div>
</div>
</div>
<Row className="user-item" type="flex" justify="start">
<div className="maoboli"></div>
<Col span={4}>用户id</Col>
<Col span={12}>
{userinfo.uid}
</Col>
</Row>
<Row className="user-item" type="flex" justify="start">
<div className="maoboli"></div>
<Col span={4}>用户名</Col>
<Col span={12}>
{userNameEditHtml}
</Col>
</Row>
<Row className="user-item" type="flex" justify="start">
<div className="maoboli"></div>
<Col span={4}>Email</Col>
<Col span={12}>
{emailEditHtml}
</Col>
</Row>
<Row className="user-item" style={{display: this.props.curRole === 'admin'? '': 'none'}} type="flex" justify="start">
<div className="maoboli"></div>
<Col span={4}>角色</Col>
<Col span={12}>
{roleEditHtml}
</Col>
</Row>
<Row className="user-item" type="flex" justify="start">
<div className="maoboli"></div>
<Col span={4}>创建账号时间</Col>
<Col span={12}>
{formatTime(userinfo.add_time)}
</Col>
</Row>
<Row className="user-item" type="flex" justify="start">
<div className="maoboli"></div>
<Col span={4}>更新账号时间</Col>
<Col span={12}>
{formatTime(userinfo.up_time)}
</Col>
</Row>
{(userType)?<Row className="user-item" type="flex" justify="start">
<Col span={4}>密码</Col>
<Col span={12}>
{secureEditHtml}
</Col>
</Row>:""}
{(userType)?<Row className="user-item" type="flex" justify="start">
<div className="maoboli"></div>
<Col span={4}>密码</Col>
<Col span={12}>
{secureEditHtml}
</Col>
</Row>:""}
</div>
</div>
}
}
@ -342,7 +375,7 @@ class AvatarUpload extends Component {
{/*<Avatar size="large" src={imageUrl} />*/}
<img className = "avatar" src = {imageUrl} />
</Upload>
<span className="avatarChange">点击头像更换</span>
<span className="avatarChange">点击头像更换<br></br>jpgpng200kb</span>
</div>
}
}

View File

@ -23,7 +23,7 @@
}
ul{border:none}
.ant-menu-item{
font-size: 14px;
font-size: 18px;
}
}
.user-name{
@ -31,7 +31,7 @@
// text-align: center;
background-color: #34495e;
color: white;
font-size: 16px;
font-size: 18px;
border-top-left-radius: 4px;
border-top-right-radius: 4px;
span{
@ -60,19 +60,68 @@
.user-profile {
-webkit-box-flex: 1;
padding: 24px;
padding: 32px;
box-shadow: 0 2px 4px 0 rgba(0,0,0,0.20);
background: #FFF;
border-radius: .04rem;
min-height: 5rem;
position: relative;
.bacToPer{
position: absolute;
right: 40px;
top: 40px;
z-index: 3;
}
.user-item-body{
padding: 32px;
background-color: #ececec;
position: relative;
.user-item-mask-top{
position: absolute;
top: 0px;
left: 0px;
height: 100%;
width: 100%;
background: black;
z-index: 2;
opacity: .7;
}
.user-item-mask{
position: absolute;
top: 0px;
left: 0px;
height: 0px;
width: 100%;
height: 100%;
overflow: hidden;
background-color: rgba(0,0,0,0.70);
}
.user-item{
position: relative;
z-index: 3;
padding: 8px 0px;
.maoboli{
background-color: rgba(225,225,225,0.60);
// filter: blur(3px);
position: absolute;
width: 100%;
height: 100%;
left: 0px;
top: 0px;
}
}
}
.user-item {
min-height:35px;
line-height:35px;
margin: 5px;
margin-left: 0px;
margin-bottom: 16px;
border-bottom: 1px solid #f1f3f6;
// border-bottom: 1px solid #f1f3f6;
padding-bottom: 16px;
font-size: 14px;
#old_password,#password,#verify_pass{
margin-top: 20px;
}
@ -121,6 +170,7 @@
}
.avatar{
width: 100px;
min-height: 100px;
// border-radius: 50px;
}
.avatarImg{
@ -128,6 +178,8 @@
border-radius: 50px;
overflow: hidden;
height: 100px;
background-color: white;
margin: 0px auto;
img{
width: 100%;
}
@ -135,10 +187,63 @@
.avatar-uploader {
display: block;
cursor: pointer;
height: 100px;
}
.ant-upload-list{
display: none;
}
.avatar-box{
width: 100px;
margin: 0px auto;
}
.avatarCon{
background: gray;
padding: 16px 0px;
margin-bottom: 16px;
width: 100%;
overflow: hidden;
position: relative;
}
.m-bg {
position: absolute;
left: 0;
top: -300px;
height: 1200px;
width: 100%;
transform: skewY(-11deg);
background-image: linear-gradient(-20deg, #21d4fd 0%, #b721ff 100%);
.m-bg-mask {
position: absolute;
height: 180px;
}
.m-bg-mask0 {
bottom: 0;
left: 0;
width: 30%;
background-image: linear-gradient(120deg, #6ab3fd 0%, #8ba3fd 102%);
}
.m-bg-mask1 {
bottom: 180px;
right: 0;
width: 36%;
background-image: linear-gradient(120deg, #28c5f5 0%, #6682fe 100%);
}
.m-bg-mask2 {
bottom: 540px;
left: 0;
width: 20%;
height: 240px;
background-image: linear-gradient(120deg, #8121ff 0%, #5e5ef7 100%);
}
.m-bg-mask3 {
bottom: 540px;
left: 20%;
width: 70%;
height: 240px;
background-image: linear-gradient(-225deg, #5f2bff 0%, #6088fe 48%, #22ccf6 100%);
}
}
.avatar-uploader-trigger {
display: table-cell;
vertical-align: middle;
@ -147,8 +252,13 @@
}
.avatarChange{
display: block;
width: 100px;
width: 300px;
text-align: center;
padding-bottom: 8px;
padding: 8px;
margin-left: -100px;
color: #ececec;
}
}

0
npm-debug.log.9006047 Normal file
View File

View File

@ -1,11 +1,13 @@
import yapi from '../yapi.js';
import baseController from './base.js';
import followModel from '../models/follow';
import projectModel from '../models/project';
class followController extends baseController {
constructor(ctx) {
super(ctx);
this.Model = yapi.getInst(followModel);
this.projectModel = yapi.getInst(projectModel);
}
/**
@ -89,13 +91,10 @@ class followController extends baseController {
async add(ctx) {
let params = ctx.request.body;
params = yapi.commons.handleParams(params, {
projectid: 'number',
projectname: 'string',
icon: 'string',
color: 'string'
projectid: 'number'
});
let uid = this.getUid()
let uid = this.getUid();
if (!params.projectid) {
return ctx.body = yapi.commons.resReturn(null, 400, '项目id不能为空');
@ -107,25 +106,15 @@ class followController extends baseController {
return ctx.body = yapi.commons.resReturn(null, 401, '项目已关注');
}
if (!params.projectname) {
return ctx.body = yapi.commons.resReturn(null, 400, '项目名不能为空');
}
if (!params.icon) {
return ctx.body = yapi.commons.resReturn(null, 400, '项目图标标志不能为空');
}
if (!params.color) {
return ctx.body = yapi.commons.resReturn(null, 400, '项目颜色不能为空');
}
let data = {
uid: uid,
projectid: params.projectid,
projectname: params.projectname,
icon: params.icon,
color: params.color
};
try {
let project = await this.projectModel.get(params.projectid);
let data = {
uid: uid,
projectid: params.projectid,
projectname: project.name,
icon: project.icon,
color: project.color
};
let result = await this.Model.save(data);
result = yapi.commons.fieldSelect(result, ['_id', 'uid', 'projectid', 'projectname', 'icon', 'color']);
ctx.body = yapi.commons.resReturn(result);

View File

@ -134,14 +134,12 @@ class projectController extends baseController {
}
let username = this.getUsername();
yapi.commons.saveLog({
content: `用户${username}添加了项目${params.name}`,
content: `用户 "${username}" 添加了项目 "${params.name}"`,
type: 'project',
uid: this.getUid(),
username: username,
typeid: params.group_id,
typename: params.group_name,
color: params.color,
icon: params.icon
typename: params.group_name
});
ctx.body = yapi.commons.resReturn(result);
} catch (e) {
@ -189,15 +187,12 @@ class projectController extends baseController {
try {
let result = await this.Model.addMember(params.id, userdata);
let username = this.getUsername();
let project = await this.Model.get(params.id);
yapi.commons.saveLog({
content: `用户${username}添加了项目成员${userdata.username}`,
content: `用户 "${username}" 添加了项目成员 "${userdata.username}"`,
type: 'project',
uid: this.getUid(),
username: username,
typeid: params.id,
color: project.color,
icon: project.icon
typeid: params.id
});
ctx.body = yapi.commons.resReturn(result);
} catch (e) {
@ -240,13 +235,11 @@ class projectController extends baseController {
let project = await this.Model.get(params.id);
let member = await yapi.getInst(userModel).findById(params.member_uid);
yapi.commons.saveLog({
content: `用户${username}删除了项目${project.name}中的成员${member.username}`,
content: `用户 "${username}" 删除了项目 "${project.name}" 中的成员 "${member.username}"`,
type: 'project',
uid: this.getUid(),
username: username,
typeid: params.id,
color: project.color,
icon: project.icon
typeid: params.id
});
ctx.body = yapi.commons.resReturn(result);
} catch (e) {
@ -451,7 +444,7 @@ class projectController extends baseController {
let project = await this.Model.get(params.id);
let member = await yapi.getInst(userModel).findById(params.member_uid);
yapi.commons.saveLog({
content: `用户${username}修改了项目${project.name}中成员${member.username}的角色为${params.role}`,
content: `用户 "${username}" 修改了项目 "${project.name}" 中成员 "${member.username}" 的角色为 "${params.role}"`,
type: 'project',
uid: this.getUid(),
username: username,
@ -565,7 +558,7 @@ class projectController extends baseController {
let result = await this.Model.up(id, data);
let username = this.getUsername();
yapi.commons.saveLog({
content: `用户${username}更新了项目${projectData.name}`,
content: `用户 "${username}" 更新了项目 "${projectData.name}"`,
type: 'project',
uid: this.getUid(),
username: username,

View File

@ -72,7 +72,7 @@ app.use(compress({
}));
app.use(function () {
var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(ctx, next) {
var _ref = (0, _asyncToGenerator3.default)(_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)( /*#__PURE__*/_regenerator2.default.mark(function _callee(ctx) {
var _ref = (0, _asyncToGenerator3.default)(_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)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(ctx) {
var _ref2 = (0, _asyncToGenerator3.default)(_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)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(ctx) {
var _ref3 = (0, _asyncToGenerator3.default)(_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)( /*#__PURE__*/_regenerator2.default.mark(function _callee4(id, type) {
var _ref4 = (0, _asyncToGenerator3.default)(_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)( /*#__PURE__*/_regenerator2.default.mark(function _callee5(id, type, action) {
var _ref5 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee5(id, type, action) {
var role;
return _regenerator2.default.wrap(function _callee5$(_context5) {
while (1) {

View File

@ -40,6 +40,10 @@ var _follow = require('../models/follow');
var _follow2 = _interopRequireDefault(_follow);
var _project = require('../models/project');
var _project2 = _interopRequireDefault(_project);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var followController = function (_baseController) {
@ -51,6 +55,7 @@ var followController = function (_baseController) {
var _this = (0, _possibleConstructorReturn3.default)(this, (followController.__proto__ || (0, _getPrototypeOf2.default)(followController)).call(this, ctx));
_this.Model = _yapi2.default.getInst(_follow2.default);
_this.projectModel = _yapi2.default.getInst(_project2.default);
return _this;
}
@ -69,7 +74,7 @@ var followController = function (_baseController) {
(0, _createClass3.default)(followController, [{
key: 'list',
value: function () {
var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(ctx) {
var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(ctx) {
var uid, page, limit, result;
return _regenerator2.default.wrap(function _callee$(_context) {
while (1) {
@ -134,7 +139,7 @@ var followController = function (_baseController) {
}, {
key: 'del',
value: function () {
var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(ctx) {
var _ref2 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee2(ctx) {
var params, uid, checkRepeat, result;
return _regenerator2.default.wrap(function _callee2$(_context2) {
while (1) {
@ -212,8 +217,8 @@ var followController = function (_baseController) {
}, {
key: 'add',
value: function () {
var _ref3 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(ctx) {
var params, uid, checkRepeat, data, result;
var _ref3 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee3(ctx) {
var params, uid, checkRepeat, project, data, result;
return _regenerator2.default.wrap(function _callee3$(_context3) {
while (1) {
switch (_context3.prev = _context3.next) {
@ -221,10 +226,7 @@ var followController = function (_baseController) {
params = ctx.request.body;
params = _yapi2.default.commons.handleParams(params, {
projectid: 'number',
projectname: 'string',
icon: 'string',
color: 'string'
projectid: 'number'
});
uid = this.getUid();
@ -251,61 +253,42 @@ var followController = function (_baseController) {
return _context3.abrupt('return', ctx.body = _yapi2.default.commons.resReturn(null, 401, '项目已关注'));
case 10:
if (params.projectname) {
_context3.next = 12;
break;
}
_context3.prev = 10;
_context3.next = 13;
return this.projectModel.get(params.projectid);
return _context3.abrupt('return', ctx.body = _yapi2.default.commons.resReturn(null, 400, '项目名不能为空'));
case 12:
if (params.icon) {
_context3.next = 14;
break;
}
return _context3.abrupt('return', ctx.body = _yapi2.default.commons.resReturn(null, 400, '项目图标标志不能为空'));
case 14:
if (params.color) {
_context3.next = 16;
break;
}
return _context3.abrupt('return', ctx.body = _yapi2.default.commons.resReturn(null, 400, '项目颜色不能为空'));
case 16:
case 13:
project = _context3.sent;
data = {
uid: uid,
projectid: params.projectid,
projectname: params.projectname,
icon: params.icon,
color: params.color
projectname: project.name,
icon: project.icon,
color: project.color
};
_context3.prev = 17;
_context3.next = 20;
_context3.next = 17;
return this.Model.save(data);
case 20:
case 17:
result = _context3.sent;
result = _yapi2.default.commons.fieldSelect(result, ['_id', 'uid', 'projectid', 'projectname', 'icon', 'color']);
ctx.body = _yapi2.default.commons.resReturn(result);
_context3.next = 28;
_context3.next = 25;
break;
case 25:
_context3.prev = 25;
_context3.t0 = _context3['catch'](17);
case 22:
_context3.prev = 22;
_context3.t0 = _context3['catch'](10);
ctx.body = _yapi2.default.commons.resReturn(null, 402, _context3.t0.message);
case 28:
case 25:
case 'end':
return _context3.stop();
}
}
}, _callee3, this, [[17, 25]]);
}, _callee3, this, [[10, 22]]);
}));
function add(_x3) {

View File

@ -88,7 +88,7 @@ var groupController = function (_baseController) {
(0, _createClass3.default)(groupController, [{
key: 'get',
value: function () {
var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(ctx) {
var _ref = (0, _asyncToGenerator3.default)(_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)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(ctx) {
var _ref2 = (0, _asyncToGenerator3.default)(_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)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(uid, role) {
var _ref3 = (0, _asyncToGenerator3.default)(_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)( /*#__PURE__*/_regenerator2.default.mark(function _callee4(ctx) {
var _ref4 = (0, _asyncToGenerator3.default)(_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)( /*#__PURE__*/_regenerator2.default.mark(function _callee5(ctx) {
var _ref5 = (0, _asyncToGenerator3.default)(_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)( /*#__PURE__*/_regenerator2.default.mark(function _callee6(ctx) {
var _ref6 = (0, _asyncToGenerator3.default)(_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)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(ctx) {
var _ref7 = (0, _asyncToGenerator3.default)(_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)( /*#__PURE__*/_regenerator2.default.mark(function _callee8(ctx) {
var _ref8 = (0, _asyncToGenerator3.default)(_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)( /*#__PURE__*/_regenerator2.default.mark(function _callee10(ctx) {
var _ref9 = (0, _asyncToGenerator3.default)(_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)( /*#__PURE__*/_regenerator2.default.mark(function _callee9(p) {
var _ref10 = (0, _asyncToGenerator3.default)(_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)( /*#__PURE__*/_regenerator2.default.mark(function _callee11(ctx) {
var _ref11 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee11(ctx) {
var groupInst, _id2, data, result;
return _regenerator2.default.wrap(function _callee11$(_context11) {

View File

@ -105,7 +105,7 @@ var interfaceController = function (_baseController) {
(0, _createClass3.default)(interfaceController, [{
key: 'add',
value: function () {
var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(ctx) {
var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(ctx) {
var params, checkRepeat, data, result, username, cate;
return _regenerator2.default.wrap(function _callee$(_context) {
while (1) {
@ -259,7 +259,7 @@ var interfaceController = function (_baseController) {
}, {
key: 'get',
value: function () {
var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(ctx) {
var _ref2 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee2(ctx) {
var params, result;
return _regenerator2.default.wrap(function _callee2$(_context2) {
while (1) {
@ -321,7 +321,7 @@ var interfaceController = function (_baseController) {
}, {
key: 'list',
value: function () {
var _ref3 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(ctx) {
var _ref3 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee3(ctx) {
var project_id, result;
return _regenerator2.default.wrap(function _callee3$(_context3) {
while (1) {
@ -371,7 +371,7 @@ var interfaceController = function (_baseController) {
}, {
key: 'listByCat',
value: function () {
var _ref4 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4(ctx) {
var _ref4 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee4(ctx) {
var catid, result;
return _regenerator2.default.wrap(function _callee4$(_context4) {
while (1) {
@ -421,7 +421,7 @@ var interfaceController = function (_baseController) {
}, {
key: 'listByMenu',
value: function () {
var _ref5 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5(ctx) {
var _ref5 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee5(ctx) {
var project_id, result, newResult, i, item, list, j;
return _regenerator2.default.wrap(function _callee5$(_context5) {
while (1) {
@ -526,7 +526,7 @@ var interfaceController = function (_baseController) {
}, {
key: 'up',
value: function () {
var _ref6 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6(ctx) {
var _ref6 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee6(ctx) {
var params, id, interfaceData, checkRepeat, data, result, username, cate, inter;
return _regenerator2.default.wrap(function _callee6$(_context6) {
while (1) {
@ -728,7 +728,7 @@ var interfaceController = function (_baseController) {
}, {
key: 'del',
value: function () {
var _ref7 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(ctx) {
var _ref7 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee7(ctx) {
var id, data, inter, result, username, cate;
return _regenerator2.default.wrap(function _callee7$(_context7) {
while (1) {
@ -822,7 +822,7 @@ var interfaceController = function (_baseController) {
}, {
key: 'solveConflict',
value: function () {
var _ref8 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8(ctx) {
var _ref8 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee8(ctx) {
var _this2 = this;
var id, result, userInst, userinfo, data;
@ -905,7 +905,7 @@ var interfaceController = function (_baseController) {
}, {
key: 'addCat',
value: function () {
var _ref9 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9(ctx) {
var _ref9 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee9(ctx) {
var params, result, username;
return _regenerator2.default.wrap(function _callee9$(_context9) {
while (1) {
@ -986,7 +986,7 @@ var interfaceController = function (_baseController) {
}, {
key: 'upCat',
value: function () {
var _ref10 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10(ctx) {
var _ref10 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee10(ctx) {
var params, result, username, cate;
return _regenerator2.default.wrap(function _callee10$(_context10) {
while (1) {
@ -1045,7 +1045,7 @@ var interfaceController = function (_baseController) {
}, {
key: 'delCat',
value: function () {
var _ref11 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee11(ctx) {
var _ref11 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee11(ctx) {
var id, catData, auth, cate, result, r, username;
return _regenerator2.default.wrap(function _callee11$(_context11) {
while (1) {

View File

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

View File

@ -148,7 +148,7 @@ var projectController = function (_baseController) {
}, {
key: 'add',
value: function () {
var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(ctx) {
var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(ctx) {
var params, checkRepeat, data, result, colInst, catInst, username;
return _regenerator2.default.wrap(function _callee$(_context) {
while (1) {
@ -275,14 +275,12 @@ var projectController = function (_baseController) {
username = this.getUsername();
_yapi2.default.commons.saveLog({
content: '\u7528\u6237' + username + '\u6DFB\u52A0\u4E86\u9879\u76EE' + params.name,
content: '\u7528\u6237 "' + username + '" \u6DFB\u52A0\u4E86\u9879\u76EE "' + params.name + '"',
type: 'project',
uid: this.getUid(),
username: username,
typeid: params.group_id,
typename: params.group_name,
color: params.color,
icon: params.icon
typename: params.group_name
});
ctx.body = _yapi2.default.commons.resReturn(result);
_context.next = 39;
@ -323,8 +321,8 @@ var projectController = function (_baseController) {
}, {
key: 'addMember',
value: function () {
var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(ctx) {
var params, check, userdata, result, username, project;
var _ref2 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee2(ctx) {
var params, check, userdata, result, username;
return _regenerator2.default.wrap(function _callee2$(_context2) {
while (1) {
switch (_context2.prev = _context2.next) {
@ -399,37 +397,30 @@ var projectController = function (_baseController) {
case 24:
result = _context2.sent;
username = this.getUsername();
_context2.next = 28;
return this.Model.get(params.id);
case 28:
project = _context2.sent;
_yapi2.default.commons.saveLog({
content: '\u7528\u6237' + username + '\u6DFB\u52A0\u4E86\u9879\u76EE\u6210\u5458' + userdata.username,
content: '\u7528\u6237 "' + username + '" \u6DFB\u52A0\u4E86\u9879\u76EE\u6210\u5458 "' + userdata.username + '"',
type: 'project',
uid: this.getUid(),
username: username,
typeid: params.id,
color: project.color,
icon: project.icon
typeid: params.id
});
ctx.body = _yapi2.default.commons.resReturn(result);
_context2.next = 36;
_context2.next = 33;
break;
case 33:
_context2.prev = 33;
case 30:
_context2.prev = 30;
_context2.t1 = _context2['catch'](21);
ctx.body = _yapi2.default.commons.resReturn(null, 402, _context2.t1.message);
case 36:
case 33:
case 'end':
return _context2.stop();
}
}
}, _callee2, this, [[21, 33]]);
}, _callee2, this, [[21, 30]]);
}));
function addMember(_x2) {
@ -453,7 +444,7 @@ var projectController = function (_baseController) {
}, {
key: 'delMember',
value: function () {
var _ref3 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(ctx) {
var _ref3 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee3(ctx) {
var params, check, result, username, project, member;
return _regenerator2.default.wrap(function _callee3$(_context3) {
while (1) {
@ -524,13 +515,11 @@ var projectController = function (_baseController) {
member = _context3.sent;
_yapi2.default.commons.saveLog({
content: '\u7528\u6237' + username + '\u5220\u9664\u4E86\u9879\u76EE' + project.name + '\u4E2D\u7684\u6210\u5458' + member.username,
content: '\u7528\u6237 "' + username + '" \u5220\u9664\u4E86\u9879\u76EE "' + project.name + '" \u4E2D\u7684\u6210\u5458 "' + member.username + '"',
type: 'project',
uid: this.getUid(),
username: username,
typeid: params.id,
color: project.color,
icon: project.icon
typeid: params.id
});
ctx.body = _yapi2.default.commons.resReturn(result);
_context3.next = 33;
@ -559,7 +548,7 @@ var projectController = function (_baseController) {
}, {
key: 'getUserdata',
value: function () {
var _ref4 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4(uid, role) {
var _ref4 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee4(uid, role) {
var userInst, userData;
return _regenerator2.default.wrap(function _callee4$(_context4) {
while (1) {
@ -617,7 +606,7 @@ var projectController = function (_baseController) {
}, {
key: 'getMemberList',
value: function () {
var _ref5 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5(ctx) {
var _ref5 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee5(ctx) {
var params, project;
return _regenerator2.default.wrap(function _callee5$(_context5) {
while (1) {
@ -679,7 +668,7 @@ var projectController = function (_baseController) {
}, {
key: 'get',
value: function () {
var _ref6 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6(ctx) {
var _ref6 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee6(ctx) {
var params, result, catInst, cat;
return _regenerator2.default.wrap(function _callee6$(_context6) {
while (1) {
@ -764,7 +753,7 @@ var projectController = function (_baseController) {
}, {
key: 'list',
value: function () {
var _ref7 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(ctx) {
var _ref7 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee7(ctx) {
var group_id, auth, result, follow, uids, _users, users;
return _regenerator2.default.wrap(function _callee7$(_context7) {
@ -864,7 +853,7 @@ var projectController = function (_baseController) {
}, {
key: 'del',
value: function () {
var _ref8 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8(ctx) {
var _ref8 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee8(ctx) {
var id, interfaceInst, interfaceColInst, interfaceCaseInst, result;
return _regenerator2.default.wrap(function _callee8$(_context8) {
while (1) {
@ -957,7 +946,7 @@ var projectController = function (_baseController) {
}, {
key: 'changeMemberRole',
value: function () {
var _ref9 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9(ctx) {
var _ref9 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee9(ctx) {
var params, projectInst, check, result, username, project, member;
return _regenerator2.default.wrap(function _callee9$(_context9) {
while (1) {
@ -1032,7 +1021,7 @@ var projectController = function (_baseController) {
member = _context9.sent;
_yapi2.default.commons.saveLog({
content: '\u7528\u6237' + username + '\u4FEE\u6539\u4E86\u9879\u76EE' + project.name + '\u4E2D\u6210\u5458' + member.username + '\u7684\u89D2\u8272\u4E3A' + params.role,
content: '\u7528\u6237 "' + username + '" \u4FEE\u6539\u4E86\u9879\u76EE "' + project.name + '" \u4E2D\u6210\u5458 "' + member.username + '" \u7684\u89D2\u8272\u4E3A "' + params.role + '"',
type: 'project',
uid: this.getUid(),
username: username,
@ -1079,7 +1068,7 @@ var projectController = function (_baseController) {
}, {
key: 'upSet',
value: function () {
var _ref10 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10(ctx) {
var _ref10 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee10(ctx) {
var id, data, result;
return _regenerator2.default.wrap(function _callee10$(_context10) {
while (1) {
@ -1158,7 +1147,7 @@ var projectController = function (_baseController) {
}, {
key: 'up',
value: function () {
var _ref11 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee11(ctx) {
var _ref11 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee11(ctx) {
var id, params, projectData, checkRepeat, data, result, username;
return _regenerator2.default.wrap(function _callee11$(_context11) {
while (1) {
@ -1259,7 +1248,7 @@ var projectController = function (_baseController) {
username = this.getUsername();
_yapi2.default.commons.saveLog({
content: '\u7528\u6237' + username + '\u66F4\u65B0\u4E86\u9879\u76EE' + projectData.name,
content: '\u7528\u6237 "' + username + '" \u66F4\u65B0\u4E86\u9879\u76EE "' + projectData.name + '"',
type: 'project',
uid: this.getUid(),
username: username,
@ -1305,7 +1294,7 @@ var projectController = function (_baseController) {
}, {
key: 'upSet',
value: function () {
var _ref12 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee12(ctx) {
var _ref12 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee12(ctx) {
var id, data, result;
return _regenerator2.default.wrap(function _callee12$(_context12) {
while (1) {
@ -1378,7 +1367,7 @@ var projectController = function (_baseController) {
}, {
key: 'search',
value: function () {
var _ref13 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee13(ctx) {
var _ref13 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee13(ctx) {
var q, projectList, groupList, projectRules, groupRules, queryList;
return _regenerator2.default.wrap(function _callee13$(_context13) {
while (1) {
@ -1453,7 +1442,7 @@ var projectController = function (_baseController) {
}, {
key: 'download',
value: function () {
var _ref14 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee14(ctx) {
var _ref14 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee14(ctx) {
var project_id, interfaceInst, count, arr, fileName, res;
return _regenerator2.default.wrap(function _callee14$(_context14) {
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)( /*#__PURE__*/_regenerator2.default.mark(function _callee(ctx) {
var _ref = (0, _asyncToGenerator3.default)(_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)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(ctx) {
var _ref2 = (0, _asyncToGenerator3.default)(_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)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(ctx) {
var _ref3 = (0, _asyncToGenerator3.default)(_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)( /*#__PURE__*/_regenerator2.default.mark(function _callee4(email, username) {
var _ref4 = (0, _asyncToGenerator3.default)(_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)( /*#__PURE__*/_regenerator2.default.mark(function _callee5(ctx) {
var _ref5 = (0, _asyncToGenerator3.default)(_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)( /*#__PURE__*/_regenerator2.default.mark(function _callee6(ctx) {
var _ref6 = (0, _asyncToGenerator3.default)(_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)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(ctx) {
var _ref7 = (0, _asyncToGenerator3.default)(_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)( /*#__PURE__*/_regenerator2.default.mark(function _callee8(ctx) {
var _ref8 = (0, _asyncToGenerator3.default)(_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)( /*#__PURE__*/_regenerator2.default.mark(function _callee9(ctx) {
var _ref9 = (0, _asyncToGenerator3.default)(_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)( /*#__PURE__*/_regenerator2.default.mark(function _callee10(ctx) {
var _ref10 = (0, _asyncToGenerator3.default)(_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)( /*#__PURE__*/_regenerator2.default.mark(function _callee11(ctx) {
var _ref11 = (0, _asyncToGenerator3.default)(_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)( /*#__PURE__*/_regenerator2.default.mark(function _callee12(ctx) {
var _ref12 = (0, _asyncToGenerator3.default)(_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)( /*#__PURE__*/_regenerator2.default.mark(function _callee13(ctx) {
var _ref13 = (0, _asyncToGenerator3.default)(_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)( /*#__PURE__*/_regenerator2.default.mark(function _callee14(ctx) {
var _ref14 = (0, _asyncToGenerator3.default)(_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)( /*#__PURE__*/_regenerator2.default.mark(function _callee(ctx, next) {
var _ref = (0, _asyncToGenerator3.default)(_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

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