1轮修复
This commit is contained in:
@@ -74,6 +74,7 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted } from 'vue'
|
||||
import { workcaseChatAPI } from '@/api/workcase'
|
||||
import { MEET_URL } from '@/config'
|
||||
|
||||
const statusBarHeight = ref(44)
|
||||
const navBarHeight = ref(88)
|
||||
@@ -288,8 +289,24 @@ function copyUrl() {
|
||||
return
|
||||
}
|
||||
|
||||
// 解析iframeUrl并构建完整的会议链接
|
||||
let fullMeetingUrl = meetingUrl.value
|
||||
|
||||
// 检查是否为微信小程序环境
|
||||
// #ifdef MP-WEIXIN
|
||||
// 获取页面参数中的iframeUrl
|
||||
const pages = getCurrentPages()
|
||||
const currentPage = pages[pages.length - 1] as any
|
||||
const iframeUrl = currentPage?.options?.iframeUrl || ''
|
||||
|
||||
if (iframeUrl) {
|
||||
// 构建正确的会议链接:MEET_URL + iframeUrl
|
||||
fullMeetingUrl = `${MEET_URL}${iframeUrl}`
|
||||
}
|
||||
// #endif
|
||||
|
||||
uni.setClipboardData({
|
||||
data: meetingUrl.value,
|
||||
data: fullMeetingUrl,
|
||||
success: () => {
|
||||
uni.showToast({ title: '链接已复制', icon: 'success' })
|
||||
},
|
||||
@@ -306,10 +323,26 @@ function openInBrowser() {
|
||||
return
|
||||
}
|
||||
|
||||
// 解析iframeUrl并构建完整的会议链接
|
||||
let fullMeetingUrl = meetingUrl.value
|
||||
|
||||
// 检查是否为微信小程序环境且会议链接不是完整的MEET_URL格式
|
||||
// #ifdef MP-WEIXIN
|
||||
// 获取页面参数中的iframeUrl
|
||||
const pages = getCurrentPages()
|
||||
const currentPage = pages[pages.length - 1] as any
|
||||
const iframeUrl = currentPage?.options?.iframeUrl || ''
|
||||
|
||||
if (iframeUrl) {
|
||||
// 构建正确的会议链接:MEET_URL + iframeUrl
|
||||
fullMeetingUrl = `${MEET_URL}${iframeUrl}`
|
||||
}
|
||||
// #endif
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
// 微信小程序:先复制链接,然后提示用户通过右上角菜单在浏览器中打开
|
||||
uni.setClipboardData({
|
||||
data: meetingUrl.value,
|
||||
data: fullMeetingUrl,
|
||||
success: () => {
|
||||
uni.showModal({
|
||||
title: '链接已复制',
|
||||
@@ -329,10 +362,10 @@ function openInBrowser() {
|
||||
// @ts-ignore
|
||||
if (typeof plus !== 'undefined') {
|
||||
// App环境:使用plus打开系统浏览器
|
||||
plus.runtime.openURL(meetingUrl.value)
|
||||
plus.runtime.openURL(fullMeetingUrl)
|
||||
} else {
|
||||
// H5环境:新窗口打开
|
||||
window.open(meetingUrl.value, '_blank')
|
||||
window.open(fullMeetingUrl, '_blank')
|
||||
}
|
||||
// #endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user