(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4583e1ed"],{"273b":function(t,e,n){},"3bb0":function(t,e,n){t.exports=n.p+"static/img/oauth_loading.7a48dd1b.gif"},b99c:function(t,e,n){"use strict";n.r(e);var o=function(){var t=this,e=t.$createElement;t._self._c;return t._m(0)},i=[function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"content"},[o("div",{staticClass:"loading-ico"},[o("img",{attrs:{src:n("3bb0")}})]),o("div",{staticClass:"loading-txt"},[t._v("正在获取第三方授权...")])])}],a=(n("ac1f"),n("1276"),n("ed08")),s=n("751a"),r=n("d722"),c={name:"OauthQq",data:function(){return{type:"login"}},created:function(){this.type=this.$route.params.type,this.init()},methods:{doLogin:function(t){var e=this;s["a"].post(r["a"].oauth_qq_login,t).then((function(t){200===parseInt(t.code)?(Object(a["f"])("LoginErrorNumByCode",0),Object(a["f"])("LoginErrorNumByPwd",0),e.$store.commit("clearCountDownFun"),e.$store.commit("setLoginState",{whether:!0,utype:t.data.utype,token:t.data.token,mobile:t.data.mobile,userIminfo:t.data.user_iminfo}),1===t.data.utype?e.$router.push("/company"):e.$router.push("/personal")):e.$message.error(t.message)})).catch((function(){}))},doBind:function(t){var e=this;s["a"].post(r["a"].oauth_qq_bind,t).then((function(t){200===parseInt(t.code)?1===e.$store.state.LoginType?e.$router.push("/company"):e.$router.push("/personal"):e.$message.error(t.message)})).catch((function(){}))},getUserinfo:function(t){var e=this,n={accessToken:t};s["a"].post(r["a"].oauth_qq_getuserinfo,n).then((function(t){"login"==e.type?e.doLogin(t.data):"bind"==e.type&&e.doBind(t.data)})).catch((function(){}))},init:function(){if(0===window.location.hash.length){var t=location.href,e="https://graph.qq.com/oauth2.0/authorize?response_type=token&client_id="+this.$store.state.config.account_qqlogin_appid+"&redirect_uri="+t;window.location.href=e}else{var n=this.$route.hash.substring(1);if(void 0!==n&&""!=n){var o=n.split("&"),i=o[0].split("="),a=i[1];return this.getUserinfo(a),!1}}}}},u=c,d=(n("d3bf"),n("2877")),h=Object(d["a"])(u,o,i,!1,null,"09665fb4",null);e["default"]=h.exports},d3bf:function(t,e,n){"use strict";var o=n("273b"),i=n.n(o);i.a}}]);