You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
3.7 KiB

3 years ago
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/authorization/index"],{"404b":function(e,t,n){"use strict";n.r(t);var o=n("a822"),r=n("fa4e");for(var i in r)"default"!==i&&function(e){n.d(t,e,(function(){return r[e]}))}(i);n("d292");var a,c=n("f0c5"),u=Object(c["a"])(r["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],a);t["default"]=u.exports},9427:function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n("2f62"),r=(n("aa63"),a(n("1a48")),a(n("39ce"))),i=n("b6d1");function a(e){return e&&e.__esModule?e:{default:e}}function c(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?c(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(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"])},a822: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=[]},a9b5:function(e,t,n){},d292:function(e,t,n){"use strict";var o=n("a9b5"),r=n.n(o);r.a},d847:function(e,t,n){"use strict";(function(e){n("ef82");o(n("66fd"));var t=o(n("404b"));function o(e){return e&&e.__esModule?e:{default:e}}e(t.default)}).call(this,n("543d")["createPage"])},fa4e:function(e,t,n){"use strict";n.r(t);var o=n("9427"),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}},[["d847","common/runtime","common/vendor"]]]);