提交 79476f75 作者: Hao

新增聊天

父级 06549bcf
NODE_ENV=development
VITE_USER_APP_API_URL=192.168.31.120
VITE_USER_APP_API_URL=http://im.wei-it.com/api
VITE_USER_APP_WS_API_URL=ws://im.wei-it.com/ws/
NODE_ENV=production
VITE_USER_APP_API_URL=192.168.31.112
\ No newline at end of file
VITE_USER_APP_API_URL=http://im.wei-it.com/api
VITE_USER_APP_WS_API_URL=ws://im.wei-it.com/ws/
\ No newline at end of file
......@@ -10,10 +10,11 @@
/>
<img
src="../assets/icon_image_s1_01.png"
@click="upfile"
@click="upImgfile"
class="icon emoji"
alt=""
/>
<img
src="../assets/icon_folder_s1_01.png"
@click="upfile"
......@@ -53,11 +54,18 @@
<input
ref="file"
style="display: none;"
type="file"
@change="fileImgChange"
/>
<input
ref="imgFile"
style="display: none;"
accept="image/bmp,image/jpeg,image/jpg,image/png"
type="file"
@change="fileImgChange"
/>
</div>
<!-- accept="image/bmp,image/jpeg,image/jpg,image/png" -->
</template>
<script lang="ts" setup>
import emotion from './IndexComponent.vue'
......@@ -67,11 +75,11 @@ import { upLoadFilesHander } from '../minxins/UploadMixin'
const inputVal = ref('')
const elAutocomplete = ref<any>(null)
const file = ref<any>(null)
const imgFile = ref<any>(null)
const imgShowWidth = ref<number>(50)
const imgShowHeight = ref<number>(50)
const showEmotion = ref<boolean>(false)
const handleEmotion = (i: any) => {
console.log(i, '打印')
elAutocomplete.value.innerHTML += i
inputVal.value = elAutocomplete.value.innerHTML
showEmotion.value = false
......@@ -80,6 +88,9 @@ const handleEmotion = (i: any) => {
const upfile = () => {
file.value.click()
}
const upImgfile = () => {
imgFile.value.click()
}
//上传的数据
const fileImgChange = async () => {
var e: any = window.event || event
......
......@@ -331,11 +331,11 @@
type="file"
@change="fileImgChange"
/> -->
<!-- accept="image/bmp,image/jpeg,image/jpg,image/png" -->
<input
type="file"
ref="requireFile"
style="display: none;"
accept="image/bmp,image/jpeg,image/jpg,image/png"
@change="fileImgChange"
/>
<div
......@@ -491,7 +491,6 @@ const defaultStyle: {
transition: 'all 0.6s linear',
}
const requireFileOk = () => {
console.log(requireFile.value, 'value')
requireFile.value.click()
}
const rules = reactive({
......@@ -581,8 +580,6 @@ const connectMsg = () => {
})
let VUE_APP_API_URL = import.meta.env.VITE_USER_APP_API_URL
const toIp = `ws://${VUE_APP_API_URL}:8081?type=yk&code=${useUser.userInfo.username}&kf=${store.customerInfo.username}`
console.log(toIp, 'toIpWS')
console.log(toIp, 'toIpWS001')
useUser.connect()
initWebSocket(toIp)
setTimeout(() => {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论