Commit c2ff865e by Zhang Xin

fix mock bug

parent fb5e771c
import actiontypes from '../actiontype/index'; import actiontypes from '../actiontype/index';
import mock from '../mock/index'
let domain = ENV.domain; let domain = ENV.domain;
const initStart = () => { const initStart = () => {
return { return {
type : actiontypes.INITSTART, type : actiontypes.INITSTART,
data : mock data : {}
} }
} }
const startTask = (data)=>{ const startTask = (data)=>{
......
...@@ -7,7 +7,6 @@ import { createLogger } from 'redux-logger' ...@@ -7,7 +7,6 @@ import { createLogger } from 'redux-logger'
import thunkMiddleware from 'redux-thunk'; import thunkMiddleware from 'redux-thunk';
require('./index.css'); require('./index.css');
import PageContainer from './containers/PageContainer/PageContainer' import PageContainer from './containers/PageContainer/PageContainer'
import './mock/index'
function activateVendor() { function activateVendor() {
const logMiddleware = createLogger(); const logMiddleware = createLogger();
return createStore( return createStore(
......
import Mock from 'mockjs' import Mock from 'mockjs'
import data from './data/TokeStoke.json' let data = require('./data/TokeStoke.json')
Mock.mock('/pandian',(req,res)=>{ Mock.mock('/pandian',(req,res)=>{
return data return data
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment