修改bug,优化导航
This commit is contained in:
@@ -43,7 +43,7 @@
|
||||
|
||||
<script setup>
|
||||
import {ref} from 'vue'
|
||||
import {onLoad,onReachBottom,onPullDownRefresh} from '@dcloudio/uni-app'
|
||||
import {onLoad,onReachBottom,onPullDownRefresh,onBackPress} from '@dcloudio/uni-app'
|
||||
import {getInspectionList} from '../api/apiSub.js'
|
||||
import moment from 'moment' // 新增
|
||||
|
||||
@@ -142,11 +142,19 @@
|
||||
|
||||
// ---------- 返回 ----------
|
||||
const goBack = () => {
|
||||
uni.switchTab({
|
||||
url: '/pages/serviceIndex/serviceIndex'
|
||||
})
|
||||
uni.navigateBack()
|
||||
}
|
||||
|
||||
// ---------- 页面返回拦截 ----------
|
||||
onBackPress(() => {
|
||||
const pages = getCurrentPages()
|
||||
if (pages.length > 1) {
|
||||
return false
|
||||
}
|
||||
uni.switchTab({ url: '/pages/serviceIndex/serviceIndex' })
|
||||
return true
|
||||
})
|
||||
|
||||
// ---------- 跳转详情 ----------
|
||||
const goToInspectionDetail = (item) => {
|
||||
uni.navigateTo({
|
||||
@@ -167,6 +175,9 @@
|
||||
flex: 1;
|
||||
padding: 20rpx 40rpx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.status-bar {
|
||||
@@ -239,7 +250,8 @@
|
||||
}
|
||||
//滚动容器 App重点:高度自适应 \*/
|
||||
.scroll-view {
|
||||
height: calc(100vh - 140rpx);
|
||||
flex: 1;
|
||||
height: 0;
|
||||
}
|
||||
.list-container {
|
||||
display: flex;
|
||||
|
||||
Reference in New Issue
Block a user