From 967d628205af6abe6e75dbb0a219863951c3e9ad Mon Sep 17 00:00:00 2001 From: "wenbo.dong" Date: Tue, 10 Oct 2017 18:36:18 +0800 Subject: [PATCH 1/3] =?UTF-8?q?docs:=20=E6=96=87=E6=A1=A3=E9=93=BE?= =?UTF-8?q?=E6=8E=A5=E9=83=BD=E6=8C=87=E5=90=91yapi.ymfe.org?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/components/Header/Header.js | 4 ++-- client/containers/Home/Home.js | 4 ++-- .../Project/Interface/InterfaceList/InterfaceEditForm.js | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/client/components/Header/Header.js b/client/components/Header/Header.js index 16e02fe6..12de22a6 100755 --- a/client/components/Header/Header.js +++ b/client/components/Header/Header.js @@ -34,7 +34,7 @@ const tipAdd = (
); const tipDoc = (

使用文档 推荐!

-

初次使用 YApi,强烈建议你阅读 使用文档 ,我们为你提供了通俗易懂的快速入门教程,更有详细的使用说明,欢迎阅读!

+

初次使用 YApi,强烈建议你阅读 使用文档 ,我们为你提供了通俗易懂的快速入门教程,更有详细的使用说明,欢迎阅读!

); MenuUser.propTypes={ @@ -93,7 +93,7 @@ const ToolUser = (props)=> { >
  • - +
  • diff --git a/client/containers/Home/Home.js b/client/containers/Home/Home.js index b595327b..5cca45c6 100755 --- a/client/containers/Home/Home.js +++ b/client/containers/Home/Home.js @@ -24,7 +24,7 @@ const HomeGuest = () => (
    YAPI - 使用文档 + 使用文档
    @@ -210,7 +210,7 @@ class Home extends Component {
    - +
    diff --git a/client/containers/Project/Interface/InterfaceList/InterfaceEditForm.js b/client/containers/Project/Interface/InterfaceList/InterfaceEditForm.js index fc682817..e0d48a01 100755 --- a/client/containers/Project/Interface/InterfaceList/InterfaceEditForm.js +++ b/client/containers/Project/Interface/InterfaceList/InterfaceEditForm.js @@ -734,7 +734,7 @@ class InterfaceEditForm extends Component {
    -

    基于mockjs和json5,可直接写mock模板和注释,具体使用方法请 window.open('https://ued.qunar.com/yapi/mock.html', '_blank')}>查看文档

    +

    基于mockjs和json5,可直接写mock模板和注释,具体使用方法请 window.open('https://yapi.ymfe.org/mock.html', '_blank')}>查看文档

    From 4c924ff064216139030f4950be7afc2b9fd6f590 Mon Sep 17 00:00:00 2001 From: "wenbo.dong" Date: Tue, 10 Oct 2017 19:03:52 +0800 Subject: [PATCH 2/3] =?UTF-8?q?fix:=20=E9=A1=B9=E7=9B=AE=E7=8E=AF=E5=A2=83?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E5=9B=BE=E6=A0=87=E5=AF=B9=E9=BD=90=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/containers/Project/Setting/ProjectEnv/ProjectEnv.js | 4 ++-- client/containers/Project/Setting/Setting.scss | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/client/containers/Project/Setting/ProjectEnv/ProjectEnv.js b/client/containers/Project/Setting/ProjectEnv/ProjectEnv.js index b9df5f0e..9925c04d 100644 --- a/client/containers/Project/Setting/ProjectEnv/ProjectEnv.js +++ b/client/containers/Project/Setting/ProjectEnv/ProjectEnv.js @@ -135,7 +135,7 @@ class PrpjectEnv extends Component { const envSettingItems = envs.map((k, index) => { const secondIndex = 'next' + index; // 为保证key的唯一性 return ( - + +

    在这里添加项目的环境配置

    你可以添加多个环境,用于区分不同的使用场景。

    diff --git a/client/containers/Project/Setting/Setting.scss b/client/containers/Project/Setting/Setting.scss index 3022d280..3a42264e 100755 --- a/client/containers/Project/Setting/Setting.scss +++ b/client/containers/Project/Setting/Setting.scss @@ -192,3 +192,10 @@ } } } + +.env-first-row { + .ant-col-2 { + position: relative; + bottom: .16rem; + } +} From 7a076027ba4d209d15b0c7f2ee46dbf2b0be066b Mon Sep 17 00:00:00 2001 From: zwjamnsss Date: Tue, 10 Oct 2017 20:02:17 +0800 Subject: [PATCH 3/3] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E5=90=8D=E9=82=AE=E7=AE=B1bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/controllers/group.js | 8 +++++++- server/controllers/project.js | 8 +++++++- server/models/group.js | 4 +--- server/models/project.js | 2 +- 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/server/controllers/group.js b/server/controllers/group.js index e30658e4..03334bfb 100755 --- a/server/controllers/group.js +++ b/server/controllers/group.js @@ -293,7 +293,13 @@ class groupController extends baseController { try { let groupInst = yapi.getInst(groupModel); let group = await groupInst.get(params.id); - ctx.body = yapi.commons.resReturn(group.members); + const members = []; + for(let i = 0, len = group.members.length; i < len; i++) { + let item = group.members[i]; + let member = await this.getUserdata(item.uid, item.role) + members.push(member) + } + ctx.body = yapi.commons.resReturn(members); } catch (e) { ctx.body = yapi.commons.resReturn(null, 402, e.message); } diff --git a/server/controllers/project.js b/server/controllers/project.js index afff1936..7eb7a80c 100755 --- a/server/controllers/project.js +++ b/server/controllers/project.js @@ -306,7 +306,13 @@ class projectController extends baseController { try { let project = await this.Model.get(params.id); - ctx.body = yapi.commons.resReturn(project.members); + const members = []; + for(let i = 0, len = project.members.length; i < len; i++) { + let item = project.members[i]; + let member = await this.getUserdata(item.uid, item.role) + members.push(member) + } + ctx.body = yapi.commons.resReturn(members); } catch (e) { ctx.body = yapi.commons.resReturn(null, 402, e.message); } diff --git a/server/models/group.js b/server/models/group.js index f6d1e05a..9218c6d3 100755 --- a/server/models/group.js +++ b/server/models/group.js @@ -17,9 +17,7 @@ class groupModel extends baseModel { members: [ { uid: Number, - role: {type: String, enum:['owner', 'dev']}, - username: String, - email: String + role: {type: String, enum:['owner', 'dev']} } ] }; diff --git a/server/models/project.js b/server/models/project.js index 2addb656..76bba3c4 100755 --- a/server/models/project.js +++ b/server/models/project.js @@ -15,7 +15,7 @@ class projectModel extends baseModel { group_id: { type: Number, required: true }, project_type: {type:String, required: true, enum: ['public', 'private']}, members: [ - {uid: Number, role: {type: String, enum:['owner', 'dev']},username: String, email: String} + {uid: Number, role: {type: String, enum:['owner', 'dev']}} ], env: [ { name: String, domain: String }