(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/init/index"],{"073b":function(e,n,o){"use strict";(function(e){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o={data:function(){return{nickName:"",avatarUrl:"",OpenId:""}},methods:{getUserInfo:function(){var n=this;wx.login({success:function(o){console.log(o),o.code?e.request({url:"https://admin.mindepoch.com:8089/wechat/AppletWeChatLogin",method:"POST",header:{"Content-Type":"application/x-www-form-urlencoded"},data:{code:o.code},success:function(o){console.log("登录成功",o),n.OpenId=o.data.OpenId,e.getUserInfo({withCredentials:!0,lang:"zh_CN",success:function(e){var o=e.userInfo;console.log("用户昵称为："+o.nickName),console.log("用户头像地址为："+o.avatarUrl),n.nickName=o.nickName,n.avatarUrl=o.avatarUrl,n.$globalData.userPhoto=o.avatarUrl},fail:function(){console.error("获取用户信息失败")}})}}):console.error("登录失败！"+o.errMsg)}}),e.getUserProfile({desc:"用于完善用户信息",success:function(e){console.log(e)},fail:function(e){console.log(e)}})},getPhoneNumber:function(e){console.log("e",e),e.detail.code?this.sendPhoneNumberToServer(e.detail.code,"no"):this.sendPhoneNumberToServer(e.detail.code,"yes")},sendPhoneNumberToServer:function(n,o){var t=this;e.request({url:"https://admin.mindepoch.com:8089/wechat/RegisterAndLoginWXUserPhone",method:"POST",data:{username:this.nickName,openid:this.OpenId,phone_code:"no"==o?n:"",reject_binding:o},header:{"Content-Type":"application/x-www-form-urlencoded"},success:function(n){console.log("success",n),200===n.statusCode?(console.log("手机号码传递成功",n),1===n.data.code&&(t.$globalData.wxUid=n.data.wxUid,e.setStorageSync("session_token",n.cookies[0].split(";")[0]),e.navigateTo({url:"/pages/homeCards/index"}))):console.log("服务器返回状态码异常",n.statusCode)},fail:function(e){console.log("发送失败",e)}})}}};n.default=o}).call(this,o("543d")["default"])},"12e4":function(e,n,o){"use strict";(function(e){o("8492");t(o("66fd"));var n=t(o("66da"));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"])},"5af7":function(e,n,o){"use strict";var t;o.d(n,"b",(function(){return a})),o.d(n,"c",(function(){return c})),o.d(n,"a",(function(){return t}));var a=function(){var e=this,n=e.$createElement;e._self._c},c=[]},"66da":function(e,n,o){"use strict";o.r(n);var t=o("5af7"),a=o("cd60");for(var c in a)"default"!==c&&function(e){o.d(n,e,(function(){return a[e]}))}(c);o("f658");var r,s=o("f0c5"),i=Object(s["a"])(a["default"],t["b"],t["c"],!1,null,"1cb42f10",null,!1,t["a"],r);n["default"]=i.exports},cd60:function(e,n,o){"use strict";o.r(n);var t=o("073b"),a=o.n(t);for(var c in t)"default"!==c&&function(e){o.d(n,e,(function(){return t[e]}))}(c);n["default"]=a.a},f06d:function(e,n,o){},f658:function(e,n,o){"use strict";var t=o("f06d"),a=o.n(t);a.a}},[["12e4","common/runtime","common/vendor"]]]);