我的reduce放到index.jsx上出错了
先给大家看下错误信息
即:
require.js:1881 GET http://127.0.0.1:8080/static/page/declarationPlan/app/reducers/checkOwnCandidateMethodPostFormReduce.js req.load @ require.js:1881load @ require.js:1625load @ require.js:824fetch @ require.js:814check @ require.js:844enable @ require.js:1141enable @ require.js:1497(anonymous function) @ require.js:1126(anonymous function) @ require.js:129each @ require.js:57enable @ require.js:1088init @ require.js:778callGetModule @ require.js:1168completeLoad @ require.js:1530onScriptLoad @ require.js:1657
require.js:163 Uncaught Error: Script error for: page/declarationPlan/app/reducers/checkOwnCandidateMethodPostFormReduce.jsx
这个reduce我是复制别的reduce的,那个被复制的没什么问题,加了个新的就不对了
下面我在发下,那个错误reduce的代码吧:
import Immutable from 'immutable'
import {ADD_MODAL,ADD_CONFIRM_LOADING,CANCLE_MODAL,ADD_CONFIRM_LOADED,MODAL_DATA_LOADING,MODAL_DATA_LOADED,MODAL_TABLE_FOOT_BTN_DELETEING,MODAL_TABLE_FOOT_BTN_DELETED } from '../constants/commonPostFormActionTypes'
const initialState = Immutable.fromJS({
addModleVisible: false,
confirmLoading: false,
fieldValues:{},//form的表key:value单值,初始化表单值
//table的变量
data: [],
pagination: {
current:1,//当前页数,用于请求页面
//defaultCurrent:1,// 默认的pagination的当前页数
total:0,//数据总数
defaultPageSize:10,//初始的每页条数
pageSize:10,//每页条数,默认初始值10
page:1//预设当前请求的页面为第1页,后台参数
},
loading: false,
footBtn:{
deleteBtnLoading:false,
},
}
);
export default function checkOwnCandidateMethodPostFormReduce(state = initialState, action) {
switch(action.type) {
case ADD_MODAL:
let stateTemp = {
addModleVisible: true,
fieldValues:action.data
}
return state.merge(stateTemp);
case ADD_CONFIRM_LOADING:
return state.merge({confirmLoading: true})
case ADD_CONFIRM_LOADED:
return state.merge({confirmLoading: false})
case CANCLE_MODAL:
return state.merge({addModleVisible: false})
case MODAL_DATA_LOADING:
return state.merge({loading: true})
case MODAL_DATA_LOADED:
let pagination = {
pageSize:action.data.pageSize,
total: action.data.totalCount,
current: action.data.pageNo,
page: action.data.pageNo,
};
return state.merge({
loading: false,
data: action.data.list,
pagination:pagination
})
case MODAL_TABLE_FOOT_BTN_DELETEING:
return state.merge({footBtn:{deleteBtnLoading:true}});
case MODAL_TABLE_FOOT_BTN_DELETED:
return state.merge({footBtn:{deleteBtnLoading:false}});
default:
return state
}
}
代码应该是没什么问题的,就改了一个export的名字。别的没动:(
我在index.jsx吧错误的接口关闭了就好了,所以就是那个reduce的问题,那问题出在了哪里??
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
发现fis有很多的BUG,这个原因不知道是为什么,但是我把c盘存放fis3的文件删掉之后,再重新release之后,就好了:D