登录页面和文件打开方式
This commit is contained in:
@@ -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)
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user