chunk-6c13bb44.5fd515c3.js 16 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-6c13bb44"],{"06af":function(e,t,n){},"15fa":function(e,t,n){"use strict";n.r(t);var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("transition",{attrs:{name:"msgbox-fade"}},[e.visible?n("div",{staticClass:"pub-wrapper"},[n("div",{staticClass:"pub-mask",on:{click:function(t){e.visible=!1}}}),n("div",{directives:[{name:"loading",rawName:"v-loading",value:e.isLoading,expression:"isLoading"}],staticClass:"pub-modal avater-modal"},[n("div",{staticClass:"modal-hd"},[n("i",{staticClass:"el-icon-close",on:{click:function(t){e.visible=!1}}})]),e.userInfo?n("div",{staticClass:"modal-bd"},[n("div",{staticClass:"user-top"},[n("div",{staticClass:"user-avatar",on:{click:function(t){return e.$editUserAvatar(e.userInfo.cover_photo)}}},[e.avatarUrl?n("img",{attrs:{src:e.avatarUrl,alt:""}}):n("div",{staticClass:"user-avatar",class:"avatar_bg"+e.userInfo.user_id%9,attrs:{"data-name":e.userInfo.nick_name.slice(0,2).toUpperCase()}}),n("p",[e._v(e._s(e.$t("userinfo.changePhoto")))])]),n("div",{staticClass:"r-info"},[e.isEditName?n("input",{directives:[{name:"model",rawName:"v-model",value:e.newNickName,expression:"newNickName"},{name:"focus",rawName:"v-focus"}],staticClass:"edit-name-input",attrs:{type:"text"},domProps:{value:e.newNickName},on:{blur:e.handleEditName,input:function(t){t.target.composing||(e.newNickName=t.target.value)}}}):n("span",{staticClass:"name",on:{click:function(t){e.isEditName=!0,e.newNickName=e.userInfo.nick_name}}},[e._v(e._s(e.userInfo.nick_name)+" "),n("i",{staticClass:"el-icon-edit"})]),e.isEditIntroduce?n("input",{directives:[{name:"model",rawName:"v-model",value:e.newUserName,expression:"newUserName"},{name:"focus",rawName:"v-focus"}],staticClass:"edit-name-input",attrs:{type:"text"},domProps:{value:e.newUserName},on:{blur:e.handleEditIntroduce,input:function(t){t.target.composing||(e.newUserName=t.target.value)}}}):n("div",{staticClass:"introduce",on:{click:function(t){e.isEditIntroduce=!0,e.newUserName=e.userInfo.user_name}}},[e._v("@"+e._s(e.userInfo.user_name)+" "),n("i",{staticClass:"el-icon-edit"})])])]),n("div",{staticClass:"account-wrap"},[n("div",{staticClass:"title"},[e._v(e._s(e.$t("userinfo.bindAccounts")))]),e._l(e.userInfo.binds,function(t,i){return n("div",{key:i,staticClass:"account-item"},[n("div",{staticClass:"type"},[n("strong",[e._v(e._s(t.type.toUpperCase()))]),"eth"==t.type||"tron"==t.type?n("span",{staticClass:"open-tips"},[e._v(e._s(e.$t("userinfo.openingSoon")))]):e._e(),t.account?n("div",{staticClass:"fr"},[n("span",[e._v(e._s(0===t.is_visible?e.$t("userinfo.private"):e.$t("userinfo.public")))]),n("el-switch",{attrs:{"active-value":0,"inactive-value":1,"active-color":"#2298f0","inactive-color":"#cbcbcb"},on:{change:function(n){return e.hanldeChange(t,n)}},model:{value:t.is_visible,callback:function(n){e.$set(t,"is_visible",n)},expression:"item.is_visible"}}),n("div",{staticClass:"btn-unbind",on:{click:function(n){return n.stopPropagation(),e.unbindAccount(t.type)}}},[e._v(e._s(e.$t("userinfo.unbind")))])],1):e._e()]),t.account?n("p",{staticClass:"key"},[e._v(e._s(t.account))]):n("el-button",{attrs:{disabled:"eth"==t.type||"tron"==t.type},on:{click:function(n){return e.bindAccount(t.type)}}},[e._v(e._s(e.$t("userinfo.bind")))])],1)})],2)]):e._e()])]):e._e()])},a=[],s=n("bd31"),r=(n("2df7"),n("ad09"),n("8058")),c=n.n(r),o=(n("3b70"),n("dfe5")),u=n.n(o),d=(n("dc12"),n("5cf1"),n("94c8")),l=n.n(d),h=n("8973"),f=n("52c1"),m=n("2671"),p=n("33f8"),v=n("5975");h["default"].component(l.a.name,l.a),h["default"].component(u.a.name,u.a),h["default"].component(c.a.name,c.a);var b={name:"infoPopup",mixins:[m["a"]],data:function(){return{isMe:!0,newNickName:"",isEditName:!1,newUserName:"",isEditIntroduce:!1}},computed:Object(s["a"])({},Object(f["e"])({scatter:function(e){return e.scatter},userInfo:function(e){return e.userInfo}}),{avatarUrl:function(){return/^http/.test(this.userInfo.cover_photo)?"".concat(this.userInfo.cover_photo,"?imageview/0/w/180"):this.userInfo.cover_photo}}),methods:{hanldeChange:function(e,t){var n=e.type;v["a"].user.setVisible({type:n,is_visible:t}).then(function(e){e.data})},bindAccount:function(e){switch(e){case"eos":this.bindEos("eos");break;case"tg":this.bindTg();break;case"meetone":this.bindEos("meetone");break}},handleEditName:function(){var e=this;Object(p["v"])(),this.newNickName!==this.userInfo.nick_name?this.newNickName.length>16?this.$showTips(this.$t("userinfo.nickTooLong")):(this.isEditName=!1,this.newNickName.length&&v["a"].user.changeNickName({nick_name:this.newNickName}).then(function(t){t.data;e.$store.commit("setUserNickName",e.newNickName),e.$store.commit("updateMemberInfo",{userId:e.$store.state.userId,nickName:e.newNickName}),e.$showTips(e.$t("public.updateSucc"))})):this.isEditName=!1},handleEditIntroduce:function(){var e=this;Object(p["v"])(),this.newUserName!==this.userInfo.user_name?/^[a-zA-Z_0-9]{5,20}$/i.test(this.newUserName)?(this.isEditIntroduce=!1,this.newUserName.length&&v["a"].user.changeUserName({user_name:this.newUserName}).then(function(t){t.data;e.$store.commit("setUserUserName",e.newUserName),e.$store.commit("updateMemberInfo",{userId:e.$store.state.userId,userName:e.newUserName}),e.$showTips(e.$t("public.updateSucc"))})):this.$showTips(this.$t("userinfo.wrongPattern")):this.isEditIntroduce=!1}}},_=b,g=(n("71d2"),n("fc05")),w=Object(g["a"])(_,i,a,!1,null,"361d1c98",null);t["default"]=w.exports},2671:function(e,t,n){"use strict";n.d(t,"b",function(){return d}),n.d(t,"a",function(){return l});n("b5aa");var i=n("4457"),a=(n("46b5"),n("bd31")),s=n("52c1"),r=n("5975"),c=n("2593"),o=n("33f8"),u=n("6bec"),d={data:function(){return{accountList:null,userInfo:null,meechatType:Object(o["o"])()}},computed:Object(a["a"])({},Object(s["e"])({members:function(e){return e.group.members},groupId:function(e){return e.group.groupId},sessionList:function(e){return e.chat.sessionList},meId:function(e){return e.userId},meInfo:function(e){return e.userInfo}}),{linkToOther:function(){var e=this.userInfo.user_id,t=Number(e)<Number(this.meId)?"".concat(e,"-").concat(this.meId):"".concat(this.meId,"-").concat(e);return"".concat(location.origin,"/#/pm/").concat(t)}}),methods:Object(a["a"])({},Object(s["b"])(["getUserInfo"]),{sendMsg:function(){this.visible=!1;var e=this.userInfo.user_id,t=Number(e)<Number(this.meId)?"".concat(e,"-").concat(this.meId):"".concat(this.meId,"-").concat(e),n=this.sessionList.some(function(e){return e.session_id==t});if(!n){var i={cover_photo:this.userInfo.cover_photo,is_group:"0",name:this.userInfo.nick_name,session_id:t};this.$store.commit("addSessionItem",i)}var a=this.meInfo.user_id,s={};s[a]={cover_photo:this.meInfo.cover_photo,nick_name:this.meInfo.nick_name},s[this.userInfo.user_id]={cover_photo:this.userInfo.cover_photo,nick_name:this.userInfo.nick_name},this.$store.commit("updateGroup",{key:"members",data:s}),this.$store.commit("updateGroup",{key:"privateName",data:this.userInfo.nick_name}),this.$router.push({path:"/pm/".concat(t)})}}),created:function(){var e=Object(i["a"])(regeneratorRuntime.mark(function e(){var t=this;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(this.meInfo){e.next=3;break}return e.next=3,this.getUserInfo();case 3:r["a"].user.getOtherInfo({target_id:this.userId,group_id:this.groupId||null}).then(function(e){var n=e.data;if(t.accountList=n.data.binds,t.userInfo=n.data,t.visible=!0,n.data.user_id){var i=new c["a"],a={cover_photo:n.data.cover_photo,nick_name:n.data.nick_name,user_name:n.data.user_name};i.updateObject(a,{user_id:n.data.user_id})}});case 4:case"end":return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}()},l={data:function(){return{isLoading:!1}},computed:Object(a["a"])({},Object(s["e"])({scatter:function(e){return e.scatter}})),methods:Object(a["a"])({},Object(s["b"])(["setScatter","doScatterBind","getUserInfo"]),{bindEos:function(){var e=Object(i["a"])(regeneratorRuntime.mark(function e(t){var n=this;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return Object(o["z"])("eosType",t),this.isLoading=!0,e.next=4,u["a"].scatter.connect("MEE_CHAT").then(function(){var e=Object(i["a"])(regeneratorRuntime.mark(function e(t){return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:t&&(n.setScatter(u["a"].scatter),window.ScatterJS=null,n.doScatterBind().then(function(){n.isLoading=!1,n.getUserInfo()}).catch(function(e){console.log(e),Object(o["A"])(e),n.isLoading=!1}));case 1:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}());case 4:case"end":return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}(),bindTg:function(){var e=Object(i["a"])(regeneratorRuntime.mark(function e(){var t,n,i,a=this;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return this.winHandler=Object(o["x"])(""),e.next=3,r["a"].user.tgCSRF({type:"bind"});case 3:t=e.sent,n=t.data,this.winHandler.location.href=n.data.url,i=setInterval(function(){null!=a.winHandler&&a.winHandler.closed&&(clearInterval(i),a.winHandler=null)},800),this.bindCheck(n.data.csrf_token);case 8:case"end":return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}(),bindCheck:function(){var e=Object(i["a"])(regeneratorRuntime.mark(function e(t,n){var i,a=this;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(this.isLoading=!0,0!==n){e.next=5;break}clearTimeout(this.timeoutHandler),e.next=7;break;case 5:if(!(n>=60)){e.next=7;break}return e.abrupt("return",!1);case 7:return i={},e.prev=8,e.next=11,r["a"].user.tgBind2({csrf_token:t});case 11:i=e.sent,e.next=17;break;case 14:e.prev=14,e.t0=e["catch"](8),this.isLoading=!1;case 17:i.data&&i.data.data&&i.data.data.status>0?(this.isLoading=!1,null!=this.winHandler&&(this.winHandler.close(),this.winHandler=null),this.getSyncInfo&&this.getSyncInfo(this.params),this.getUserInfo()):i.data?(null!=this.winHandler||i.data&&0==i.data.status)&&(this.timeoutHandler=setTimeout(function(){a.bindCheck(t,++n)},1e3)):null!=this.winHandler&&(this.winHandler.close(),this.winHandler=null);case 18:case"end":return e.stop()}},e,this,[[8,14]])}));function t(t,n){return e.apply(this,arguments)}return t}(),unbindAccount:function(e){var t=this;Object(o["f"])("".concat(this.$t("userinfo.unbindMsg")," ").concat(e.toLocaleUpperCase()," ?")).then(function(){r["a"].user.unBind({type:e}).then(function(){"eos"==e&&t.scatter&&t.scatter.forgetIdentity&&t.scatter.forgetIdentity(),t.$showTips(t.$t("userinfo.unbindSuccess")),t.getUserInfo()})})}})}},"2df7":function(e,t,n){},"5cf1":function(e,t,n){},"71d2":function(e,t,n){"use strict";var i=n("06af"),a=n.n(i);a.a},8058:function(e,t,n){e.exports=function(e){var t={};function n(i){if(t[i])return t[i].exports;var a=t[i]={i:i,l:!1,exports:{}};return e[i].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(i,a,function(t){return e[t]}.bind(null,a));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/dist/",n(n.s=100)}({0:function(e,t,n){"use strict";function i(e,t,n,i,a,s,r,c){var o,u="function"===typeof e?e.options:e;if(t&&(u.render=t,u.staticRenderFns=n,u._compiled=!0),i&&(u.functional=!0),s&&(u._scopeId="data-v-"+s),r?(o=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"===typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),a&&a.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(r)},u._ssrRegister=o):a&&(o=c?function(){a.call(this,this.$root.$options.shadowRoot)}:a),o)if(u.functional){u._injectStyles=o;var d=u.render;u.render=function(e,t){return o.call(t),d(e,t)}}else{var l=u.beforeCreate;u.beforeCreate=l?[].concat(l,o):[o]}return{exports:e,options:u}}n.d(t,"a",function(){return i})},10:function(e,t){e.exports=n("f1df")},100:function(e,t,n){"use strict";n.r(t);var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"el-switch",class:{"is-disabled":e.switchDisabled,"is-checked":e.checked},attrs:{role:"switch","aria-checked":e.checked,"aria-disabled":e.switchDisabled},on:{click:e.switchValue}},[n("input",{ref:"input",staticClass:"el-switch__input",attrs:{type:"checkbox",id:e.id,name:e.name,"true-value":e.activeValue,"false-value":e.inactiveValue,disabled:e.switchDisabled},on:{change:e.handleChange,keydown:function(t){return"button"in t||!e._k(t.keyCode,"enter",13,t.key,"Enter")?e.switchValue(t):null}}}),e.inactiveIconClass||e.inactiveText?n("span",{class:["el-switch__label","el-switch__label--left",e.checked?"":"is-active"]},[e.inactiveIconClass?n("i",{class:[e.inactiveIconClass]}):e._e(),!e.inactiveIconClass&&e.inactiveText?n("span",{attrs:{"aria-hidden":e.checked}},[e._v(e._s(e.inactiveText))]):e._e()]):e._e(),n("span",{ref:"core",staticClass:"el-switch__core",style:{width:e.coreWidth+"px"}}),e.activeIconClass||e.activeText?n("span",{class:["el-switch__label","el-switch__label--right",e.checked?"is-active":""]},[e.activeIconClass?n("i",{class:[e.activeIconClass]}):e._e(),!e.activeIconClass&&e.activeText?n("span",{attrs:{"aria-hidden":!e.checked}},[e._v(e._s(e.activeText))]):e._e()]):e._e()])},a=[];i._withStripped=!0;var s=n(21),r=n.n(s),c=n(10),o=n.n(c),u={name:"ElSwitch",mixins:[r()("input"),o.a],inject:{elForm:{default:""}},props:{value:{type:[Boolean,String,Number],default:!1},disabled:{type:Boolean,default:!1},width:{type:Number,default:40},activeIconClass:{type:String,default:""},inactiveIconClass:{type:String,default:""},activeText:String,inactiveText:String,activeColor:{type:String,default:""},inactiveColor:{type:String,default:""},activeValue:{type:[Boolean,String,Number],default:!0},inactiveValue:{type:[Boolean,String,Number],default:!1},name:{type:String,default:""},id:String},data:function(){return{coreWidth:this.width}},created:function(){~[this.activeValue,this.inactiveValue].indexOf(this.value)||this.$emit("input",this.inactiveValue)},computed:{checked:function(){return this.value===this.activeValue},switchDisabled:function(){return this.disabled||(this.elForm||{}).disabled}},watch:{checked:function(){this.$refs.input.checked=this.checked,(this.activeColor||this.inactiveColor)&&this.setBackgroundColor()}},methods:{handleChange:function(e){var t=this;this.$emit("input",this.checked?this.inactiveValue:this.activeValue),this.$emit("change",this.checked?this.inactiveValue:this.activeValue),this.$nextTick(function(){t.$refs.input.checked=t.checked})},setBackgroundColor:function(){var e=this.checked?this.activeColor:this.inactiveColor;this.$refs.core.style.borderColor=e,this.$refs.core.style.backgroundColor=e},switchValue:function(){!this.switchDisabled&&this.handleChange()},getMigratingConfig:function(){return{props:{"on-color":"on-color is renamed to active-color.","off-color":"off-color is renamed to inactive-color.","on-text":"on-text is renamed to active-text.","off-text":"off-text is renamed to inactive-text.","on-value":"on-value is renamed to active-value.","off-value":"off-value is renamed to inactive-value.","on-icon-class":"on-icon-class is renamed to active-icon-class.","off-icon-class":"off-icon-class is renamed to inactive-icon-class."}}}},mounted:function(){this.coreWidth=this.width||40,(this.activeColor||this.inactiveColor)&&this.setBackgroundColor(),this.$refs.input.checked=this.checked}},d=u,l=n(0),h=Object(l["a"])(d,i,a,!1,null,null,null);h.options.__file="packages/switch/src/component.vue";var f=h.exports;f.install=function(e){e.component(f.name,f)};t["default"]=f},21:function(e,t){e.exports=n("e2ea")}})},e2ea:function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e){return{methods:{focus:function(){this.$refs[e].focus()}}}}}}]);