hookehuyr

fix(页面样式): 调整多个页面高度和背景色

修复滚动区域高度计算问题,统一从100vh改为92vh以减去header和TabBar高度
将myFavorites和myAuthCar页面背景色从白色改为#f8f9fa
在myAuthCar页面添加useDidShow钩子确保数据同步
<!--
* @Date: 2022-09-19 14:11:06
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-07-18 14:39:24
* @LastEditTime: 2025-07-18 15:20:04
* @FilePath: /jgdl/src/pages/myAuthCar/index.vue
* @Description: 我的认证车页面
-->
<template>
<view class="flex flex-col bg-white min-h-screen">
<view class="flex flex-col min-h-screen" style="background-color: #f8f9fa;">
<!-- Auth Car List -->
<view class="flex-1">
<!-- 滚动列表 -->
......@@ -111,7 +111,7 @@
<script setup>
import { ref, computed, onMounted } from 'vue'
import Taro from '@tarojs/taro'
import Taro, { useDidShow } from '@tarojs/taro'
import './index.less'
// 导入接口
import { getMyListingVehicleAPI } from '@/api/car'
......@@ -144,7 +144,7 @@ const pageSize = ref(10)
*/
const scrollStyle = computed(() => {
return {
height: 'calc(100vh)' // 减去header和TabBar的高度
height: 'calc(92vh)' // 减去header和TabBar的高度
}
})
......@@ -254,8 +254,8 @@ const onItemClick = (item) => {
* @param {Object} item - 车辆信息
*/
const handleSellClick = (item) => {
// 翻车的状态为待审核
item.review_status = 1;
// 不在这里修改状态,让下一个页面处理状态修改
// 页面返回时会通过 useDidShow 重新加载数据
Taro.navigateTo({
url: `/pages/sell/index?id=${item.id}&mode=edit&type=auth`
})
......@@ -291,6 +291,14 @@ const authCar = (carId) => {
onMounted(() => {
initData()
})
// 页面显示时重新加载数据,确保状态同步
useDidShow(() => {
// 如果不是首次加载,重新获取数据
if (authCars.value.length > 0) {
initData()
}
})
</script>
<script>
......
......@@ -186,7 +186,7 @@ const getVerificationStatusClass = (status) => {
*/
const scrollStyle = computed(() => {
return {
height: 'calc(100vh)' // 减去header和TabBar的高度
height: 'calc(92vh)' // 减去header和TabBar的高度
}
})
......
<!--
* @Date: 2022-09-19 14:11:06
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-07-11 10:01:52
* @LastEditTime: 2025-07-18 15:19:27
* @FilePath: /jgdl/src/pages/myFavorites/index.vue
* @Description: 我的关注页面
-->
<template>
<view class="flex flex-col bg-white min-h-screen">
<view class="flex flex-col min-h-screen" style="background-color: #f8f9fa;">
<!-- Favorites List -->
<view class="flex-1">
<!-- 滚动列表 -->
......@@ -189,7 +189,7 @@ const toastType = ref('success')
*/
const scrollStyle = computed(() => {
return {
height: 'calc(100vh)' // 减去header和TabBar的高度
height: 'calc(92vh)' // 减去header和TabBar的高度
}
})
......