修改bug,优化导航
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
<template>
|
||||
<view class="repair-page">
|
||||
<view class="status_bar" :style="{ height: statusBarHeight + 'px' }"></view>
|
||||
<!-- <view class="status_bar" :style="{ height: statusBarHeight + 'px' }"></view> -->
|
||||
<!-- 顶部导航栏 -->
|
||||
<view class="nav-bar">
|
||||
<!-- <view class="nav-bar">
|
||||
<view class="nav-left" @tap="goBack">
|
||||
<image src="https://wuyeadmin.bugtc.com/images/home/arr-left.png" style="width: 18px; height: 18px;"></image>
|
||||
</view>
|
||||
<view class="nav-title">在线报修</view>
|
||||
<view class="nav-right"></view>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<!-- 报修类型Tab -->
|
||||
<scroll-view class="scroll-container" scroll-y="true"
|
||||
@@ -108,7 +108,7 @@
|
||||
|
||||
<script setup>
|
||||
import { ref, watch } from 'vue';
|
||||
import { onLoad,onUnload } from '@dcloudio/uni-app';
|
||||
import { onLoad, onShow, onUnload } from '@dcloudio/uni-app';
|
||||
import { getQueryRepair } from '../api/api.js';
|
||||
|
||||
// 报修类型(public:公共报修,personal:个人报修)
|
||||
@@ -176,8 +176,9 @@ const fetchRepairList = async () => {
|
||||
}
|
||||
};
|
||||
|
||||
// 监听状态变化自动刷新
|
||||
// 监听状态变化自动刷新(切换 tab 时重置页码)
|
||||
watch(activeStatus, () => {
|
||||
pageNum.value = 1;
|
||||
fetchRepairList();
|
||||
});
|
||||
|
||||
@@ -220,8 +221,12 @@ onLoad(() => {
|
||||
// maintenanceItemId.value = option.maintenanceProjectId || '' // 接收维修项目id
|
||||
fetchRepairList()
|
||||
});
|
||||
onShow(() => {
|
||||
// 从其他页面返回时刷新列表
|
||||
fetchRepairList()
|
||||
});
|
||||
onUnload(() =>{
|
||||
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -229,8 +234,10 @@ onUnload(() =>{
|
||||
/* 页面整体样式 */
|
||||
.repair-page {
|
||||
background: linear-gradient(to bottom left, #E2F0FF 0%, #f9f9f9 50%);
|
||||
min-height: 100vh;
|
||||
height: 100vh;
|
||||
padding: 0 40rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.status_bar {
|
||||
height: var(--status-bar-height);
|
||||
@@ -277,7 +284,6 @@ onUnload(() =>{
|
||||
.scroll-container {
|
||||
flex: 1;
|
||||
width: 100%;
|
||||
height: calc(100vh - 100px);
|
||||
overflow-y: auto;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
@@ -285,7 +291,7 @@ onUnload(() =>{
|
||||
.repair-type-tabs {
|
||||
display: flex;
|
||||
/* background-color: #fff; */
|
||||
/* padding: 10px; */
|
||||
padding: 10px;
|
||||
}
|
||||
.type-tab {
|
||||
flex: 1;
|
||||
@@ -351,7 +357,7 @@ onUnload(() =>{
|
||||
|
||||
/* 报修列表 */
|
||||
.repair-list {
|
||||
padding: 28rpx 0rpx;
|
||||
padding: 28rpx 0rpx 0;
|
||||
}
|
||||
.repair-item {
|
||||
background-color: #fff;
|
||||
@@ -359,6 +365,9 @@ onUnload(() =>{
|
||||
padding: 15px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.repair-item:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/* 列表项头部 */
|
||||
.item-header {
|
||||
@@ -425,14 +434,18 @@ onUnload(() =>{
|
||||
color: #666;
|
||||
line-height: 1.5;
|
||||
margin-bottom: 10px;
|
||||
word-break: break-all;
|
||||
white-space: normal;
|
||||
overflow-wrap: break-word;
|
||||
/* background-color: #d7e4f5; */
|
||||
}
|
||||
|
||||
/* 图片占位 */
|
||||
.item-imgs {
|
||||
display: flex;
|
||||
/* gap: 12px; */
|
||||
margin-bottom: 10px;
|
||||
flex-wrap: wrap;
|
||||
margin: -6rpx;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
.img-placeholder {
|
||||
width: 80px;
|
||||
@@ -442,7 +455,7 @@ onUnload(() =>{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-right: 8px;
|
||||
margin: 6rpx;
|
||||
}
|
||||
.empty-state {
|
||||
display: flex;
|
||||
|
||||
Reference in New Issue
Block a user