|
|
|
@ -468,15 +468,15 @@ const keyboardheightchange = (e) => {
|
|
|
|
// uni.$emit("msgKeyHeight", availableHeight); // 传递实际可用高度
|
|
|
|
// uni.$emit("msgKeyHeight", availableHeight); // 传递实际可用高度
|
|
|
|
// writeStyle.value = `bottom: calc(${e.detail.height}px - env(safe-area-inset-bottom))`;
|
|
|
|
// writeStyle.value = `bottom: calc(${e.detail.height}px - env(safe-area-inset-bottom))`;
|
|
|
|
|
|
|
|
|
|
|
|
if (systemInfo.platform === 'ios') {
|
|
|
|
if (systemInfo.platform === "ios") {
|
|
|
|
const availableHeight = systemInfo.windowHeight - e.detail.height - ssff.value + 34;
|
|
|
|
const availableHeight = systemInfo.windowHeight - e.detail.height - ssff.value + 34;
|
|
|
|
uni.$emit("msgKeyHeight", availableHeight); // 传递实际可用高度
|
|
|
|
uni.$emit("msgKeyHeight", availableHeight); // 传递实际可用高度
|
|
|
|
writeStyle.value = `bottom: calc(${e.detail.height}px - env(safe-area-inset-bottom))`;
|
|
|
|
writeStyle.value = `bottom: calc(${e.detail.height}px - env(safe-area-inset-bottom))`;
|
|
|
|
}else{
|
|
|
|
} else {
|
|
|
|
const availableHeight = systemInfo.windowHeight - e.detail.height - ssff.value;
|
|
|
|
const availableHeight = systemInfo.windowHeight - e.detail.height - ssff.value;
|
|
|
|
uni.$emit("msgKeyHeight", availableHeight); // 传递实际可用高度
|
|
|
|
uni.$emit("msgKeyHeight", availableHeight); // 传递实际可用高度
|
|
|
|
writeStyle.value = `bottom: calc(${e.detail.height}px - env(safe-area-inset-bottom))`;
|
|
|
|
writeStyle.value = `bottom: calc(${e.detail.height}px - env(safe-area-inset-bottom))`;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
setTimeout(() => {
|
|
|
|
setTimeout(() => {
|
|
|
|
uni.$emit(events.ON_SCROLL_BOTTOM);
|
|
|
|
uni.$emit(events.ON_SCROLL_BOTTOM);
|
|
|
|
@ -845,26 +845,25 @@ const screenHeight = ref(0);
|
|
|
|
screenHeight.value = uni.getSystemInfoSync().windowHeight;
|
|
|
|
screenHeight.value = uni.getSystemInfoSync().windowHeight;
|
|
|
|
const chooseData = ref({});
|
|
|
|
const chooseData = ref({});
|
|
|
|
onMounted(() => {
|
|
|
|
onMounted(() => {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
const windowInfo = uni.getWindowInfo();
|
|
|
|
const windowInfo = uni.getWindowInfo();
|
|
|
|
console.log("windowInfo", windowInfo);
|
|
|
|
console.log("windowInfo", windowInfo);
|
|
|
|
let safeTop = windowInfo?.safeArea?.top || 0;
|
|
|
|
let safeTop = windowInfo?.safeArea?.top || 0;
|
|
|
|
|
|
|
|
|
|
|
|
// 如果 safeArea.top 为 0,根据不同平台使用不同默认值
|
|
|
|
// 如果 safeArea.top 为 0,根据不同平台使用不同默认值
|
|
|
|
if (safeTop === 0) {
|
|
|
|
if (safeTop === 0) {
|
|
|
|
const systemInfo = uni.getSystemInfoSync();
|
|
|
|
const systemInfo = uni.getSystemInfoSync();
|
|
|
|
// iOS 设备通常需要安全区域适配
|
|
|
|
// iOS 设备通常需要安全区域适配
|
|
|
|
if (systemInfo.platform === "ios") {
|
|
|
|
if (systemInfo.platform === 'ios') {
|
|
|
|
safeTop = systemInfo.statusBarHeight || 44; // iOS 状态栏高度通常为 44
|
|
|
|
safeTop = systemInfo.statusBarHeight || 44; // iOS 状态栏高度通常为 44
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
safeTop = systemInfo.statusBarHeight || 30;
|
|
|
|
safeTop = systemInfo.statusBarHeight || 30;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
ssff.value = safeTop + 14;
|
|
|
|
ssff.value = safeTop + 14;
|
|
|
|
} catch (error) {
|
|
|
|
} catch (error) {
|
|
|
|
ssff.value = 48; // 设置默认值
|
|
|
|
ssff.value = 48; // 设置默认值
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (uni.getStorageSync("im_sendParams")) {
|
|
|
|
if (uni.getStorageSync("im_sendParams")) {
|
|
|
|
chooseData.value = JSON.parse(uni.getStorageSync("im_sendParams")).jobDetail;
|
|
|
|
chooseData.value = JSON.parse(uni.getStorageSync("im_sendParams")).jobDetail;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|