消息
This commit is contained in:
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"message-call-c2c.js","sources":["TUIKit/plugins/plugin-components/message-call/message-call-c2c.vue","../../HBuilderX/plugins/uniapp-cli-vite/uniComponent:/RDov6aG555uuL3RrLW1pbmktcHJvZ3JhbS9UVUlLaXQvcGx1Z2lucy9wbHVnaW4tY29tcG9uZW50cy9tZXNzYWdlLWNhbGwvbWVzc2FnZS1jYWxsLWMyYy52dWU"],"sourcesContent":["<template>\n <div\n v-if=\"isCallMessage && conversationType === TYPES.CONV_C2C\"\n class=\"call\"\n :class=\"['call-' + conversationType, message.flow === 'out' && 'call-reverse']\"\n @click=\"callAgain\"\n >\n <div :class=\"['icon', message.flow === 'out' && callInfo.type === 2 && 'icon-reverse']\">\n <Icon :file=\"callInfo.icon\" />\n </div>\n <span class=\"call-content\">{{ custom }}</span>\n </div>\n</template>\n<script setup lang=\"ts\">\nimport TUICore, { TUIConstants } from '@tencentcloud/tui-core';\nimport TUIChatEngine from '@tencentcloud/chat-uikit-engine';\nimport { computed, ref } from '../../../adapter-vue';\nimport { JSONToObject } from '../../../utils/index';\nimport Icon from '../../../components/common/Icon.vue';\nimport callVideoSVG from '../../../assets/icon/call-video.svg';\nimport callVoiceSVG from '../../../assets/icon/call-voice.svg';\nimport OfflinePushInfoManager, { PUSH_SCENE } from '../../../components/TUIChat/offlinePushInfoManager/index';\nconst props = defineProps({\n message: {\n type: Object,\n default: () => ({}),\n },\n signalingInfo: {\n type: Object,\n default: () => ({}),\n },\n customContent: {\n type: Object,\n default: () => ({}),\n },\n});\nconst TYPES = ref(TUIChatEngine.TYPES);\nconst isCallMessage = computed(() => props.signalingInfo != null);\nconst callInfo = computed((): { type: number; icon: string } => {\n const callType = JSONToObject(props.signalingInfo?.data)?.call_type;\n switch (callType) {\n case 1:\n return {\n type: 1,\n icon: callVoiceSVG,\n };\n case 2:\n return {\n type: 2,\n icon: callVideoSVG,\n };\n default:\n break;\n }\n return {\n type: 0,\n icon: '',\n };\n});\nconst conversationType = computed(() => props.message?.conversationType);\nconst custom = computed(() => props.customContent?.custom);\n\nconst callAgain = () => {\n if (conversationType.value === TUIChatEngine.TYPES.CONV_C2C) {\n const userID = props.message?.flow === 'out' ? props.message?.to : props.message?.from;\n TUICore.callService({\n serviceName: TUIConstants.TUICalling.SERVICE.NAME,\n method: TUIConstants.TUICalling.SERVICE.METHOD.START_CALL,\n params: {\n userIDList: [userID],\n type: callInfo?.value?.type,\n callParams: {\n offlinePushInfo: OfflinePushInfoManager.getOfflinePushInfo(PUSH_SCENE.CALL),\n },\n },\n });\n }\n};\n</script>\n<style scoped lang=\"scss\">\n.call {\n display: flex;\n flex-direction: row;\n align-items: center;\n\n &-C2C {\n cursor: pointer;\n }\n\n &-GROUP {\n cursor: default;\n }\n\n &-content {\n padding-left: 5px;\n }\n\n .icon {\n width: 20px;\n height: 20px;\n }\n\n &-reverse {\n flex-direction: row-reverse;\n\n .icon-reverse {\n transform: rotate(180deg);\n }\n\n .call-content {\n padding-right: 5px;\n padding-left: 0;\n }\n }\n}\n</style>\n","import Component from 'D:/项目/tk-mini-program/TUIKit/plugins/plugin-components/message-call/message-call-c2c.vue'\nwx.createComponent(Component)"],"names":["ref","TUIChatEngine","computed","JSONToObject","callVoiceSVG","callVideoSVG","TUICore","TUIConstants","OfflinePushInfoManager","PUSH_SCENE"],"mappings":";;;;;;;;;;AAkBA,MAAA,OAAiB,MAAA;;;;;;;;;;;;;;;;;;AAIjB,UAAM,QAAQ;AAcR,UAAA,QAAQA,cAAAA,IAAIC,cAAA,GAAc,KAAK;AACrC,UAAM,gBAAgBC,cAAAA,SAAS,MAAM,MAAM,iBAAiB,IAAI;AAC1D,UAAA,WAAWA,cAAAA,SAAS,MAAsC;;AAC9D,YAAM,YAAWC,4BAAAA,cAAa,WAAM,kBAAN,mBAAqB,IAAI,MAAtCA,mBAAyC;AAC1D,cAAQ,UAAU;AAAA,QAChB,KAAK;AACI,iBAAA;AAAA,YACL,MAAM;AAAA,YACN,MAAMC,cAAA;AAAA,UAAA;AAAA,QAEV,KAAK;AACI,iBAAA;AAAA,YACL,MAAM;AAAA,YACN,MAAMC,cAAA;AAAA,UAAA;AAAA,MAIZ;AACO,aAAA;AAAA,QACL,MAAM;AAAA,QACN,MAAM;AAAA,MAAA;AAAA,IACR,CACD;AACD,UAAM,mBAAmBH,cAAAA,SAAS,MAAA;;AAAM,yBAAM,YAAN,mBAAe;AAAA,KAAgB;AACvE,UAAM,SAASA,cAAAA,SAAS,MAAA;;AAAM,yBAAM,kBAAN,mBAAqB;AAAA,KAAM;AAEzD,UAAM,YAAY,MAAM;;AACtB,UAAI,iBAAiB,UAAUD,iBAAc,MAAM,UAAU;AACrD,cAAA,WAAS,WAAM,YAAN,mBAAe,UAAS,SAAQ,WAAM,YAAN,mBAAe,MAAK,WAAM,YAAN,mBAAe;AAClFK,sBAAAA,EAAQ,YAAY;AAAA,UAClB,aAAaC,cAAa,EAAA,WAAW,QAAQ;AAAA,UAC7C,QAAQA,cAAAA,EAAa,WAAW,QAAQ,OAAO;AAAA,UAC/C,QAAQ;AAAA,YACN,YAAY,CAAC,MAAM;AAAA,YACnB,OAAM,0CAAU,UAAV,mBAAiB;AAAA,YACvB,YAAY;AAAA,cACV,iBAAiBC,uDAAA,uBAAuB,mBAAmBC,uDAAAA,WAAW,IAAI;AAAA,YAC5E;AAAA,UACF;AAAA,QAAA,CACD;AAAA,MACH;AAAA,IAAA;;;;;;;;;;;;;;;;;;AC3EF,GAAG,gBAAgB,SAAS;"}
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"message-call-group.js","sources":["TUIKit/plugins/plugin-components/message-call/message-call-group.vue","../../HBuilderX/plugins/uniapp-cli-vite/uniComponent:/RDov6aG555uuL3RrLW1pbmktcHJvZ3JhbS9UVUlLaXQvcGx1Z2lucy9wbHVnaW4tY29tcG9uZW50cy9tZXNzYWdlLWNhbGwvbWVzc2FnZS1jYWxsLWdyb3VwLnZ1ZQ"],"sourcesContent":["<template>\n <div\n v-if=\"isCallMessage && conversationType === TYPES.CONV_GROUP\"\n :class=\"{ 'blink-text': isBlink }\"\n >\n {{ custom }}\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed } from '../../../adapter-vue';\nimport TUIChatEngine, { IMessageModel } from '@tencentcloud/chat-uikit-engine';\n\ninterface IProps {\n message: IMessageModel;\n signalingInfo: any;\n customContent: any;\n blinkMessageIDList?: string[];\n}\n\nconst props = withDefaults(defineProps<IProps>(), {\n message: () => ({}) as IMessageModel,\n signalingInfo: () => ({}),\n customContent: () => ({}),\n blinkMessageIDList: () => [],\n});\n\nconst TYPES = TUIChatEngine.TYPES;\nconst isCallMessage = computed(() => !!props.signalingInfo);\nconst conversationType = computed(() => props.message?.conversationType);\nconst custom = computed(() => props.customContent?.custom);\n\nconst isBlink = computed(() => {\n if (props.message?.ID) {\n return props.blinkMessageIDList?.includes(props.message.ID);\n }\n return false;\n});\n</script>\n\n<style scoped lang=\"scss\">\n@keyframes blink-text {\n 50% {\n color: #ff9c19;\n }\n}\n\n.blink-text {\n animation: blinkText 1s linear 3;\n}\n</style>\n","import Component from 'D:/项目/tk-mini-program/TUIKit/plugins/plugin-components/message-call/message-call-group.vue'\nwx.createComponent(Component)"],"names":["TUIChatEngine","computed"],"mappings":";;;;;;;;;;;;AAoBA,UAAM,QAAQ;AAOd,UAAM,QAAQA,cAAc,GAAA;AAC5B,UAAM,gBAAgBC,cAAAA,SAAS,MAAM,CAAC,CAAC,MAAM,aAAa;AAC1D,UAAM,mBAAmBA,cAAAA,SAAS,MAAA;;AAAM,yBAAM,YAAN,mBAAe;AAAA,KAAgB;AACvE,UAAM,SAASA,cAAAA,SAAS,MAAA;;AAAM,yBAAM,kBAAN,mBAAqB;AAAA,KAAM;AAEnD,UAAA,UAAUA,cAAAA,SAAS,MAAM;;AACzB,WAAA,WAAM,YAAN,mBAAe,IAAI;AACrB,gBAAO,WAAM,uBAAN,mBAA0B,SAAS,MAAM,QAAQ;AAAA,MAC1D;AACO,aAAA;AAAA,IAAA,CACR;;;;;;;;;;;;ACpCD,GAAG,gBAAgB,SAAS;"}
|
||||
Reference in New Issue
Block a user