git 忽略大小写 文件夹修改

This commit is contained in:
waliang.wang 2017-07-20 16:57:21 +08:00
parent 689e4d2081
commit fa6cd2ab22
6 changed files with 45 additions and 20 deletions

View File

@ -7,9 +7,8 @@ import {
GET_INTERFACE_REQ_PARAMS,
GET_INTERFACE_RES_PARAMS,
SAVE_INTERFACE_FORMS,
PUSH_INTERFACE_NAME
// ADD_INTERFACE_RES_PARAMS,
// DELETE_INTERFACE_RES_PARAMS
PUSH_INTERFACE_NAME,
PUSH_INTERFACE_METHOD
} from '../constants/action-types.js'
export function pushInputValue (value) {
@ -69,11 +68,17 @@ export function saveForms (value) {
}
export function pushInterfaceName (value) {
console.log(value)
return {
type: PUSH_INTERFACE_NAME,
payload: value
}
}
export function pushInterfaceMethod (value) {
return {
type: PUSH_INTERFACE_METHOD,
payload: value
}
}

View File

@ -7,9 +7,8 @@ import {
GET_INTERFACE_REQ_PARAMS,
GET_INTERFACE_RES_PARAMS,
SAVE_INTERFACE_FORMS,
PUSH_INTERFACE_NAME
// ADD_INTERFACE_RES_PARAMS,
// DELETE_INTERFACE_RES_PARAMS
PUSH_INTERFACE_NAME,
PUSH_INTERFACE_METHOD
} from '../constants/action-types.js'
export function pushInputValue (value) {
@ -69,11 +68,17 @@ export function saveForms (value) {
}
export function pushInterfaceName (value) {
console.log(value)
return {
type: PUSH_INTERFACE_NAME,
payload: value
}
}
export function pushInterfaceMethod (value) {
return {
type: PUSH_INTERFACE_METHOD,
payload: value
}
}

View File

@ -13,6 +13,7 @@ export const DELETE_INTERFACE_SEQ_HEADER = 'DELETE_INTERFACE_SEQ_HEADER'
export const GET_INTERFACE_REQ_PARAMS = 'GET_INTERFACE_REQ_PARAMS'
export const GET_INTERFACE_RES_PARAMS = 'GET_INTERFACE_RES_PARAMS'
export const SAVE_INTERFACE_FORMS = 'SAVE_INTERFACE_FORMS'
export const PUSH_INTERFACE_METHOD = 'PUSH_INTERFACE_METHOD'
// group
export const FETCH_GROUP_LIST = 'FETCH_GROUP_LIST'

View File

@ -15,7 +15,8 @@ import { saveForms } from '../../actions/addInterface.js'
@connect(
state => {
return {
reqParams: state.addInterface.reqParams
reqParams: state.addInterface.reqParams,
methode: state.addInterface.method
}
},
{
@ -26,6 +27,7 @@ import { saveForms } from '../../actions/addInterface.js'
class AddInterface extends Component {
static propTypes = {
reqParams: PropTypes.string,
methode: PropTypes.string,
saveForms: PropTypes.func
}
@ -63,12 +65,11 @@ class AddInterface extends Component {
axios.post('/interface/add', params)
.then(data => {
console.log(data)
console.log(this.props.methode)
})
.catch(e => {
console.log(e)
})
console.log(this.props.reqParams)
}
render () {

View File

@ -5,19 +5,22 @@ import { Select, Input } from 'antd'
import { autobind } from 'core-decorators'
import {
pushInputValue,
pushInterfaceName
pushInterfaceName,
pushInterfaceMethod
} from '../../../actions/addInterface.js'
@connect(
state => {
return {
method: state.addInterface.method,
reqInputVal: state.addInterface.inputValue,
interfaceName: state.addInterface.interfaceName
}
},
{
pushInputValue,
pushInterfaceName
pushInterfaceName,
pushInterfaceMethod
}
)
@ -25,7 +28,9 @@ class ReqMethod extends Component {
static propTypes = {
pushInputValue: PropTypes.func,
pushInterfaceName: PropTypes.func,
pushInterfaceMethod: PropTypes.func,
inputValue: PropTypes.string,
method: PropTypes.string,
interfaceName: PropTypes.string
}
@ -33,8 +38,10 @@ class ReqMethod extends Component {
super(props)
}
@autobind
handleChange (value) {
console.log(`selected ${value}`)
this.props.pushInterfaceMethod(value)
}
@autobind
@ -45,15 +52,14 @@ class ReqMethod extends Component {
}
@autobind
getInterfaceValue () {
// const name = e.target.value
console.log(this.props.pushInterfaceName)
// this.props.pushInterfaceName(name)
getInterfaceValue (e) {
const name = e.target.value
this.props.pushInterfaceName(name)
}
render () {
const { Option } = Select
console.log(this.props.interfaceName)
console.log(this.props.method)
return (
<table>
<tbody>

View File

@ -7,13 +7,15 @@ import {
GET_INTERFACE_REQ_PARAMS,
GET_INTERFACE_RES_PARAMS,
SAVE_INTERFACE_FORMS,
PUSH_INTERFACE_NAME
PUSH_INTERFACE_NAME,
PUSH_INTERFACE_METHOD
} from '../../constants/action-types.js'
const initialState = {
inputValue: '',
tagValue: '',
headerValue: '',
methode: '',
// 默认请求头部有一条数据
seqGroup: [
{
@ -73,6 +75,11 @@ export default (state = initialState, action) => {
...state,
resParams: action.payload
}
case PUSH_INTERFACE_METHOD:
return {
...state,
methode: action.payload
}
default:
return state
}