(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4bbc657a"],{5022:function(e,n,t){},ab12:function(e,n,t){"use strict";t.r(n);var o=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("div",{staticClass:"imHuanxinBody",style:{height:e.height+"px"}})},i=[],a=(t("7f7f"),t("a78e")),c=t.n(a),s=t("76a0"),r=t("5f87"),l=t("e876");window.easemobim=window.easemobim||{};var m={name:"ImHuanxin",components:{},data:function(){return{accessToken:this.$route.params.accessToken,height:document.documentElement.clientHeight,levelConfig:{900:"董事",1e3:"总代",1100:"一级",1200:"二级",1300:"三级",1400:"特约",0:"员工"}}},mounted:function(){s["Indicator"].open({text:"加载中...",spinnerType:"fading-circle"});var e=this.$route.query.key,n={trueName:"未知名称",avatarUrl:"http://img3.imgtn.bdimg.com/it/u=111601881,3529434258&fm=26&gp=0.jpg",qq:"未知",phone:"未知",companyName:"VMESHOU",userNickname:"APP用户-匿名",description:"--",email:"--"};if(e){var t=document.createElement("script");if(t.type="text/javascript",t.src="https://vmeshou.kefu.easemob.com/webim/easemob.js",document.body.appendChild(t),document.title="在线客服",c.a.get(e)){var o=Object(s["Toast"])({message:"加载中…",className:"zIndex",duration:8e5}),i=JSON.parse(c.a.get(e));n={trueName:i.name,avatarUrl:i.avatar,qq:"未知",phone:"未知",companyName:"VMESHOU",userNickname:"APP用户:"+i.nickname+" - "+i.userId,description:"代理级别:"+this.levelConfig[i.level],email:"--"},900==i.level&&(n.tags=["vip1","vip2"]);var a={configId:"b0b17503-26d9-498a-979f-466e3f4b6f17",dialogWidth:"100%",dialogHeight:"100%",dialogPosition:{x:"0px",y:"0px"},autoConnect:!0,visitor:n,onready:function(){console.log("IM调起完成"),s["Indicator"].close(),o.close()}};return void(window.easemobim.config=a)}}Object(r["a"])(),this.initUserInfo()},created:function(){setTimeout((function(){s["Indicator"].close()}),1e3)},methods:{initUserInfo:function(){var e=this.$route.params.accessToken;if(e&&void 0!=e)return Object(r["c"])({access_token:e},1),s["Indicator"].open({text:"加载中...",spinnerType:"fading-circle"}),new Promise((function(n,t){Object(l["e"])().then((function(n){if(console.log(n),1==n.resp_code)console.log(n.resp_msg);else{var t=n.datas;console.log(t);var o="IM_"+Math.floor(989999999*Math.random())+1e7;c.a.set(o,JSON.stringify(t),{expires:1}),setTimeout((function(){window.location.href="/im/huanxin/"+e+"?key="+o}),1e3)}})).catch((function(e){console.log(e),s["Indicator"].close(),Object(s["Toast"])("出错了,请重新发起"),e.resp_msg?console.log(e.resp_msg):console.log(e)}))}))}}},u=m,d=(t("f7b9"),t("2877")),f=Object(d["a"])(u,o,i,!1,null,null,null);n["default"]=f.exports},f7b9:function(e,n,t){"use strict";var o=t("5022"),i=t.n(o);i.a}}]);