Skip to content
  • This project
    • Loading...
  • Sign in

ethan / ant-admin-pro

Go to a project
Toggle navigation
Toggle navigation pinning
  • Projects
  • Groups
  • Snippets
  • Help
  • Project
  • Activity
  • Repository
  • Pipelines
  • Graphs
  • Issues 0
  • Merge Requests 0
  • Wiki
  • Network
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Network
  • Compare
  • Branches
  • Tags
Switch branch/tag
  • ant-admin-pro
  • src
  • models
  • areas.js
  • ethanlamzs's avatar
    添加下拉选择器 · 89be49ae
    ethanlamzs committed 2018-01-25 15:44:51 +0800
    89be49ae Browse Files
areas.js 560 Bytes
Raw Blame History Permalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
import { queryWXArea } from '../services/devutil'

export default {

    namespace: 'areas',
    
    state : {
        list : [],
    },

    effects:{

        *fetch({payload},{call,put}){
            const response = yield call(queryWXArea,payload);
            yield put({
                type : 'loadDatas',
                payload : response,
            });
        }
    },

    reducers:{

        loadDatas(state,action){
            return {
                ...state,
                list:action.payload.list,
            };
        },  
    },

};