acdr-ui/dist/dev/mp-weixin/pages/message/privatechat.js.map

1 line
1.6 KiB
Plaintext

{"version":3,"file":"privatechat.js","sources":["../../../../../src/pages/message/privatechat.vue","../../../../../uniPage:/cGFnZXMvbWVzc2FnZS9wcml2YXRlY2hhdC52dWU"],"sourcesContent":["<route lang=\"json5\" type=\"page\">\n{\n layout: 'default',\n style: {\n navigationBarTitleText: '聊天',\n },\n}\n</route>\n\n<template>\n <view>\n <text>客服聊天系统</text>\n <input v-model=\"message\" placeholder=\"输入消息\" />\n <button @click=\"sendMessageToServer\">发送</button>\n </view>\n</template>\n\n<script setup>\nimport useWebSocket from '@/service/webSocket'\nimport { ref } from 'vue'\n\nconst { connectWebSocket, sendMessage, closeWebSocket } = useWebSocket()\n\nconst message = ref('')\n\nconst sendMessageToServer = () => {\n if (message.value.trim() !== '') {\n sendMessage(message.value)\n message.value = ''\n }\n}\n\nonMounted(() => {\n connectWebSocket() // 组件加载时连接 WebSocket\n})\n\nonUnmounted(() => {\n closeWebSocket() // 组件卸载时关闭 WebSocket 连接\n})\n</script>\n","import MiniProgramPage from 'D:/App/Work/addr/acdr-ui/src/pages/message/privatechat.vue'\nwx.createPage(MiniProgramPage)"],"names":["useWebSocket","ref","onMounted","onUnmounted","MiniProgramPage"],"mappings":";;;;;;;;;;AAqBA,UAAA,EAAA,kBAAA,aAAA,eAAA,IAAAA,kBAAAA,aAAA;AAEA,UAAA,UAAAC,cAAA,IAAA,EAAA;AAEA,UAAA,sBAAA,MAAA;AACA,UAAA,QAAA,MAAA,KAAA,MAAA,IAAA;AACA,oBAAA,QAAA,KAAA;AACA,gBAAA,QAAA;AAAA,MACA;AAAA,IACA;AAEAC,kBAAAA,UAAA,MAAA;AACA,uBAAA;AAAA,IACA,CAAA;AAEAC,kBAAAA,YAAA,MAAA;AACA,qBAAA;AAAA,IACA,CAAA;;;;;;;;;;ACrCA,GAAG,WAAWC,SAAe;"}