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
ef55513a6e
@ -11,7 +11,6 @@ import axios from 'axios';
|
||||
const checkLoginState = () => {
|
||||
return(dispatch)=> {
|
||||
axios.get('/user/status').then((res) => {
|
||||
console.log(res);
|
||||
dispatch({
|
||||
type: GET_LOGIN_STATE,
|
||||
payload: res
|
||||
|
@ -31,7 +31,7 @@ export default class Srch extends Component{
|
||||
}
|
||||
|
||||
onSelect = (value) => {
|
||||
if( value.split(":")[0] == "group" ){
|
||||
if( value.split(":")[0] == "分组" ){
|
||||
this.props.history.push('/group/'+value.split(":")[1].trim());
|
||||
} else {
|
||||
this.props.history.push('/project/'+value.split("(")[1].slice(0,-1));
|
||||
@ -45,7 +45,7 @@ export default class Srch extends Component{
|
||||
const dataSource = [];
|
||||
for(let title in res.data.data){
|
||||
res.data.data[title].map(item => {
|
||||
title == "group" ? dataSource.push( title+": "+item.groupName ): dataSource.push( title+": "+item.name+"("+item._id+")" );
|
||||
title == "group" ? dataSource.push( "分组"+": "+item.groupName ): dataSource.push( "项目"+": "+item.name+"("+item._id+")" );
|
||||
})
|
||||
}
|
||||
this.setState({
|
||||
@ -84,8 +84,13 @@ export default class Srch extends Component{
|
||||
>
|
||||
<Input
|
||||
prefix={<Icon type="search" className="srch-icon" />}
|
||||
size="large" style={{ width: 200 }}
|
||||
placeholder="search group/project"
|
||||
size="large"
|
||||
style={{
|
||||
// width: 200,
|
||||
// borderColor:"#AAA",
|
||||
// borderWidth:"1px",
|
||||
}}
|
||||
placeholder="搜索分组/项目"
|
||||
className="search-input"
|
||||
/>
|
||||
</AutoComplete>
|
||||
|
@ -2,10 +2,14 @@ $color-grey:#979DA7;
|
||||
|
||||
.search-wrapper{
|
||||
.search-input{
|
||||
border:1px solid #AAA;
|
||||
background-color: rgba(255,255,255,0.5);
|
||||
border:1px solid $color-grey;
|
||||
color: $color-grey;
|
||||
width: 2rem;
|
||||
transition: width 2s;
|
||||
//background-color:rgba(0,0,0,0.5);
|
||||
}
|
||||
.srch-icon{
|
||||
color: $color-grey;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ const HomeGuest = (props) => (
|
||||
<div className="feat-part">
|
||||
<div className="container">
|
||||
<OverPack
|
||||
playScale="0.3"
|
||||
playScale={[0.3,0.1]}
|
||||
>
|
||||
<TweenOne
|
||||
key="feat-motion-one"
|
||||
@ -52,13 +52,13 @@ const HomeGuest = (props) => (
|
||||
<Row key="feat-motion-row">
|
||||
<QueueAnim
|
||||
delay = {200}
|
||||
interval ={100}
|
||||
type = "bottom"
|
||||
interval ={200}
|
||||
leaveReverse={true}
|
||||
ease = 'easeOutQuad'
|
||||
animConfig ={{ opacity:[1,0],y: '+=30' }}
|
||||
key="feat-motion-queue"
|
||||
>
|
||||
<Col span={8} className="feat-wrapper" key="feat-wrapper-1">
|
||||
<Col span={6} className="feat-wrapper" key="feat-wrapper-1">
|
||||
<div className="feat-img">
|
||||
<Icon type="api" />
|
||||
</div>
|
||||
@ -66,7 +66,7 @@ const HomeGuest = (props) => (
|
||||
接口管理
|
||||
</p>
|
||||
</Col>
|
||||
<Col span={8} className="feat-wrapper" key="feat-wrapper-2">
|
||||
<Col span={6} className="feat-wrapper" key="feat-wrapper-2">
|
||||
<div className="feat-img">
|
||||
<Icon type="link" />
|
||||
</div>
|
||||
@ -74,7 +74,7 @@ const HomeGuest = (props) => (
|
||||
支持Mock
|
||||
</p>
|
||||
</Col>
|
||||
<Col span={8} className="feat-wrapper" key="feat-wrapper-3">
|
||||
<Col span={6} className="feat-wrapper" key="feat-wrapper-3">
|
||||
<div className="feat-img">
|
||||
<Icon type="team" />
|
||||
</div>
|
||||
@ -82,6 +82,14 @@ const HomeGuest = (props) => (
|
||||
团队协作
|
||||
</p>
|
||||
</Col>
|
||||
<Col span={6} className="feat-wrapper" key="feat-wrapper-4">
|
||||
<div className="feat-img">
|
||||
<Icon type="desktop" />
|
||||
</div>
|
||||
<p className="feat-title">
|
||||
可部署
|
||||
</p>
|
||||
</Col>
|
||||
</QueueAnim>
|
||||
</Row>
|
||||
</OverPack>
|
||||
@ -132,7 +140,7 @@ class Home extends Component {
|
||||
<div className="user-home">
|
||||
<div className="user-des">
|
||||
<p className="title">YAPI</p>
|
||||
<p className="des">一个高效,易用,功能强大的api管理系统</p>
|
||||
<p className="des">一个高效,易用,可部署的Api管理系统</p>
|
||||
<div className="btn">
|
||||
<Button type="primary" size="large">
|
||||
<Link to="/group" onClick={this.toStart}>开始</Link>
|
||||
|
@ -111,43 +111,48 @@ $color-black-lighter: #404040;
|
||||
height:100%;
|
||||
position: relative;
|
||||
}
|
||||
.feat-wrapper{
|
||||
.feat-wrapper {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
.feat-img{
|
||||
.feat-img {
|
||||
height: 1.2rem;
|
||||
width: 1.2rem;
|
||||
border-radius: 100%;
|
||||
margin-bottom: .2rem;
|
||||
color: $color-white;
|
||||
i{
|
||||
i {
|
||||
line-height: 1.2rem;
|
||||
font-size: .6rem;
|
||||
}
|
||||
}
|
||||
.feat-title{
|
||||
.feat-title {
|
||||
font-size: .16rem;
|
||||
line-height: .3rem;
|
||||
color: #333;
|
||||
}
|
||||
&:first-child{
|
||||
.feat-img{
|
||||
&:first-child {
|
||||
.feat-img {
|
||||
background-color: rgb(248, 88, 96);
|
||||
}
|
||||
}
|
||||
&:nth-child(2){
|
||||
.feat-img{
|
||||
&:nth-child(2) {
|
||||
.feat-img {
|
||||
background-color: #f9bb13;
|
||||
}
|
||||
}
|
||||
&:nth-child(3){
|
||||
.feat-img{
|
||||
&:nth-child(3) {
|
||||
.feat-img {
|
||||
background-color: #20ab8e;
|
||||
}
|
||||
}
|
||||
&:nth-child(4) {
|
||||
.feat-img {
|
||||
background-color: rgb(66, 165, 245);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,8 @@ export default (state = initialState, action) => {
|
||||
...state,
|
||||
isLogin: (action.payload.data.errcode == 0),
|
||||
loginState: (action.payload.data.errcode == 0)?MEMBER_STATUS:GUEST_STATUS,
|
||||
userName: action.payload.data.data ? action.payload.data.data.username : null
|
||||
userName: action.payload.data.data ? action.payload.data.data.username : null,
|
||||
uid: action.payload.data.data ? action.payload.data.data._id : null
|
||||
};
|
||||
}
|
||||
case LOGIN: {
|
||||
|
@ -25,7 +25,8 @@ export default (state = initialState, action) => {
|
||||
...state,
|
||||
isLogin: (action.payload.data.errcode == 0),
|
||||
loginState: (action.payload.data.errcode == 0)?MEMBER_STATUS:GUEST_STATUS,
|
||||
userName: action.payload.data.data ? action.payload.data.data.username : null
|
||||
userName: action.payload.data.data ? action.payload.data.data.username : null,
|
||||
uid: action.payload.data.data ? action.payload.data.data._id : null
|
||||
};
|
||||
}
|
||||
case LOGIN: {
|
||||
|
Loading…
Reference in New Issue
Block a user