chunk-60cf0727.cf39f81a.js 3.4 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-60cf0727"],{"2f56":function(t,e,a){"use strict";var i=a("4008"),n=a.n(i);n.a},4008:function(t,e,a){},e479:function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.isLoading,expression:"isLoading"}],staticClass:"c-view"},[a("div",{staticClass:"box"},[a("div",{staticClass:"box-hd"},[a("div",{staticClass:"title-wrap"},[t._v(t._s(t.$t("group.relateTelegram")))])]),t.isLoadingRoom?a("div",{staticClass:"pub-loading"}):a("div",{staticClass:"box-bd pub-scroll-box"},[a("h2",[t._v(t._s(t.$t("group.needRelateTelegram"))+":"),a("span",[t._v(t._s(t.tgGroupTitle))])]),t.isBind?a("ul",{staticClass:"list-group"},[t._l(t.groups,function(e,i){return a("li",{key:i,staticClass:"group-item"},[a("h3",[t._v(t._s(e.group_title))]),a("p",[t._v(t._s("https://mee.chat/s/"+e.group_id))]),a("p",[t._v(t._s(t.$t("group.groupId"))+":"+t._s(e.group_id))]),a("el-button",{staticClass:"btn-relate",attrs:{type:"primary"},on:{click:function(e){return t.doSync(i)}}},[t._v(t._s(t.$t("group.relate")))])],1)}),a("li",{staticClass:"group-item ext-add",on:{click:function(e){return t.createAndSync()}}},[a("h3",[t._v(t._s(t.$t("group.createGroupToRelate")))]),a("i",{staticClass:"el-icon-plus"})])],2):a("div",{staticClass:"no-data"},[a("h3",[t._v(t._s(t.$t("group.needRelateTip")))]),a("i",{staticClass:"icon-tele"}),a("el-button",{staticClass:"btn-relate",attrs:{type:"primary"},on:{click:t.bindTg}},[t._v(t._s(t.$t("group.clickBind")))])],1)])])])},n=[],r=(a("dcfb"),a("c7d9"),a("4694"),a("b5aa"),a("4457")),o=(a("dc12"),a("5cf1"),a("ad09"),a("94c8")),s=a.n(o),c=a("8973"),u=a("5975"),p=a("33f8"),d=a("2671");c["default"].component(s.a.name,s.a);var l={name:"relateGroup",mixins:[d["a"]],components:{},data:function(){return{params:{},isLoadingRoom:!0,isLoading:!1,isBind:!1,tgGroupTitle:"",tgGroupId:0,winHandler:null,groups:[],timeoutHandler:0,meechatType:Object(p["o"])()}},created:function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(){var e,a,i;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:e=location.hash.replace("#/relateGroup?",""),a=e.split("&"),i={},a.forEach(function(t){var e=t.split("=");i[e[0]]=e[1]}),this.params=i,this.getSyncInfo(this.params);case 6:case"end":return t.stop()}},t,this)}));function e(){return t.apply(this,arguments)}return e}(),methods:{getSyncInfo:function(t){var e=this;u["a"].tg.getSyncInfo(t).then(function(t){var a=t.data;e.groups=a.data.groups,e.isBind=!!a.data.userId,e.tgGroupTitle=decodeURI(a.data.tgGroupTitle),e.tgGroupId=a.data.tgGroupId,e.isLoadingRoom=!1}).catch(function(t){e.isLoadingRoom=!1})},doSync:function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(e){var a,i=this;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:this.isLoading=!0,a=this.groups[e].group_id,u["a"].tg.doSync({group_id:a,tg_group_id:this.tgGroupId}).then(function(){i.isLoading=!1,i.$router.replace("/group/".concat(a))}).catch(function(t){i.isLoading=!1,console.log(t)});case 3:case"end":return t.stop()}},t,this)}));function e(e){return t.apply(this,arguments)}return e}(),createAndSync:function(){"h5"==this.meechatType?this.$router.push("/invite/1?tgGroupId=".concat(this.tgGroupId)):this.$showInvite(1,{tgGroupId:this.tgGroupId})}}},g=l,h=(a("2f56"),a("fc05")),f=Object(h["a"])(g,i,n,!1,null,"73409fd2",null);e["default"]=f.exports}}]);