(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/public/wxLogin"],{"027e":function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return a})),n.d(t,"a",(function(){}));var o=function(){var e=this.$createElement;this._self._c},a=[]},"05ca":function(e,t,n){"use strict";n.r(t);var o=n("027e"),a=n("9067");for(var i in a)["default"].indexOf(i)<0&&function(e){n.d(t,e,(function(){return a[e]}))}(i);n("69f9");var c=n("f0c5"),r=Object(c["a"])(a["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],void 0);t["default"]=r.exports},"3bea":function(e,t,n){"use strict";(function(e,t){var o=n("4ea4");n("ec58");o(n("66fd"));var a=o(n("05ca"));e.__webpack_require_UNI_MP_PLUGIN__=n,t(a.default)}).call(this,n("bc2e")["default"],n("543d")["createPage"])},"69f9":function(e,t,n){"use strict";var o=n("fb85"),a=n.n(o);a.a},9067:function(e,t,n){"use strict";n.r(t);var o=n("d1af"),a=n.n(o);for(var i in o)["default"].indexOf(i)<0&&function(e){n.d(t,e,(function(){return o[e]}))}(i);t["default"]=a.a},d1af:function(e,t,n){"use strict";(function(e,o){var a=n("4ea4");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=a(n("9523")),c=n("26cb"),r=(n("28a8"),n("15bc")),s=n("5a77");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,i.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"])},fb85:function(e,t,n){}},[["3bea","common/runtime","common/vendor"]]]);