工单详情
This commit is contained in:
@@ -109,15 +109,12 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 工单创建弹窗 -->
|
||||
<WorkcaseCreator v-if="showWorkcaseCreator" :show="showWorkcaseCreator" @close="hideCreator"
|
||||
@success="onWorkcaseCreated" />
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, nextTick, onMounted } from 'vue'
|
||||
import WorkcaseCreator from '@/components/WorkcaseCreator/WorkcaseCreator.uvue'
|
||||
import { guestAPI, aiChatAPI, workcaseChatAPI } from '@/api'
|
||||
import type { TbWorkcaseDTO } from '@/types'
|
||||
import { AGENT_ID } from '@/config'
|
||||
@@ -233,38 +230,22 @@
|
||||
title: '智能助手'
|
||||
})
|
||||
|
||||
// 获取系统信息和安全区域
|
||||
uni.getSystemInfo({
|
||||
success: (res) => {
|
||||
console.log('系统信息:', res)
|
||||
console.log('状态栏高度:', res.statusBarHeight)
|
||||
statusBarHeight.value = res.statusBarHeight || 0
|
||||
console.log('安全区域:', res.safeArea)
|
||||
console.log('安全区域insets:', res.safeAreaInsets)
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
// 获取胶囊按钮信息(仅小程序),计算header位置
|
||||
try {
|
||||
const menuButtonInfo = uni.getMenuButtonBoundingClientRect()
|
||||
console.log('胶囊按钮信息:', menuButtonInfo)
|
||||
|
||||
// 计算header的paddingTop和总高度
|
||||
// paddingTop = 胶囊按钮的top值
|
||||
// 总高度 = 胶囊按钮bottom值
|
||||
headerPaddingTop.value = menuButtonInfo.top
|
||||
headerTotalHeight.value = menuButtonInfo.bottom
|
||||
|
||||
console.log('header paddingTop:', headerPaddingTop.value)
|
||||
console.log('header totalHeight:', headerTotalHeight.value)
|
||||
} catch (e) {
|
||||
console.log('获取胶囊按钮信息失败:', e)
|
||||
// 使用默认值
|
||||
headerPaddingTop.value = 44
|
||||
headerTotalHeight.value = 76
|
||||
}
|
||||
// #endif
|
||||
}
|
||||
})
|
||||
// 获取窗口信息
|
||||
const windowInfo = uni.getWindowInfo()
|
||||
statusBarHeight.value = windowInfo.statusBarHeight || 0
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
// 获取胶囊按钮信息(仅小程序),计算header位置
|
||||
try {
|
||||
const menuButtonInfo = uni.getMenuButtonBoundingClientRect()
|
||||
headerPaddingTop.value = menuButtonInfo.top
|
||||
headerTotalHeight.value = menuButtonInfo.bottom
|
||||
} catch (e) {
|
||||
// 使用默认值
|
||||
headerPaddingTop.value = 44
|
||||
headerTotalHeight.value = 76
|
||||
}
|
||||
// #endif
|
||||
})
|
||||
|
||||
// 发送消息
|
||||
|
||||
Reference in New Issue
Block a user