(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-API-get-user-info-get-user-info"],{1513:function(e,n,t){"use strict";t.r(n);var i=t("e7d8"),o=t("96d1");for(var s in o)"default"!==s&&function(e){t.d(n,e,(function(){return o[e]}))}(s);t("c1a1");var r,a=t("f0c5"),u=Object(a["a"])(o["default"],i["b"],i["c"],!1,null,"86ed84b8",null,!1,i["a"],r);n["default"]=u.exports},6335:function(e,n,t){var i=t("24fb");n=i(!1),n.push([e.i,".userinfo-avatar[data-v-86ed84b8]{border-radius:%?128?%;width:%?128?%;height:%?128?%}",""]),e.exports=n},"96d1":function(e,n,t){"use strict";t.r(n);var i=t("e14e"),o=t.n(i);for(var s in i)"default"!==s&&function(e){t.d(n,e,(function(){return i[e]}))}(s);n["default"]=o.a},a7ef:function(e,n,t){var i=t("6335");"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var o=t("4f06").default;o("5415b554",i,!0,{sourceMap:!1,shadowMode:!1})},c1a1:function(e,n,t){"use strict";var i=t("a7ef"),o=t.n(i);o.a},e14e:function(e,n,t){"use strict";var i=t("ee27");t("c975"),Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=i(t("f3f3")),s=t("2f62"),r={data:function(){return{title:"getUserInfo",hasUserInfo:!1,userInfo:{}}},computed:(0,o.default)({},(0,s.mapState)({loginProvider:function(e){return e.loginProvider}})),methods:{getUserInfo:function(){var e=this;uni.getUserInfo({provider:this.loginProvider,success:function(n){console.log("getUserInfo success",n),e.hasUserInfo=!0,e.userInfo=n.userInfo},fail:function(e){console.log("getUserInfo fail",e);var n=e.errMsg;~n.indexOf("uni.login")&&(n="请在登录页面完成登录操作"),uni.getSetting({success:function(e){var t=e.authSetting["scope.userInfo"];t?uni.showModal({title:"获取用户信息失败",content:"错误原因"+n,showCancel:!1}):uni.showModal({title:"授权失败",content:"Hello uni-app需要获取您的用户信息，请在设置界面打开相关权限",success:function(e){e.confirm&&uni.openSetting()}})}})}})},mpGetUserInfo:function(e){console.log("mpGetUserInfo",e),"getUserInfo:ok"===e.detail.errMsg?(this.hasUserInfo=!0,this.userInfo=e.detail.userInfo):uni.showModal({title:"获取用户信息失败",content:"错误原因"+e.detail.errMsg,showCancel:!1})},clear:function(){this.hasUserInfo=!1,this.userInfo={}}}};n.default=r},e7d8:function(e,n,t){"use strict";var i,o=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("v-uni-view",[t("page-head",{attrs:{title:e.title}}),t("v-uni-view",{staticClass:"uni-padding-wrap"},[t("v-uni-view",{staticStyle:{background:"#FFF",padding:"40rpx"}},[!1===e.hasUserInfo?[t("v-uni-view",{staticClass:"uni-hello-text uni-center"},[t("v-uni-text",[e._v("请点击下方按钮获取用户头像及昵称")])],1)]:e._e(),!0===e.hasUserInfo?[t("v-uni-view",{staticClass:"uni-h4 uni-center uni-common-mt"},[e._v(e._s(e.userInfo.nickName||e.userInfo.email))]),t("v-uni-view",{staticStyle:{padding:"30rpx 0","text-align":"center"}},[t("v-uni-image",{staticClass:"userinfo-avatar",attrs:{src:e.userInfo.avatarUrl}})],1)]:e._e()],2),t("v-uni-view",{staticClass:"uni-btn-v"},[t("v-uni-button",{on:{click:function(n){arguments[0]=n=e.$handleEvent(n),e.clear.apply(void 0,arguments)}}},[e._v("清空")])],1)],1)],1)},s=[];t.d(n,"b",(function(){return o})),t.d(n,"c",(function(){return s})),t.d(n,"a",(function(){return i}))}}]);