master
wangxia 1 month ago
parent 1dc647705d
commit 7ae76dfe48

@ -468,15 +468,15 @@ const keyboardheightchange = (e) => {
// uni.$emit("msgKeyHeight", availableHeight); //
// 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;
uni.$emit("msgKeyHeight", availableHeight); //
writeStyle.value = `bottom: calc(${e.detail.height}px - env(safe-area-inset-bottom))`;
}else{
const availableHeight = systemInfo.windowHeight - e.detail.height - ssff.value;
uni.$emit("msgKeyHeight", availableHeight); //
writeStyle.value = `bottom: calc(${e.detail.height}px - env(safe-area-inset-bottom))`;
}
} else {
const availableHeight = systemInfo.windowHeight - e.detail.height - ssff.value;
uni.$emit("msgKeyHeight", availableHeight); //
writeStyle.value = `bottom: calc(${e.detail.height}px - env(safe-area-inset-bottom))`;
}
}
setTimeout(() => {
uni.$emit(events.ON_SCROLL_BOTTOM);
@ -845,26 +845,25 @@ const screenHeight = ref(0);
screenHeight.value = uni.getSystemInfoSync().windowHeight;
const chooseData = ref({});
onMounted(() => {
try {
try {
const windowInfo = uni.getWindowInfo();
console.log("windowInfo", windowInfo);
let safeTop = windowInfo?.safeArea?.top || 0;
// safeArea.top 0使
if (safeTop === 0) {
const systemInfo = uni.getSystemInfoSync();
// iOS
if (systemInfo.platform === 'ios') {
safeTop = systemInfo.statusBarHeight || 44; // iOS 44
} else {
safeTop = systemInfo.statusBarHeight || 30;
}
}
ssff.value = safeTop + 14;
} catch (error) {
ssff.value = 48; //
}
try {
const windowInfo = uni.getWindowInfo();
console.log("windowInfo", windowInfo);
let safeTop = windowInfo?.safeArea?.top || 0;
// safeArea.top 0使
if (safeTop === 0) {
const systemInfo = uni.getSystemInfoSync();
// iOS
if (systemInfo.platform === "ios") {
safeTop = systemInfo.statusBarHeight || 44; // iOS 44
} else {
safeTop = systemInfo.statusBarHeight || 30;
}
}
ssff.value = safeTop + 14;
} catch (error) {
ssff.value = 48; //
}
if (uni.getStorageSync("im_sendParams")) {
chooseData.value = JSON.parse(uni.getStorageSync("im_sendParams")).jobDetail;
}

Loading…
Cancel
Save