(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/login"],{"0a1d":function(e,n,o){"use strict";o.r(n);var t=o("3168"),c=o("2bf2");for(var i in c)"default"!==i&&function(e){o.d(n,e,(function(){return c[e]}))}(i);o("f079");var s,a=o("f0c5"),u=Object(a["a"])(c["default"],t["b"],t["c"],!1,null,null,null,!1,t["a"],s);n["default"]=u.exports},"1e14":function(e,n,o){"use strict";(function(e){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var t=c(o("0286"));function c(e){return e&&e.__esModule?e:{default:e}}var i={data:function(){return{tips:"获取验证码",value:"",code:"",wxCode:"",session_key:"",phone:"",encryptedData:"",iv:""}},onLoad:function(){this.initLogin()},methods:{initLogin:function(){var n=this;e.login({success:function(o){o.code?(n.wxCode=o.code,console.log(o.code,"WXcode"),e.request({url:"https://api.weixin.qq.com/sns/jscode2session",method:"GET",data:{appid:"wxdc8ecff90bf3f4c3",secret:"34b1f34ae036053ec183986c3ace7886",js_code:o.code,grant_type:"authorization_code"},success:function(e){n.openid=e.data.openid,n.unionid=e.data.unionid,n.session_key=e.data.session_key}})):console.log("登录失败！"+o.errMsg)}})},getPhoneNumber:function(n){var o=this;if("getPhoneNumber:ok"==n.detail.errMsg){console.log("用户点击了接受",n);var c=new t.default("wxdc8ecff90bf3f4c3",this.session_key),i=c.decryptData(n.detail.encryptedData,n.detail.iv);this.phone=i.phoneNumber,console.log(this.phone),e.$u.http.post("/api/login/phone",{phone:this.phone,code:this.wxCode}).then((function(n){console.log(n),e.setStorageSync("token",n.token),e.setStorageSync("code",o.wxCode),e.setStorageSync("phone",o.phone),o.$store.commit("setToken",n.token),o.$store.commit("getUserInfo",{code:o.wxCode,phone:o.phone}),e.showToast({title:"登录成功",icon:"success",duration:1e3}),e.switchTab({url:"/pages/index/index"})})).catch((function(e){console.log(e)}))}else console.log("用户点击了拒绝")},gootherNuber:function(){e.navigateTo({url:"otherNumlogin"})}}};n.default=i}).call(this,o("543d")["default"])},"2bf2":function(e,n,o){"use strict";o.r(n);var t=o("1e14"),c=o.n(t);for(var i in t)"default"!==i&&function(e){o.d(n,e,(function(){return t[e]}))}(i);n["default"]=c.a},3168:function(e,n,o){"use strict";var t;o.d(n,"b",(function(){return c})),o.d(n,"c",(function(){return i})),o.d(n,"a",(function(){return t}));var c=function(){var e=this,n=e.$createElement;e._self._c},i=[]},"47ef":function(e,n,o){"use strict";(function(e){o("b434");t(o("66fd"));var n=t(o("0a1d"));function t(e){return e&&e.__esModule?e:{default:e}}wx.__webpack_require_UNI_MP_PLUGIN__=o,e(n.default)}).call(this,o("543d")["createPage"])},ecc8:function(e,n,o){},f079:function(e,n,o){"use strict";var t=o("ecc8"),c=o.n(t);c.a}},[["47ef","common/runtime","common/vendor"]]]);