修改bug,优化导航
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
<template>
|
||||
<view class="page">
|
||||
<view class="status-bar" :style="{ height: statusBarHeight + 'px' }"></view>
|
||||
<uni-nav-bar title="巡检详情" backgroundColor="transparent" :border="false" left-icon="left"
|
||||
@click-left="goBack" />
|
||||
|
||||
<scroll-view scroll-y class="scroll">
|
||||
<!-- 加载中 -->
|
||||
<view class="loading-wrap" v-if="loading">
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<view class="status-bar" :style="{ height: statusBarHeight + 'px' }"></view>
|
||||
<!-- <view class="status-bar" :style="{ height: statusBarHeight + 'px' }"></view>
|
||||
<uni-nav-bar title="收益详情" backgroundColor="transparent" :border="false" left-icon="left"
|
||||
@click-left="goBack" />
|
||||
@click-left="goBack" /> -->
|
||||
|
||||
<!-- 暂无数据 -->
|
||||
<view v-if="isLoaded && !noticeDetail.noticeTitle" class="empty-state">
|
||||
@@ -51,7 +51,6 @@
|
||||
// =====方法====
|
||||
onLoad((options) =>{
|
||||
currentNoticeId.value = options?.id
|
||||
console.log('收益id---------',currentNoticeId.value)
|
||||
if(currentNoticeId.value){
|
||||
getDetailsData(currentNoticeId.value)
|
||||
} else {
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<template>
|
||||
<view class="page">
|
||||
<view class="status_bar" :style="{ height: statusBarHeight + 'px' }"></view>
|
||||
<!-- 固定导航栏 -->
|
||||
<!-- <view class="status_bar" :style="{ height: statusBarHeight + 'px' }"></view>
|
||||
|
||||
<uni-nav-bar
|
||||
left-icon="left"
|
||||
title="公区收益"
|
||||
background-color="#F9F9F9"
|
||||
@clickLeft="narBack"
|
||||
/>
|
||||
/> -->
|
||||
|
||||
<!-- 滚动区域 -->
|
||||
<scroll-view
|
||||
|
||||
Reference in New Issue
Block a user