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