登录页面和文件打开方式

This commit is contained in:
2026-07-31 16:38:01 +08:00
parent 09f4d3ba52
commit 314a714248
8 changed files with 413 additions and 297 deletions

View File

@@ -325,6 +325,7 @@
chooseFile
} from '@/uni_modules/lime-choose-file'
import socketManager from '../../utils/socket';
import { openFile as openFileNative } from '@/utils/fileOpener.js'
const friendSocketStore = useFriendSocketStore()
// 连接实时通讯eriendsocket
@@ -490,15 +491,7 @@
}
// 打开文件
const openFile = (url) => {
uni.downloadFile({
url: url,
success: (res) => {
uni.openDocument({
filePath: res.tempFilePath,
showMenu: true
})
}
})
downloadAndOpen(url);
}
// 文件大小格式化
const formatFileSize = (size) => {
@@ -1131,14 +1124,16 @@
if (reason === 'pc offline') {
isThinking.value = false
socketStore.authFailReason = ''
nextTick(() => {
uni.showModal({
title: '提示',
content: 'PC端不在线不可聊天',
showCancel: false,
confirmText: '知道了'
})
uni.showToast({
title: 'PC端不在线',
icon: 'none',
duration: 1500
})
setTimeout(() => {
uni.reLaunch({
url: '/pages/Login/Login'
})
}, 1500)
}
})