12345678910 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/tui-chat/message-elements/custom-message/index"],{"0230":function(t,e,a){"use strict";a.r(e);var n=a("a244"),i=a.n(n);for(var o in n)"default"!==o&&function(t){a.d(e,t,(function(){return n[t]}))}(o);e["default"]=i.a},"024e":function(t,e,a){"use strict";var n=a("647a"),i=a.n(n);i.a},"647a":function(t,e,a){},a244:function(t,e,a){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=a("c9e4"),i={data:function(){return{renderDom:null,assetsUrl:this.$util.assetsUrl}},components:{},props:{message:{type:Object,default:function(){}},isMine:{type:Boolean,default:!0}},watch:{message:{handler:function(t){this.message=t,this.renderDom=this.parseCustom(t)},immediate:!0,deep:!0}},methods:{extractCallingInfoFromMessage:function(t){var e=JSON.parse(t.payload.data);if(1!==e.businessID)return"";var a=JSON.parse(e.data);switch(e.actionType){case 1:return a.call_end>=0&&!e.groupID?"通话时长:".concat((0,n.formateTime)(a.call_end)):e.groupID?"结束群聊":a.data&&"switchToAudio"===a.data.cmd?"切换语音通话":a.data&&"switchToVideo"===a.data.cmd?"切换视频通话":"发起通话";case 2:return"取消通话";case 3:return a.data&&"switchToAudio"===a.data.cmd?"切换语音通话":a.data&&"switchToVideo"===a.data.cmd?"切换视频通话":"已接听";case 4:return"拒绝通话";case 5:return a.data&&"switchToAudio"===a.data.cmd?"切换语音通话":a.data&&"switchToVideo"===a.data.cmd?"切换视频通话":"无应答";default:return""}},parseCustom:function(t){var e=JSON.parse(t.payload.data);if(console.log(e),5===e.type){var a={type:"image",name:"custom",imageUrl:e.path};return a}if(6===e.type){var n={type:"video",name:"custom",videoUrl:e.path,videoCover:"".concat(e.path,"?x-oss-process=video/snapshot,w_0,h_0,t_10,ar_auto,f_jpg"),width:e.width,height:e.height};return n}if(99===e.type&&10===e.systemMsgType){var i={type:"system",name:"custom",text:"该消息已被屏蔽",flow:"out",context:e.context.substring(0,e.context.indexOf(e.highlightContext)),link:"/pages/webview/webview?url=".concat(this.$util.protocal.behaviorStandar),highlightColor:"#".concat(e.highlightColor.substring(2)),highlightContext:e.highlightContext};return i}if(99===e.type&&4===e.systemMsgType){var o={type:"system",name:"custom",text:"",flow:"out",context:e.context.substring(e.context.indexOf(e.highlightContext),e.context.length),link:"/pages/mine/album",highlightColor:"#".concat(e.highlightColor.substring(2)),highlightContext:e.highlightContext};return o}return{type:"notSupport",text:"[自定义消息]"}},previewImage:function(){t.previewImage({current:this.renderDom.imageUrl,urls:[this.renderDom.imageUrl]})},playerHander:function(){t.$emit("videoPlayerHandler",{isPlay:!0,message:this.renderDom})},stopHander:function(){this.isPlay=!1}}};e.default=i}).call(this,a("543d")["default"])},addb:function(t,e,a){"use strict";var n;a.d(e,"b",(function(){return i})),a.d(e,"c",(function(){return o})),a.d(e,"a",(function(){return n}));var i=function(){var t=this,e=t.$createElement;t._self._c},o=[]},fc39:function(t,e,a){"use strict";a.r(e);var n=a("addb"),i=a("0230");for(var o in i)"default"!==o&&function(t){a.d(e,t,(function(){return i[t]}))}(o);a("024e");var r,s=a("f0c5"),c=Object(s["a"])(i["default"],n["b"],n["c"],!1,null,null,null,!1,n["a"],r);e["default"]=c.exports}}]);
- ;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
- 'components/tui-chat/message-elements/custom-message/index-create-component',
- {
- 'components/tui-chat/message-elements/custom-message/index-create-component':(function(module, exports, __webpack_require__){
- __webpack_require__('543d')['createComponent'](__webpack_require__("fc39"))
- })
- },
- [['components/tui-chat/message-elements/custom-message/index-create-component']]
- ]);
|