|
|
|
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/Authorize"],{"4bac":function(t,e,n){"use strict";n.r(e);var o=n("dda5"),a=n("8245");for(var u in a)"default"!==u&&function(t){n.d(e,t,(function(){return a[t]}))}(u);n("d906");var r,i=n("f0c5"),c=Object(i["a"])(a["default"],o["b"],o["c"],!1,null,"0c7d56dc",null,!1,o["a"],r);e["default"]=c.exports},6399:function(t,e,n){},8245:function(t,e,n){"use strict";n.r(e);var o=n("bd67"),a=n.n(o);for(var u in o)"default"!==u&&function(t){n.d(e,t,(function(){return o[t]}))}(u);e["default"]=a.a},bd67:function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=n("b528"),a=getApp(),u={name:"Authorize",data:function(){return{isShowAuth:!1}},watch:{isLogin:function(t){!0===t&&this.$emit("onLoadFun",this.userInfo)}},created:function(){this.iscode()},methods:{iscode:function(){a.globalData.userInfo||(this.isShowAuth=!0)},getuserinfo:function(){t.showLoading({title:"正在登录中"});var e=this;wx.login({success:function(n){if(n.code){n.code;t.getUserInfo({success:function(n){var u={openId:a.globalData.openId,iv:n.iv,encryptedData:n.encryptedData};(0,o.getUserInfo)(u).then((function(n){"000000"==n.return_code?(t.hideLoading(),a.globalData.userInfo=n.return_data.object.highUser,a.globalData.token=n.return_data.uniqueCode,e.isShowAuth=!1,t.setStorage({key:"user",data:n.return_data.object.highUser}),t.setStorage({key:"token",data:n.return_data.uniqueCode}),t.reLaunch({url:"/pages/tabBar/user/user"})):t.showToast({title:n.return_msg})}))},fail:function(e){t.showToast({title:"微信登录授权失败",icon:"none"})}})}}}),e.isShowAuth=!1},close:function(){t.reLaunch({url:"/pages/tabBar/home/home"})}}};e.default=u}).call(this,n("543d")["default"])},d906:function(t,e,n){"use strict";var o=n("6399"),a=n.n(o);a.a},dda5:function(t,e,n){"use strict";var o;n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return u})),n.d(e,"a",(function(){return o}));var a=function(){var t=this,e=t.$createElement;t._self._c},u=[]}}]);
|