(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/public/wxLogin"],{"2a5d":function(e,t,n){"use strict";n.r(t);var o=n("8e82"),i=n("6453");for(var a in i)["default"].indexOf(a)<0&&function(e){n.d(t,e,(function(){return i[e]}))}(a);n("9fe9");var c=n("f0c5"),r=Object(c["a"])(i["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],void 0);t["default"]=r.exports},6453:function(e,t,n){"use strict";n.r(t);var o=n("c698"),i=n.n(o);for(var a in o)["default"].indexOf(a)<0&&function(e){n.d(t,e,(function(){return o[e]}))}(a);t["default"]=i.a},"789f":function(e,t,n){},7930:function(e,t,n){"use strict";(function(e,t){var o=n("4ea4");n("2e1c");o(n("66fd"));var i=o(n("2a5d"));e.__webpack_require_UNI_MP_PLUGIN__=n,t(i.default)}).call(this,n("bc2e")["default"],n("543d")["createPage"])},"8e82":function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return i})),n.d(t,"a",(function(){}));var o=function(){var e=this.$createElement;this._self._c},i=[]},"9fe9":function(e,t,n){"use strict";var o=n("789f"),i=n.n(o);i.a},c698:function(e,t,n){"use strict";(function(e,o){var i=n("4ea4");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n("9523")),c=n("26cb"),r=(n("8199"),n("9411")),s=n("0c0e");function u(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 f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){(0,a.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var l={data:function(){return{userInfo:{},code:"",selected:!1,disabled:!1,MaskShow:!1,cache_key:"",iv:"",encryptedData:"",istype:!1}},onShow:function(e){this.loadData()},methods:f(f({},(0,c.mapMutations)(["login","setUserInfo"])),{},{checkboxChange:function(){this.istype=!this.istype,console.log(this.istype)},loadData:function(){console.log(1),console.log(3);var t=this;e.login({success:function(e){t.code=e.code},fill:function(e){console.log(e)}})},userInfoData:function(e){if(this.istype){var t=e.detail;t.code=this.code,this.loadMp(t),this.disabled=!0}else this.$api.msg("请查看并同意隐私政策")},loadMp:function(e){var t=this;(0,r.wechatMpAuth)({code:e.code,iv:e.iv,encryptedData:e.encryptedData}).then((function(e){var n=e.data;t.wchatAuth(n)}))},wchatAuth:function(e){o.setStorageSync("token",e.userinfo.token),this.cache_key=e.cache_key,this.login(),this.setUserInfo(e.userinfo),null==e.userinfo.mobile||""==e.userinfo.mobile?this.MaskShow=!0:this.ToIndex()},PhoneNumber:function(e){var t=this;t.MaskShow=!1,t.iv=e.detail.iv,t.encryptedData=e.detail.encryptedData,(0,s.bangding)({flag:1,cache_key:t.cache_key,code:t.code,iv:t.iv,encryptedData:t.encryptedData}).then((function(e){t.$api.msg(e.msg),t.GetUser(),t.$api.msg(e.msg),t.$nextTick((function(){t.ToIndex()}))})).catch((function(e){console.log(e.message)}))},GetUser:function(){var e=this;(0,s.getUserInfo)({}).then((function(t){var n=t.data;e.setUserInfo(n),console.log(o.getStorageSync("userInfo"),"userInfo")})).catch((function(e){console.log(e)}))},ToIndex:function(){o.switchTab({url:"/pages/index/index"});var e=o.getStorageSync("present")||"/pages/index/index";"pages/index/index"==e&&(e="/pages/index/index"),o.switchTab({url:e,fail:function(t){o.navigateTo({url:e,fail:function(e){o.navigateTo({url:"/pages/index/index"})}})}})},Tologin:function(){o.navigateTo({url:"/pages/public/login"})},agreement:function(){o.navigateTo({url:"/pages/public/agreement"})},privacy:function(){o.navigateTo({url:"/pages/public/privacy"})}})};t.default=l}).call(this,n("bc2e")["default"],n("543d")["default"])}},[["7930","common/runtime","common/vendor"]]]);