feat:我的界面调整

This commit is contained in:
2026-07-23 14:11:14 +08:00
parent f992db5738
commit 794bf27ee7
+52 -4
View File
@@ -1,6 +1,6 @@
<template>
<view class="mine_warp" :class="platformType ? '' : 'iosplatformType'">
<view class="mine_header">
<view class="mine_header" :style="headerStyle">
<view class="mine_login_data" v-if="currentUserData && Object.keys(currentUserData).length !== 0">
<view class="mine_data">
<up-image
@@ -414,9 +414,14 @@ export default {
platformType: true,
kefuUnreadCount: 0,
kefuUnreadTimer: null,
headerStyle: {},
};
},
created() {
this.headerStyle = this.calcHeaderStyle();
},
onShow() {
this.headerStyle = this.calcHeaderStyle();
this.userData = getStorageFun(USER_DATA);
/*#ifdef APP-PLUS*/
uni.hideTabBar({
@@ -436,8 +441,50 @@ export default {
onUnload() {
this.stopKefuUnreadPolling();
},
mounted() { },
mounted() {
this.headerStyle = this.calcHeaderStyle();
},
methods: {
calcHeaderStyle() {
let paddingTop = '90rpx';
let paddingRight = '30rpx';
// #ifdef MP-WEIXIN || MP
try {
const menuButton = uni.getMenuButtonBoundingClientRect();
const sysInfo = uni.getSystemInfoSync();
if (menuButton && menuButton.top && menuButton.top > 0) {
paddingTop = (menuButton.top + 2) + 'px';
if (sysInfo && sysInfo.windowWidth && menuButton.left) {
paddingRight = (sysInfo.windowWidth - menuButton.left + 10) + 'px';
}
} else {
const statusBarHeight = (sysInfo && sysInfo.statusBarHeight) || 20;
paddingTop = (statusBarHeight + 10) + 'px';
paddingRight = '96px';
}
} catch (e) {
paddingTop = '90rpx';
paddingRight = '96px';
}
// #endif
// #ifdef APP-PLUS
try {
const sysInfo = uni.getSystemInfoSync();
if (sysInfo && sysInfo.statusBarHeight) {
paddingTop = (sysInfo.statusBarHeight + 10) + 'px';
}
} catch (e) {
paddingTop = '90rpx';
}
// #endif
return {
paddingTop,
paddingRight
};
},
copyData,
async refreshKefuUnreadCount() {
const userId = this.currentUserData && this.currentUserData.id;
@@ -608,8 +655,9 @@ export default {
#f2ebff 0%,
rgba(245, 245, 247, 0) 100%,
#ffffff 100%);
/* 将图片居中显示 */
padding: 90rpx 20rpx 0;
padding-left: 30rpx;
padding-bottom: 0;
box-sizing: border-box;
.mine_login_data {
display: flex;