(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["plugins/mch/mch/login/login"],{"116d":function(t,e,n){"use strict";n.r(e);var o=n("45d7"),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},"3b25":function(t,e,n){"use strict";var o;n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){return o}));var r=function(){var t=this,e=t.$createElement;t._self._c},i=[]},"45d7":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){a(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 a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var c={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(){this.$commonLoad.onload(),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:"登陆成功"}),this.$storage.setStorageSync("MCH2019",e),t.redirectTo({url:"/plugins/mch/mch/myshop/myshop"})}}};e.default=c}).call(this,n("543d")["default"])},"89cd":function(t,e,n){},"996b":function(t,e,n){"use strict";n.r(e);var o=n("3b25"),r=n("116d");for(var i in r)"default"!==i&&function(t){n.d(e,t,(function(){return r[t]}))}(i);n("df38");var a,c=n("f0c5"),u=Object(c["a"])(r["default"],o["b"],o["c"],!1,null,"dda8c792",null,!1,o["a"],a);e["default"]=u.exports},bf58:function(t,e,n){"use strict";(function(t){n("2d0a");o(n("66fd"));var e=o(n("996b"));function o(t){return t&&t.__esModule?t:{default:t}}t(e.default)}).call(this,n("543d")["createPage"])},df38:function(t,e,n){"use strict";var o=n("89cd"),r=n.n(o);r.a}},[["bf58","common/runtime","common/vendor"]]]);