|
|
|
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/authorization/index"],{2579:function(e,t,n){},2815:function(e,t,n){"use strict";(function(e){n("0371");o(n("66fd"));var t=o(n("cc58"));function o(e){return e&&e.__esModule?e:{default:e}}e(t.default)}).call(this,n("543d")["createPage"])},"3f51":function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n("2f62"),r=(n("6e63"),c(n("bac4")),c(n("93d0"))),i=n("8c38");function c(e){return e&&e.__esModule?e:{default:e}}function a(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 u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var l={data:function(){return{authorize:!1,canIUseGetUserProfile:!1}},computed:u({},(0,o.mapState)(["isAuthorization","$deviceType","token"])),onLoad:function(){console.log(wx.getUserProfile),wx.getUserProfile&&(console.log(this),this.canIUseGetUserProfile=!0,console.log(this.canIUseGetUserProfile))},onHide:function(){this.updateAuthorizationPage(!1),this.changeAuthorization(!1)},onUnload:function(){this.updateAuthorizationPage(!1),this.changeAuthorization(!1)},methods:u(u(u({},(0,o.mapActions)(["changeAuthorization","setUserInfo"])),(0,o.mapMutations)(["updateAuthorizationPage"])),{},{toLogin:function(){this.$yrouter.push({path:"/pagesB/pages/user/Login/index",query:{}})},back:function(){this.$yrouter.switchTab({path:"/pages/home/index",query:{}})},getUserInfo:function(t){var n=this;console.log(t),console.log("getUserInfo"),"getUserInfo:fail auth deny"!=t.detail.errMsg?(e.showLoading({title:"登录中"}),(0,i.login)().then((function(t){e.hideLoading(),console.log("重定向"),n.$yrouter.reLaunch({path:"/pages/user/index"})})).catch((function(t){e.hideLoading(),console.log(t),e.showToast({title:t,icon:"none",duration:2e3})}))):e.showToast({title:"取消授权",icon:"none",duration:2e3})},getUserInfoProfile:function(t){var n=this;console.log("getUserInfoProfile"),wx.getUserProfile({lang:"zh_CN",desc:"需要获取您的信息用来展示",success:function(t){console.log(t),e.showLoading({title:"登录中"}),(0,i.login)(t).then((function(e){console.log("重定向"),n.$yrouter.reLaunch({path:r.default.get("redirect").replace(/\ /g,"")})})).catch((function(t){console.log(t),e.showToast({title:t,icon:"none",duration:2e3})}))}})}}),mounted:function(){wx.getUserProfile&&(console.log(this),this.canIUseGetUserProfile=!0,console.log(this.canIUseGetUserProfile))}};t.default=l}).call(this,n("543d")["default"])},a24a:function(e,t,n){"use strict";var o=n("2579"),r=n.n(o);r.a},c266:function(e,t,n){"use strict";var o;n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return i})),n.d(t,"a",(function(){return o}));var r=function(){var e=this,t=e.$createElement;e._self._c},i=[]},cc58:function(e,t,n){"use strict";n.r(t);var o=n("c266"),r=n("f39f");for(var i in r)"default"!==i&&function(e){n.d(t,e,(function(){return r[e]}))}(i);n("a24a");var c,a=n("f0c5"),u=Object(a["a"])(r["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],c);t["default"]=u.exports},f39f:function(e,t,n){"use strict";n.r(t);var o=n("3f51"),r=n.n(o);for(var i in o)"default"!==i&&function(e){n.d(t,e,(function(){return o[e]}))}(i);t["default"]=r.a}},[["2815","common/runtime","common/vendor"]]]);
|