webpackJsonp([34],{789:function(t,e,a){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var u=a(15),r=n(u),s=a(129),o=n(s),c=a(313),i=a(319);e.default={namespace:"login",state:{status:void 0},effects:{login:o.default.mark(function t(e,a){var n,u=e.payload,r=a.call,s=a.put;return o.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s({type:"changeSubmitting",payload:!0});case 2:return t.next=4,r(i.fakeAccountLogin,u);case 4:return n=t.sent,t.next=7,s({type:"changeLoginStatus",payload:n});case 7:if("ok"!==n.status){t.next=10;break}return t.next=10,s(c.routerRedux.push("/"));case 10:case"end":return t.stop()}},t,this)}),logout:o.default.mark(function t(e,a){var n=a.put;return o.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n({type:"changeLoginStatus",payload:{status:!1}});case 2:return t.next=4,n(c.routerRedux.push("/user/login"));case 4:case"end":return t.stop()}},t,this)})},reducers:{changeLoginStatus:function(t,e){var a=e.payload;return(0,r.default)({},t,{status:a.status,type:a.type,submitting:!1})},changeSubmitting:function(t,e){var a=e.payload;return(0,r.default)({},t,{submitting:a})}}},t.exports=e.default}});