Compare commits
No commits in common. "c6ce198c31673aaf2881a3e082a7391acf51ba6a" and "80772749b2ed2c5b6f8c3bb479eae2453b58c9d9" have entirely different histories.
c6ce198c31
...
80772749b2
@ -118,36 +118,38 @@ const readnum = ref(0);
|
||||
const agreenum = ref(0);
|
||||
const isAgree = ref(0);
|
||||
const user_uuid = ref("");
|
||||
const bottomHeight = ref(65);
|
||||
const NAV_BAR_HEIGHT_PX = 44;
|
||||
const WEBVIEW_BOTTOM_PX = 55;
|
||||
const WEBVIEW_BOTTOM_PX = 65;
|
||||
const webviewTopPx = ref(88);
|
||||
const webviewBottomPx = ref(WEBVIEW_BOTTOM_PX);
|
||||
const webviewHeightPx = ref(600);
|
||||
|
||||
const webviewStyles = ref({
|
||||
width: "100%",
|
||||
top: `${webviewTopPx.value}px`,
|
||||
bottom: `${webviewBottomPx.value}px`
|
||||
height: `${webviewHeightPx.value}px`,
|
||||
bottom: `65px`,
|
||||
});
|
||||
const applyWebviewLayout = () => {
|
||||
|
||||
|
||||
};
|
||||
const initWebviewLayout = () => {
|
||||
const resInfo = uni.getSystemInfoSync();
|
||||
const statusBarHeight = Number(resInfo.statusBarHeight || 0);
|
||||
const safeAreaBottom = Number(
|
||||
(resInfo.safeAreaInsets && resInfo.safeAreaInsets.bottom) || 0
|
||||
);
|
||||
const windowHeight = Number(resInfo.windowHeight || 0);
|
||||
webviewTopPx.value = Math.round(statusBarHeight + NAV_BAR_HEIGHT_PX);
|
||||
webviewBottomPx.value = Math.round(WEBVIEW_BOTTOM_PX + safeAreaBottom);
|
||||
webviewHeightPx.value = Math.max(
|
||||
200,
|
||||
Math.round(windowHeight - webviewTopPx.value - WEBVIEW_BOTTOM_PX)
|
||||
);
|
||||
webviewStyles.value = {
|
||||
width: "100%",
|
||||
top: `${webviewTopPx.value}px`,
|
||||
bottom: `${webviewBottomPx.value}px`
|
||||
height: `${webviewHeightPx.value}px`,
|
||||
bottom: `${WEBVIEW_BOTTOM_PX}px`,
|
||||
};
|
||||
};
|
||||
const initWebviewLayout = () => {
|
||||
applyWebviewLayout();
|
||||
};
|
||||
const onWindowResize = () => {
|
||||
applyWebviewLayout();
|
||||
};
|
||||
|
||||
const getCollect = () => {
|
||||
api
|
||||
@ -298,7 +300,6 @@ const goBack = () => {
|
||||
const webviewRef = ref(null);
|
||||
|
||||
onShow(() => {
|
||||
initWebviewLayout();
|
||||
setTimeout(() => {
|
||||
uni.hideLoading();
|
||||
}, 2000);
|
||||
@ -306,9 +307,6 @@ onShow(() => {
|
||||
// plus.screen.lockOrientation('portrait-primary');
|
||||
});
|
||||
onUnload(() => {
|
||||
if (typeof uni.offWindowResize === "function") {
|
||||
uni.offWindowResize(onWindowResize);
|
||||
}
|
||||
// console.log('onUnload');
|
||||
// plus.screen.lockOrientation('portrait-primary');
|
||||
});
|
||||
@ -321,10 +319,7 @@ onLoad((query) => {
|
||||
title: '加载中',
|
||||
mask: true,
|
||||
});
|
||||
initWebviewLayout();
|
||||
if (typeof uni.onWindowResize === "function") {
|
||||
uni.onWindowResize(onWindowResize);
|
||||
}
|
||||
//initWebviewLayout();
|
||||
const userInfo = uni.getStorageSync("userInfo");
|
||||
if (query.type) {
|
||||
type.value = query.type;
|
||||
@ -1117,15 +1112,15 @@ const shareToWeibo = () => {
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 55px;
|
||||
height: 60px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
z-index: 9999999999999999999999999999999999999999999999999999999999999999;
|
||||
z-index: 99;
|
||||
background-color: #fff;
|
||||
}
|
||||
.bottom-cell {
|
||||
flex: 1;
|
||||
height: 100%;
|
||||
height: 55px;
|
||||
border-right: 2rpx solid #ccc;
|
||||
border-top: 2rpx solid #ccc;
|
||||
display: flex;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user