| | |
| | | <template> |
| | | <div class="bg-white"> |
| | | <div class="flex items-center justify-between px-4 py-2 text-black" style="border-bottom: 1px solid #e0e0e0;"> |
| | | <div class="text-lg font-bold">AI客服</div> |
| | | <div class="cursor-pointer" @click="$emit('close')"> |
| | | <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor"> |
| | | <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" /> |
| | | </svg> |
| | | </div> |
| | | </div> |
| | | <iframe src="http://www.xpump.net/iie-mobile?v=333323332" class="w-full h-[calc(100%-44px)] border-none overflow-hidden"></iframe> |
| | | |
| | | <iframe |
| | | ref="iframeRef" |
| | | src="http://www.xpump.net/iie-mobile?v=3333233332" |
| | | class="w-full h-full border-none overflow-hidden" |
| | | ></iframe> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup lang="ts" name="CustomerService"></script> |
| | | <script setup lang="ts" name="CustomerService"> |
| | | const emit = defineEmits(['close']); |
| | | |
| | | import { ref, onMounted } from 'vue'; |
| | | |
| | | const iframeRef = ref<HTMLIFrameElement>(); |
| | | |
| | | onMounted(() => { |
| | | window.addEventListener('message', (event) => { |
| | | if (event.data.type === 'close') { |
| | | emit('close'); |
| | | } |
| | | }); |
| | | }); |
| | | </script> |
| | | <style scoped lang="scss"></style> |