(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/public/wxLogin"],{"285a":function(e,t,n){"use strict";var o=n("6dd7"),c=n.n(o);c.a},"2fa6":function(e,t,n){"use strict";(function(e,o){var c=n("4ea4");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=c(n("9523")),r=n("bde5"),a=n("3e36"),u=n("ba96"),s=n("26cb");function d(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 l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){(0,i.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var f={data:function(){return{userInfo:{},code:"",isclick:!1,iv1:"",encryptedData1:"",hasphone:!1}},onLoad:function(){this.loadData()},computed:{},methods:l(l({},(0,s.mapMutations)("user",["login","setUserInfo"])),{},{close:function(){this.$refs.popupsq.close()},getPhoneNumber:function(t){if(console.log(t,"e+++++++++++++++"),"getPhoneNumber:ok"!=t.detail.errMsg)return this.isclick=!1,void e.showToast({title:"您拒绝了请求,不能正常使用小程序",icon:"error",duration:2e3});console.log("chenggong++++++++++++++"),this.hasphone=!0,this.iv1=t.detail.iv,this.encryptedData1=t.detail.encryptedData,this.$refs.popupsq.open()},loadData:function(){var e=this;(0,a.loginWinxinMp)().then((function(t){console.log(t,"ddddddddddddddddddddddd"),o.login({success:function(t){console.log(t,"loginWinxinMp"),e.code=t.code,console.log(e.code,"wxlogin.code++++++")},fill:function(e){console.log(e)}})}))},userInfoData:function(){var t=this;t.isclick||(t.isclick=!0,o.getUserProfile({desc:"用于完善会员资料",success:function(n){console.log(n,"that.userInfo+++++++++++++++++++"),t.userInfo=n,e.showLoading({title:"授权中",mask:!0}),t.loadMp()},fail:function(n){t.isclick=!1,e.showToast({title:"您拒绝了请求,不能正常使用小程序",icon:"error",duration:2e3})}}))},loadMp:function(){var t=this,n=t.userInfo;console.log(n);var o=e.getStorageSync("spread")||"",c=e.getStorageSync("spread_code")||"";(0,u.wechatMpAuth)({code:t.code,iv:n.iv,iv1:t.iv1,encryptedData1:t.encryptedData1,encryptedData:n.encryptedData,spread_spid:o,spread_code:c}).then((function(e){var n=e.data;t.wchatAuth(n),console.log(n,"wechatMpAuth++++++++++++++++++++++++++")})).catch((function(e){}))},wchatAuth:function(t){var n=this;e.setStorageSync("token",t.token),console.log(t.token,"token++++++++++++++"),(0,r.getUserInfo)({}).then((function(t){console.log("userInfo+++++++++++",t),n.login(),e.hideLoading(),n.setUserInfo(t.data);var o=e.getStorageSync("present")||"/pages/index/index";"pages/shop/product"==o&&(o="/pages/index/index"),e.switchTab({url:o,fail:function(t){e.navigateTo({url:o,fail:function(t){e.navigateTo({url:"/pages/index/index"})}})}})}))}})};t.default=f}).call(this,n("543d")["default"],n("bc2e")["default"])},"5e3d":function(e,t,n){"use strict";(function(e,t){var o=n("4ea4");n("3e59");o(n("66fd"));var c=o(n("6509"));e.__webpack_require_UNI_MP_PLUGIN__=n,t(c.default)}).call(this,n("bc2e")["default"],n("543d")["createPage"])},6509:function(e,t,n){"use strict";n.r(t);var o=n("ce3c"),c=n("9e98");for(var i in c)["default"].indexOf(i)<0&&function(e){n.d(t,e,(function(){return c[e]}))}(i);n("285a");var r=n("f0c5"),a=Object(r["a"])(c["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],void 0);t["default"]=a.exports},"6dd7":function(e,t,n){},"9e98":function(e,t,n){"use strict";n.r(t);var o=n("2fa6"),c=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"]=c.a},ce3c:function(e,t,n){"use strict";n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return i})),n.d(t,"a",(function(){return o}));var o={uniPopup:function(){return n.e("components/uni-popup/uni-popup").then(n.bind(null,"77eb"))}},c=function(){var e=this,t=e.$createElement;e._self._c;e._isMounted||(e.e0=function(t){!e.isclick&&e.userInfoData()},e.e1=function(t){!e.isclick&&e.userInfoData()})},i=[]}},[["5e3d","common/runtime","common/vendor"]]]);