(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-auth-wxLogin"],{"4b30":function(n,e,t){"use strict";t.r(e);var o=t("50d9"),i=t.n(o);for(var u in o)"default"!==u&&function(n){t.d(e,n,(function(){return o[n]}))}(u);e["default"]=i.a},"4f0f":function(n,e,t){"use strict";var o;t.d(e,"b",(function(){return i})),t.d(e,"c",(function(){return u})),t.d(e,"a",(function(){return o}));var i=function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("v-uni-view",{staticClass:"container"})},u=[]},"50d9":function(n,e,t){"use strict";(function(n){t("4d63"),t("ac1f"),t("25f0"),t("466d"),t("5319"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=t("9958"),i={data:function(){return{code:null}},computed:{},onLoad:function(n){if(this.checkWeixin()){var e=this.getUrlCode("code");null==e||void 0==e?uni.showToast({icon:"none",title:"code不存在"}):(this.code=e,this.loginByMp())}else uni.showToast({icon:"none",title:"请在微信中打开"})},onUnload:function(){},mounted:function(){},methods:{loginByMp:function(){var e=this.code,t=uni.getStorageSync("tuiUserId");uni.showLoading({title:"处理中..."}),(0,o.loginByMp)({code:e,tuiUserId:t}).then((function(n){200==n.code||40163==n.code?(uni.hideLoading(),uni.showToast({icon:"none",title:"登录成功"}),uni.setStorageSync("AppToken",n.token),uni.setStorageSync("userInfo",JSON.stringify(n.user)),uni.$emit("refreshLogin"),uni.reLaunch({url:"/pages/home/index"})):(uni.hideLoading(),uni.showToast({icon:"none",title:n.msg}))})).catch((function(e){n.log(e),uni.hideLoading(),uni.showToast({icon:"none",title:"登录接口调用失败"})}))},checkWeixin:function(){var n=window.navigator.userAgent.toLowerCase();return"micromessenger"==n.match(/micromessenger/i)},getUrlCode:function(n){return decodeURIComponent((new RegExp("[?|&]"+n+"=([^&;]+?)(&|#|;|$)").exec(location.href)||[,""])[1].replace(/\+/g,"%20"))||null}}};e.default=i}).call(this,t("5a52")["default"])},efd9:function(n,e,t){"use strict";t.r(e);var o=t("4f0f"),i=t("4b30");for(var u in i)"default"!==u&&function(n){t.d(e,n,(function(){return i[n]}))}(u);var c,r=t("f0c5"),a=Object(r["a"])(i["default"],o["b"],o["c"],!1,null,"6b78818d",null,!1,o["a"],c);e["default"]=a.exports}}]);