(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["plugins/mch/mch/login/login"],{"17e0":function(e,t,n){"use strict";var o=n("e188"),r=n.n(o);r.a},3649:function(e,t,n){"use strict";var o;n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return a})),n.d(t,"a",(function(){return o}));var r=function(){var e=this,t=e.$createElement;e._self._c},a=[]},"38ea":function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n("2f62");function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var c={name:"login",computed:a({},(0,o.mapState)({appImg:function(e){return e.mallConfig.plugin.mch.app_image}})),data:function(){return{form:{username:"",password:""}}},onLoad:function(){e.removeStorage({key:"MCH2019"})},methods:{navApply:function(){e.navigateTo({url:"/plugins/mch/apply/apply"})},login:function(){var t=this;t.$showLoading({title:"登陆中"}),t.$request({url:t.$api.mch.login,method:"POST",data:{username:t.form.username,password:t.form.password}}).then((function(n){t.$hideLoading(),0===n.code?t.loginSuccess(n.data):e.showToast({icon:"none",title:n.msg})})).catch((function(){t.$hideLoading()}))},wxLogin:function(){var t=this;t.$showLoading({title:"登陆中"}),t.$request({url:t.$api.mch.mch_status,data:{is_review_status:1}}).then((function(n){if(t.$hideLoading(),0===n.code){var o=n.data.mch;if(o&&1==o.review_status)return void t.loginSuccess(n.data);e.showToast({icon:"none",title:"账户不存在或账户异常"})}else e.showToast({icon:"none",title:n.msg})})).catch((function(){t.$hideLoading()}))},loginSuccess:function(t){e.showToast({title:"登陆成功"}),e.setStorageSync("MCH2019",t),e.redirectTo({url:"/plugins/mch/mch/myshop/myshop"})}}};t.default=c}).call(this,n("543d")["default"])},"4c5b":function(e,t,n){"use strict";n.r(t);var o=n("38ea"),r=n.n(o);for(var a in o)"default"!==a&&function(e){n.d(t,e,(function(){return o[e]}))}(a);t["default"]=r.a},aa1d:function(e,t,n){"use strict";(function(e){n("b8bc");o(n("66fd"));var t=o(n("e639"));function o(e){return e&&e.__esModule?e:{default:e}}e(t.default)}).call(this,n("543d")["createPage"])},e188:function(e,t,n){},e639:function(e,t,n){"use strict";n.r(t);var o=n("3649"),r=n("4c5b");for(var a in r)"default"!==a&&function(e){n.d(t,e,(function(){return r[e]}))}(a);n("17e0");var i,c=n("f0c5"),u=Object(c["a"])(r["default"],o["b"],o["c"],!1,null,"50b5aa7e",null,!1,o["a"],i);t["default"]=u.exports}},[["aa1d","common/runtime","common/vendor"]]]);