chunk-335f5c5d.ae359ac3.js 7.8 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-335f5c5d"],{2671:function(t,e,n){"use strict";n.d(e,"b",function(){return l}),n.d(e,"a",function(){return f});n("4453");var r=n("ee95"),a=(n("b06f"),n("3f47")),s=n("52c1"),i=n("5975"),c=n("2593"),o=n("33f8"),u=n("ca42"),d=n.n(u),h=n("bf49"),p=n("ef30"),l={data:function(){return{accountList:null,userInfo:null,meechatType:Object(o["o"])()}},computed:Object(a["a"])({},Object(s["e"])({members:function(t){return t.group.members},groupId:function(t){return t.group.groupId},sessionList:function(t){return t.chat.sessionList},meId:function(t){return t.userId},meInfo:function(t){return t.userInfo}}),{linkToOther:function(){var t=this.userInfo.user_id,e=Number(t)<Number(this.meId)?"".concat(t,"-").concat(this.meId):"".concat(this.meId,"-").concat(t);return"".concat(location.origin,"/#/pm/").concat(e)}}),methods:Object(a["a"])({},Object(s["b"])(["getUserInfo"]),{sendMsg:function(){this.visible=!1;var t=this.userInfo.user_id,e=Number(t)<Number(this.meId)?"".concat(t,"-").concat(this.meId):"".concat(this.meId,"-").concat(t),n=this.sessionList.some(function(t){return t.session_id==e});if(!n){var r={cover_photo:this.userInfo.cover_photo,is_group:"0",name:this.userInfo.nick_name,session_id:e};this.$store.commit("addSessionItem",r)}this.$router.push({path:"/pm/".concat(e)})}}),created:function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(){var e=this;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:if(this.meInfo){t.next=3;break}return t.next=3,this.getUserInfo();case 3:i["a"].user.getOtherInfo({target_id:this.userId,group_id:this.groupId||null}).then(function(t){var n=t.data;if(e.accountList=n.data.binds,e.userInfo=n.data,e.visible=!0,n.data.user_id){var r=new c["a"],a={cover_photo:n.data.cover_photo,nick_name:n.data.nick_name,user_name:n.data.user_name};r.updateObject(a,{user_id:n.data.user_id})}});case 4:case"end":return t.stop()}},t,this)}));function e(){return t.apply(this,arguments)}return e}()},f={data:function(){return{isLoading:!1}},computed:Object(a["a"])({},Object(s["e"])({scatter:function(t){return t.scatter}})),methods:Object(a["a"])({},Object(s["d"])(["changeUserBinds"]),Object(s["b"])(["setScatter","doScatterBind","getUserInfo"]),{bindEos:function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(e){var n=this;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return Object(o["A"])("eosType",e),this.isLoading=!0,t.next=4,d.a.scatter.connect("MEE_CHAT").then(function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(r){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:r&&(n.setScatter(d.a.scatter),window.ScatterJS=null,n.doScatterBind().then(function(t){n.isLoading=!1,n.changeUserBinds({type:e,account:t.account})}).catch(function(t){Object(o["B"])(t),n.isLoading=!1}));case 1:case"end":return t.stop()}},t)}));return function(e){return t.apply(this,arguments)}}());case 4:case"end":return t.stop()}},t,this)}));function e(e){return t.apply(this,arguments)}return e}(),bindTg:function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(){var e,n,r,a=this;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return this.winHandler=Object(o["y"])(""),t.next=3,i["a"].user.tgCSRF({type:"bind"});case 3:e=t.sent,n=e.data,this.winHandler.location.href=n.data.url,r=setInterval(function(){null!=a.winHandler&&a.winHandler.closed&&(clearInterval(r),a.winHandler=null)},800),this.bindCheck(n.data.csrf_token);case 8:case"end":return t.stop()}},t,this)}));function e(){return t.apply(this,arguments)}return e}(),bindEth:function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(){var e,n,r;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return this.isLoading=!0,t.prev=1,t.next=4,h["a"].initEth();case 4:return e=t.sent,n=e.account,r=e.sign,t.next=9,i["a"].user.ethBind({account:n,sign:r});case 9:return t.next=11,this.changeUserBinds({type:"eth",account:n});case 11:t.next=16;break;case 13:t.prev=13,t.t0=t["catch"](1),this.isLoading=!1;case 16:this.isLoading=!1;case 17:case"end":return t.stop()}},t,this,[[1,13]])}));function e(){return t.apply(this,arguments)}return e}(),bindTron:function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(){var e,n,r;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return this.isLoading=!0,t.prev=1,t.next=4,p["a"].initTron();case 4:return e=t.sent,n=e.account,r=e.sign,t.next=9,i["a"].user.tronBind({account:n,sign:r});case 9:return t.next=11,this.changeUserBinds({type:"tron",account:n});case 11:t.next=15;break;case 13:t.prev=13,t.t0=t["catch"](1);case 15:this.isLoading=!1;case 16:case"end":return t.stop()}},t,this,[[1,13]])}));function e(){return t.apply(this,arguments)}return e}(),bindCheck:function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(e,n){var r,a=this;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:if(this.isLoading=!0,0!==n){t.next=5;break}clearTimeout(this.timeoutHandler),t.next=7;break;case 5:if(!(n>=60)){t.next=7;break}return t.abrupt("return",!1);case 7:return r={},t.prev=8,t.next=11,i["a"].user.tgBind2({csrf_token:e});case 11:r=t.sent,t.next=17;break;case 14:t.prev=14,t.t0=t["catch"](8),this.isLoading=!1;case 17:r.data&&r.data.data&&r.data.data.status>0?(this.isLoading=!1,null!=this.winHandler&&(this.winHandler.close(),this.winHandler=null),this.getSyncInfo&&this.getSyncInfo(this.params),this.getUserInfo()):r.data?(null!=this.winHandler||r.data&&0==r.data.status)&&(this.timeoutHandler=setTimeout(function(){a.bindCheck(e,++n)},1e3)):null!=this.winHandler&&(this.winHandler.close(),this.winHandler=null);case 18:case"end":return t.stop()}},t,this,[[8,14]])}));function e(e,n){return t.apply(this,arguments)}return e}(),unbindAccount:function(t){var e=this;Object(o["f"])("".concat(this.$t("userinfo.unbindMsg")," ").concat(t.toLocaleUpperCase()," ?")).then(function(){i["a"].user.unBind({type:t}).then(function(){"eos"==t&&e.scatter&&e.scatter.logout&&e.scatter.logout(),e.$showTips(e.$t("userinfo.unbindSuccess")),e.changeUserBinds({type:t,account:""})})})}})}},"97e9":function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"about-me"},[n("back-bar",{attrs:{title:"用户信息"}}),t.userInfo?n("div",{staticClass:"pub-user-top"},[n("div",{staticClass:"avatar-wrap"},[t.userInfo.cover_photo?n("img",{staticClass:"user-avatar",attrs:{src:t.userInfo.cover_photo,alt:""},on:{click:function(e){return e.stopPropagation(),t.$showImgPreview(t.userInfo.cover_photo)}}}):n("div",{staticClass:"user-avatar",class:"avatar_bg"+t.userInfo.user_id%9,attrs:{"data-name":t.userInfo.nick_name.slice(0,2).toUpperCase()}})]),n("div",{staticClass:"top-info"},[n("div",{staticClass:"name"},[t._v(t._s(t.userInfo.nick_name))]),n("div",{staticClass:"code"},[t._v(t._s(t.$t("h5.username"))+":@"+t._s(t.userInfo.user_name))])])]):t._e(),t.userInfo?n("ul",{staticClass:"pub-account-list"},t._l(t.userInfo.binds,function(e,r){return n("li",{key:r,staticClass:"list-item"},[n("div",{staticClass:"icon-wrap"},[n("i",{class:e.type+"-icon"})]),n("div",{staticClass:"info"},[n("div",{staticClass:"title-wrap"},[n("h4",[t._v(t._s(e.type.toUpperCase()))]),n("p",[t._v(t._s(e.account||t.$t("h5.notBind")))])]),e.account?n("div",{staticClass:"opetate"},[n("i",{class:0===e.is_visible?"unopen":"open"}),n("p",[t._v(t._s(0===e.is_visible?t.$t("userinfo.private"):t.$t("userinfo.public")))])]):t._e()])])}),0):t._e(),n("div",{staticClass:"pub-bottom-btn ext-send",on:{click:t.sendMsg}},[t._v(t._s(t.$t("public.sendMessage")))])],1)},a=[],s=n("1848"),i=n("2671"),c={name:"aboutOther",mixins:[i["b"]],components:{backBar:s["a"]},data:function(){return{userId:this.$route.params.id}},computed:{},methods:{}},o=c,u=n("17cc"),d=Object(u["a"])(o,r,a,!1,null,"7a8b5ad0",null);e["default"]=d.exports}}]);