# Conflicts:
#	wuye-manager-uniapp/pages/index/index.vue
This commit is contained in:
Zy
2026-05-20 09:20:48 +08:00
18 changed files with 455 additions and 352 deletions

View File

@@ -17,6 +17,8 @@ export const getLoginBySms = (data) =>{
export const getResetPassword = (data) =>{
return post('/api/butler/auth/forgetPassword',data)
}
// ======首页=====
// 获取小区列表
export const getVillageList = (data) =>{
@@ -38,6 +40,12 @@ export const getTodayInspection = () =>{
export const getNewNoticeData = () =>{
return get('/manage/notice/new')
}
// 获取bannar图
export const getBannarList = () =>{
return get('/api/manage/banner/list')
}
// ============通知列表===========
export const getNoticeList = (data) =>{
@@ -58,7 +66,7 @@ export const addRepairList = (data) =>{
}
// 上传图片
export const uploadFile = (filePath) => {
return upload(filePath,' /resource/oss/upload');
return upload(filePath,'/resource/oss/upload');
}
// 查询一键开门
@@ -75,6 +83,10 @@ export const switchOpenDoor = (data) =>{
export const getSettingInfo = () =>{
return get('/api/setting/info')
}
// 上报记录
export const getMyOrderList = (data) =>{
return get('/manage/repair/order/myorderlist',data)
}
// =====设置=======
// 修改密码
export const changePassword = (data) =>{

View File

@@ -100,14 +100,14 @@ onLoad((options) => {
repairId.value = options.projectId
}
// ✅ 监听返回选择的项目
// 监听返回选择的项目
uni.$on('selectRepairProject', (data) => {
repairProject.value = `${data.category}-${data.project}`
repairId.value = data.projectId
})
})
// ✅ 页面卸载时移除监听(必须加)
// 页面卸载时移除监听
onUnload(() => {
uni.$off('selectRepairProject')
})
@@ -155,7 +155,7 @@ const uploadImages = async () => {
uploadedUrls.push(res.url || '')
} catch (err) {
uni.showToast({
title:e.msg || '图片上传失败',
title:err.msg || '图片上传失败',
icon:'error'
})
}

View File

@@ -42,18 +42,10 @@ import { onLoad } from '@dcloudio/uni-app'
import {getRepairOrder} from '../../api/api.js'
// 分类列表
const categoryList = ref([
// { id: 1, name: '基础设施' },
// { id: 2, name: '电子设施' }
])
const categoryList = ref([])
// 所有项目数据
const projectList = ref([
// { id: 101, categoryId: 1, name: '路灯' },
// { id: 102, categoryId: 1, name: '楼层指示灯' },
// { id: 103, categoryId: 2, name: '应急出口灯' },
// { id: 104, categoryId: 1, name: '草坪灯' }
])
const projectList = ref([])
// 选中的分类
const activeCategory = ref(1)
@@ -91,7 +83,7 @@ const fetchProjectList = async () => {
activeCategory.value = categoryList.value[0]?.id || 1
}
} catch (e) {
uni.showToast({ title: '获取项目列表失败', icon: 'none' })
uni.showToast({ title: e.msg ||'获取项目列表失败', icon: 'none' })
}
}

View File

@@ -10,7 +10,7 @@
<!-- <uni-icons type="phone" size="24" color="#999"></uni-icons> -->
<image
src="https://wuyeadmin.bugtc.com/images/login/phone.png"
mode=""
mode="aspectFit"
style="height: 100%; width: 100%"
></image>
</view>
@@ -31,7 +31,7 @@
<view class="input-icon">
<image
src="https://wuyeadmin.bugtc.com/images/login/code.png"
mode=""
mode="aspectFit"
style="height: 100%; width: 100%"
>
</image>
@@ -269,7 +269,6 @@ onUnmounted(() => {
/* 页面容器 */
.login-page {
padding: 80rpx 40rpx 40rpx;
/* background-color: #f8f9fa; */
min-height: 100vh;
background: repeating-linear-gradient(to bottom, #e2f0ff, #f6faff);
}

View File

@@ -4,7 +4,7 @@
<view class="news-card" v-for="item in noticeList" :key="item.id">
<view class="news-header">
<text class="news-title">{{ item.item || '暂无标题' }}</text>
<view class="unread-dot" v-if="item.isCheck === '0' "></view>
<view class="unread-dot" v-if="item.isCheckStr === '未读' "></view>
</view>
<view class="news-meta">
@@ -45,7 +45,7 @@ const noticeList = ref([])
// 分页相关
const pageNum = ref(1) // 当前页
const pageSize = ref(5) // 每页条数
const pageSize = ref(10) // 每页条数
const total = ref(0) // 总条数
const loading = ref(false) // 加载状态
const noMore = ref(false) // 是否没有更多

View File

@@ -1,7 +1,7 @@
<template>
<!-- 页面主容器 -->
<view class="door-open-page">
<view class="status_bar"></view>
<view class="status_bar" :style="{ height: statusBarHeight + 'px' }"></view>
<!-- 顶部标题栏 -->
<view class="top-bar">
<uni-nav-bar left-icon="left" title="远程开门" backgroundColor ="none" :border="false" @clickLeft="narBack" />
@@ -47,7 +47,7 @@
</view>
<!-- 确认开门按钮 -->
<button class="confirm-btn" @click="openDoor" :disabled="selectedDoor === -1">确认开门</button>
<button class="confirm-btn" @click="openDoor" :disabled="selectedDoor === -1">确认开门 </button>
</view>
</template>
@@ -59,6 +59,7 @@ import { getOpenDoorList, switchOpenDoor } from '../../api/api.js'
// 响应式数据:选中的门索引、开门成功提示
const selectedDoor = ref(-1) // -1表示未选中
const showSuccess = ref(false)
const statusBarHeight = ref(uni.getSystemInfoSync().statusBarHeight || 0)
// 门列表数据
const doorList = ref([])
@@ -130,8 +131,10 @@ const openDoor = () => {
box-sizing: border-box;
}
.status_bar {
height: 32px;
/* height: 32px; */
width: 100%;
/* height: var(--status-bar-height); */
flex-shrink: 0;
}
/* 顶部标题 */
.top-bar {

View File

@@ -41,56 +41,68 @@
scroll-y
:style="{ height: `calc(100vh - ${navHeight + statusTabHeight + typeTabHeight}px)` }"
>
<!-- 空状态 -->
<view v-if="filteredRecords.length === 0" class="empty-state">
<uni-icons type="empty" size="60" color="#ccc"></uni-icons>
<text class="empty-text">暂无上报记录</text>
</view>
<!-- 记录卡片 -->
<view
v-for="record in filteredRecords"
v-for="record in reportRecords"
:key="record.id"
class="record-card"
>
<!-- 标题 + 状态标签 -->
<view class="card-header">
<text class="card-title">{{ record.title }}</text>
<view class="status-tag" :class="record.status">
{{ getStatusText(record.status) }}
<text class="card-title">{{ record.item }}</text>
<view class="status-tag" :class="getStatusClass(record.problemStatus)">
{{ getStatusText(record.problemStatus) }}
</view>
</view>
<!-- 类型标签 -->
<view class="tag-group">
<view class="tag-item">{{ record.reportType }}</view>
<view class="tag-item">{{ record.category }}</view>
<view class="tag-item">{{ record.projectTypeStr || '无 ' }}</view>
<view class="tag-item">{{ record.maintenanceItemName || '无'}}</view>
</view>
<!-- 内容 -->
<view class="card-content">
{{ record.content }}
{{ record.problem }}
</view>
<!-- 底部信息 -->
<view class="card-footer">
<text class="create-time">{{ record.createTime }}</text>
<text v-if="record.repairman" class="repairman">维修师傅:{{ record.repairman }}</text>
<text v-if="record.repairName" class="repairman">维修师傅:{{ record.repairName }}</text>
</view>
</view>
<!-- 加载提示 + 没有更多数据 -->
<view class="load-more" v-if="reportRecords.length > 0">
<text v-if="loading">加载中...</text>
<text v-else-if="noMore">没有更多数据了</text>
</view>
<!-- 空数据 -->
<view class="empty" v-if="reportRecords.length === 0 && !loading">
暂无上报记录
</view>
</scroll-view>
</view>
</template>
<script setup>
import { ref, computed } from 'vue'
import {onReady} from "@dcloudio/uni-app"
import { ref } from 'vue'
import {onReady, onReachBottom, onPullDownRefresh,onShow} from "@dcloudio/uni-app"
import {getMyOrderList} from '../../api/api.js'
// 导航栏/标签高度(适配不同设备)
const navHeight = ref(44)
const statusTabHeight = ref(88)
const typeTabHeight = ref(88)
// 分页
const pageNum = ref(1) // 当前页
const pageSize = ref(5) // 每页条数
const total = ref(0) // 总条数
const loading = ref(false) // 加载状态
const noMore = ref(false) // 是否没有更多
// 筛选状态
const activeStatus = ref('all') // 全部/待分配/待解决/已完成
const activeType = ref('all') // 全部/公共报修/个人报修
@@ -98,71 +110,95 @@ const activeType = ref('all') // 全部/公共报修/个人报修
// 状态筛选选项
const statusTabs = ref([
{ label: '全部', value: 'all' },
{ label: '待分配', value: 'pending' },
{ label: '待解决', value: 'processing' },
{ label: '已完成', value: 'completed' }
// { label: '待分配', value: 'pending' },
{ label: '待解决', value: '1' },
{ label: '已完成', value: '2' }
])
// 类型筛选选项
const typeTabs = ref([
{ label: '全部', value: 'all' },
{ label: '公共报修', value: 'public' },
{ label: '个人报修', value: 'private' }
{ label: '公共报修', value: '0' },
{ label: '个人报修', value: '1' }
])
// 模拟上报记录数据(实际项目替换为接口请求)
const reportRecords = ref([
{
id: 1,
title: '标题巴拉巴拉巴拉',
status: 'pending', // pending/processing/completed
reportType: '公共报修',
category: '路灯',
content: '1栋楼下道路路灯不亮,并且有的亮度不够,请物业公司及时更换,防止发生意外事故。',
createTime: '2026-08-01 10:05:46',
repairman: ''
},
{
id: 2,
title: '标题巴拉巴拉巴拉',
status: 'processing',
reportType: '公共报修',
category: '路灯',
content: '1栋楼下道路路灯不亮,并且有的亮度不够,请物业公司及时更换,防止发生意外事故。',
createTime: '2026-08-01 10:05:46',
repairman: '张三'
},
{
id: 3,
title: '标题巴拉巴拉巴拉',
status: 'completed',
reportType: '公共报修',
category: '路灯',
content: '1栋楼下道路路灯不亮,并且有的亮度不够,请物业公司及时更换,防止发生意外事故。',
createTime: '2026-08-01 10:05:46',
repairman: '张三'
// 上报记录数据
const reportRecords = ref([])
// 获取列表数据
const getReportList = (isRefresh = false) => {
// 防止重复请求
if (loading.value || noMore.value) return
loading.value = true
const params = {
pageSize: pageSize.value,
pageNum: pageNum.value
}
])
if (activeType.value !== 'all') {
params.itemType = activeType.value
}
if (activeStatus.value !== 'all') {
params.problemStatus = activeStatus.value
}
getMyOrderList(params).then(res => {
if (res.code === 200) {
total.value = res.total || 0
const data = res.rows || []
// 筛选后的记录
const filteredRecords = computed(() => {
return reportRecords.value.filter(record => {
// 状态筛选
const statusMatch = activeStatus.value === 'all' || record.status === activeStatus.value
// 类型筛选
const typeMatch = activeType.value === 'all' || record.reportType === typeTabs.value.find(item => item.value === activeType.value)?.label
return statusMatch && typeMatch
// 第一页:覆盖,分页:追加
if (pageNum.value === 1) {
reportRecords.value = data
} else {
reportRecords.value = [...reportRecords.value, ...data]
}
// 判断是否还有更多
noMore.value = reportRecords.value.length >= total.value
}
}).catch(() => {
uni.showToast({ title: '加载失败', icon: 'none' })
}).finally(() => {
loading.value = false
if (isRefresh) {
uni.stopPullDownRefresh()
}
})
}
// 上拉加载更多
onReachBottom(() => {
if (noMore.value || loading.value) return
pageNum.value++
getReportList()
})
// 切换状态(全部/待分配/待解决/已完成)筛选
// 下拉刷新
onPullDownRefresh(() => {
pageNum.value = 1
noMore.value = false
getReportList(true)
})
// 筛选/分页重置后重新拉数据
const reloadList = () => {
pageNum.value = 1
noMore.value = false
reportRecords.value = []
getReportList()
}
// 切换状态(全部/待解决/已完成)筛选
const switchStatus = (value) => {
if (activeStatus.value === value) return
activeStatus.value = value
reloadList()
}
// 切换类型(公共/个人)筛选
const switchType = (value) => {
if (activeType.value === value) return
activeType.value = value
reloadList()
}
// 返回上一页
@@ -175,12 +211,25 @@ const navBack = () => {
// 获取状态文本
const getStatusText = (status) => {
const statusMap = {
pending: '待分配',
processing: '待解决',
completed: '已完成'
// "pending": '已分配',
"1": '待解决',
'2': '已完成'
}
return statusMap[status] || ''
}
// 获取状态标签样式类名
const getStatusClass = (status) => {
const classMap = {
'1': 'processing',
'2': 'completed'
}
return classMap[status] || ''
}
onShow(() => {
pageNum.value = 1
noMore.value = false
getReportList()
})
// 页面渲染完成后适配高度
onReady(() => {
@@ -278,22 +327,6 @@ onReady(() => {
box-sizing: border-box;
}
/* 空状态 */
.empty-state {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 100rpx 0;
color: #ccc;
}
.empty-text {
font-size: 32rpx;
color: #999;
margin-top: 20rpx;
}
/* 记录卡片 */
.record-card {
background-color: #fff;
@@ -373,4 +406,17 @@ onReady(() => {
.repairman {
color: #999;
}
.load-more {
text-align: center;
padding: 30rpx;
color: #999;
font-size: 26rpx;
}
.empty {
text-align: center;
padding: 100rpx 0;
color: #999;
font-size: 28rpx;
}
</style>

View File

@@ -39,17 +39,28 @@
<script setup>
import { ref } from 'vue'
import { onShow } from '@dcloudio/uni-app'
import { logout } from '../../api/api.js'
import { logout, getSettingInfo } from '../../api/api.js'
// 响应式数据
const phoneNumber = ref('') // 绑定手机号
const passwordNumber = ref('')
// 获取用户信息中的手机号
const fetchUserInfo = () => {
getSettingInfo().then(res => {
if (res.code === 200 && res.data) {
phoneNumber.value = res.data.phonenumber || ''
}
})
}
// 页面显示时读取最新数据(从修改页返回也会触发)
onShow(() => {
const userInfo = uni.getStorageSync('tempChangePwdParams')
if (userInfo.phoneNumber) {
if (userInfo && userInfo.phoneNumber) {
phoneNumber.value = userInfo.phoneNumber
} else {
fetchUserInfo()
}
})

View File

@@ -198,7 +198,9 @@
"path": "reportingRecord",
"style": {
"navigationBarTitleText": "上报记录",
"navigationStyle": "custom"
"navigationStyle": "custom",
"enablePullDownRefresh": true,
"onReachBottomDistance": 100
}
}
]

View File

@@ -1,6 +1,6 @@
<template>
<view class="guide-page">
<view class="status_bar"></view>
<view class="status-bar"></view>
<!-- 引导内容滑动容器 -->
<swiper
class="guide-swiper"
@@ -14,36 +14,39 @@
<swiper-item>
<view class="guide-item">
<view class="guide-img">
<image src="https://wuyeadmin.bugtc.com/images/imgs/guide1.png" style="width: 100%;height: 100%;"></image>
<image src="https://wuyeadmin.bugtc.com/images/imgs/guide1.png" mode="aspectFit" class="img-content"></image>
</view>
<view style="height: 200rpx;width: 100%;"></view>
<view class="guide-text">
<view class="guide-title">精准服务</view>
<view class="guide-subtitle">需求深度洞察,资源优化配置</view>
</view>
</view>
</swiper-item>
<!-- 高效管理 -->
<swiper-item>
<view class="guide-item">
<view class="guide-img">
<image src="https://wuyeadmin.bugtc.com/images/imgs/guide2.png" style="width: 100%;height: 100%;"></image>
<image src="https://wuyeadmin.bugtc.com/images/imgs/guide2.png" mode="aspectFit" class="img-content"></image>
</view>
<view style="height: 200rpx;width: 100%;"></view>
<view class="guide-text">
<view class="guide-title">高效沟通</view>
<view class="guide-subtitle">反馈即时响应,流程无缝衔接</view>
</view>
</view>
</swiper-item>
<!--安全保障 -->
<swiper-item>
<view class="guide-item">
<view class="guide-img">
<image src="https://wuyeadmin.bugtc.com/images/imgs/guide3.png" style="width: 100%;height: 100%;"></image>
<image src="https://wuyeadmin.bugtc.com/images/imgs/guide3.png" mode="aspectFit" class="img-content"></image>
</view>
<view style="height: 200rpx;width: 100%;"></view>
<view class="guide-text">
<view class="guide-title">智能管理</view>
<view class="guide-subtitle">数据驱动决策,风险提前预警</view>
</view>
</view>
</swiper-item>
</swiper>
@@ -92,7 +95,7 @@ const handleBtnClick = () => {
uni.setStorageSync('hasShowGuide', true);
// 2. 跳转首页
uni.navigateTo({
url:"/pageSubPack/loginSub/pwd-login"
url: "/pageSubPack/loginSub/pwd-login"
})
// uni.switchTab({
// url: '/pages/index/index'
@@ -106,40 +109,61 @@ const handleBtnClick = () => {
.guide-page {
width: 100%;
height: 100vh;
/* background-color: #f8f9ff; */
background: linear-gradient(to bottom, #E2F0FF, #F6FAFF);
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
padding: 120rpx 40rpx 80rpx;
box-sizing: border-box;
}
.status_bar {
height: 140px;
/* 状态栏 - 自适应设备状态栏高度 */
.status-bar {
height: var(--status-bar-height);
width: 100%;
}
flex-shrink: 0;
}
/* 滑动容器 */
.guide-swiper {
flex: 1;
width: 100%;
}
/* 单个引导项 */
/* 单个引导项 - 全屏自适应 */
.guide-item {
width: 360px;
height: 480px;
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 0 60rpx;
box-sizing: border-box;
}
/* 图片区域 - 自适应 */
.guide-img {
width: 77%;
height: 50%;
margin-bottom: 80rpx;
width: 80%;
max-width: 600rpx;
flex: 1;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 40rpx;
}
.img-content {
width: 100%;
height: 100%;
max-height: 50vh;
}
/* 文字区域 */
.guide-text {
display: flex;
flex-direction: column;
align-items: center;
margin-bottom: 40rpx;
}
/* 引导标题 */
@@ -161,7 +185,8 @@ const handleBtnClick = () => {
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 60rpx;
margin-bottom: 40rpx;
flex-shrink: 0;
}
/* 单个进度点 */
@@ -171,6 +196,7 @@ const handleBtnClick = () => {
border-radius: 8rpx;
background-color: #ddd;
margin: 0 8rpx;
transition: all 0.3s ease;
}
/* 激活的进度点 */
@@ -182,6 +208,9 @@ const handleBtnClick = () => {
/* 按钮容器 */
.guide-btn-wrap {
width: 80%;
max-width: 600rpx;
margin-bottom: 80rpx;
flex-shrink: 0;
}
/* 引导按钮 */
@@ -210,7 +239,7 @@ const handleBtnClick = () => {
border: none;
}
/* 按钮禁用态 */
/* 按钮禁用态(可选) */
.guide-btn:disabled {
background-color: #ccc;
color: #fff;

View File

@@ -2,7 +2,7 @@
<view class="content-class">
<view class="nar-top">
<!-- 这里是状态栏占位 -->
<view class="status_bar"></view>
<view class="status_bar" :style="{ height: statusBarHeight + 'px' }"></view>
<!-- 导航栏 -->
<view class="nav-bar">
<text class="nav-title">首页</text>
@@ -45,7 +45,7 @@
<swiper class="swiper-box" :current="current" autoplay>
<swiper-item v-for="(item, index) in bannerList" :key="index">
<view class="swiper-item">
<image :src="item.img" style="width: 100%; height: 100%"></image>
<image :src="item.url" style="width: 100%; height: 100%"></image>
</view>
</swiper-item>
</swiper>
@@ -84,7 +84,7 @@
<!-- 巡检数据统计区 -->
<view class="statistics-wrap">
<view class="statistics-item" @click="goToInspectionRecord">
<text class="num">{{ totalTasks }}</text>
<text class="num">{{ allCount }}</text>
<text class="label">全部巡检</text>
</view>
<view class="statistics-item" @click="goToDaysInspection">
@@ -153,16 +153,18 @@
<script setup>
import { ref } from 'vue'
import { onLoad, onUnload } from '@dcloudio/uni-app'
import { getCurrentVillage, getTodayInspection, getNewNoticeData } from '../../api/api.js'
import { getCurrentVillage,getTodayInspection,getNewNoticeData,getBannarList} from '../../api/api.js'
// 列表数据状态
const current = ref(0)
const currentCommunity = ref('请选择小区')
const bannerList = ref([{ img: 'https://wuyeadmin.bugtc.com/images/imgs/banner1.png' }])
const bannerList = ref([])
const noticeText = ref('暂无公告')
const totalTasks = ref(0) // 全部巡检
const allCount = ref(0) // 全部巡检
const pendingCount = ref(0) //待巡检
const InspectedCount = ref(0) //已巡检
const statusBarHeight = ref(uni.getSystemInfoSync().statusBarHeight || 0)
// =======方法=======
// 跳转小区
@@ -240,20 +242,18 @@ const currentVillageData = () => {
.catch(() => {})
}
// 获取今日巡检数据
const getInspectionData = () => {
getTodayInspection()
.then(res => {
if (res.code === 200) {
if (res.data) {
totalTasks.value = res.data.totalTasks
const getInspectionData = () =>{
getTodayInspection().then(res =>{
if(res.code === 200){
if(res.data){
allCount.value = res.data.totalTasks
pendingCount.value = res.data.unfinishedTasks
InspectedCount.value = res.data.completedTasks
} else {
totalTasks.value = 0
}else{
allCount.value = 0
pendingCount.value = 0
InspectedCount.value = 0
}
}
})
.catch(err => {
uni.showToast({ title: err.msg || '获取失败', icon: 'none' })
@@ -271,6 +271,16 @@ const getNoticeData = () => {
})
.catch(() => {})
}
// 获取bannar图
function getbannarData(){
getBannarList().then(res => {
if (res.code === 200 && res.data) {
bannerList.value = res.data
}else{
bannerList.value = []
}
}).catch(() => {})
}
// 接收选择小区返回的参数
const slelctHomeData = data => {
@@ -285,6 +295,7 @@ onLoad(() => {
// 优先调用接口获取当前小区,失败时再读缓存
currentVillageData()
getInspectionData()
getbannarData()
})
onUnload(() => {
@@ -311,8 +322,8 @@ const clickItem = index => {
}
.status_bar {
height: 46px;
width: 100%;
flex-shrink: 0;
}
/* 导航栏 */
@@ -323,7 +334,7 @@ const clickItem = index => {
}
.nav-title {
font-size: 14px;
font-size: 32rpx;
font-weight: 400;
}

View File

@@ -1,14 +1,12 @@
<template>
<view class="contentStyle" style="">
<view class="status-bar"></view>
<view class="status-bar" :style="{ height: statusBarHeight + 'px' }"></view>
<uni-nav-bar title="我的" backgroundColor="transparent" :border="false"> </uni-nav-bar>
<scroll-view class="page" scroll-y>
<view class="topBox">
<view class="name">
<image :src="avatar" class="img" />
<span
style="padding: 5rpx 5rpx; display: flex; flex-direction: column; line-height: 60rpx"
>
<span style="padding: 5rpx 5rpx; display: flex; flex-direction: column; line-height: 60rpx">
<span style="font-size: 36rpx; font-weight: 600">
{{ loginName }}
</span>
@@ -21,20 +19,10 @@
<view class="contentBox">
<div class="page-container">
<view class="list-container">
<view
class="list-item"
v-for="(item, index) in list"
:key="index"
@click="onItemClick(item)"
>
<view class="list-item" v-for="(item, index) in list" :key="index" @click="onItemClick(item)">
<image :src="item.icon" class="item-icon" />
<view class="item-content">
<text class="item-title">{{ item.title }}</text>
<span class="item-desc" v-if="item.desc"
><span style="align-self: flex-end; font-size: 24rpx; vertical-align: baseline">{{
item.desc
}}</span></span
>
</view>
<view class="item-arrow"></view>
<!-- <image src="https://wuyeadmin.bugtc.com/images/propertyImgs/arrow-right.png" class="arrow-icon" /> -->
@@ -46,62 +34,66 @@
</view>
</template>
<script setup>
import { ref } from 'vue'
import { onShow } from '@dcloudio/uni-app'
import { getSettingInfo } from '../../api/api.js'
import {
ref
} from 'vue'
import {
onShow
} from '@dcloudio/uni-app'
import {
getSettingInfo
} from '../../api/api.js'
const list = ref([
{
const list = ref([{
icon: 'https://wuyeadmin.bugtc.com/images/imgs/shangbao.png',
title: '上报记录'
},
{
icon: 'https://wuyeadmin.bugtc.com/images/imgs/xunjian.png',
title: '巡检记录'
// desc: "您可以在这里添加家人、朋友、租客~"
},
{
icon: 'https://wuyeadmin.bugtc.com/images/imgs/xunjian.png',
title: '仪表换新'
// desc: "您可以在这里添加家人、朋友、租客~"
},
{
icon: 'https://wuyeadmin.bugtc.com/images/propertyImgs/setting.png',
title: '设置'
}
])
const loginName = ref('')
const phoneNum = ref('')
const avatar = ref('')
])
const loginName = ref('')
const phoneNum = ref('')
const avatar = ref('')
const statusBarHeight = ref(uni.getSystemInfoSync().statusBarHeight || 0)
// 获取管家信息
const fetchUserInfo = () => {
// 获取管家信息
const fetchUserInfo = () => {
getSettingInfo().then(res => {
if (res.code === 200 && res.data) {
loginName.value = res.data.nickName || ''
phoneNum.value = res.data.phonenumber || ''
avatar.value = res.data.avatar
}
}).catch(err =>{
}).catch(err => {
uni.showToast({
title:err.msg || '获取失败',
icon: 'error'
title: err.msg || '获取失败',
icon: 'none'
})
})
}
}
onShow(() => {
onShow(() => {
fetchUserInfo()
})
})
// --方法----
const goToDetail = () => {
// --方法----
const goToDetail = () => {
uni.navigateTo({
url: '/pageSubPack/notice-list/noticeListDetails'
})
}
// 返回
const onItemClick = item => {
}
// 返回
const onItemClick = item => {
if (item.title == '上报记录') {
uni.navigateTo({
url: '/pageSubPack/report-record/report-record'
@@ -119,25 +111,25 @@ const onItemClick = item => {
url: '/pageSubPack/setting/setting'
})
}
}
}
</script>
<style lang="scss" scoped>
.contentStyle {
.contentStyle {
display: flex;
flex-direction: column;
min-height: 100vh;
background: linear-gradient(to left bottom, #e2efff 0%, #f9f9f9 50%);
}
}
.topBox {
.topBox {
width: 100%;
padding: 20rpx 0px;
position: relative;
// background-color: #1A75FF;
}
}
.titleBox {
.titleBox {
width: 100%;
position: relative;
@@ -155,31 +147,37 @@ const onItemClick = item => {
top: 16rpx;
right: 0px;
}
}
}
.img {
.img {
width: 60px;
height: 60px;
margin-right: 10rpx;
border-radius: 50%;
}
}
.name {
.name {
bottom: 30rpx;
left: 30rpx;
display: flex;
align-items: center;
}
}
.contentBox {
.contentBox {
position: relative;
}
.status-bar {
width: 100vw;
height: 46px;
}
}
.list-item {
.status-bar {
width: 100vw;
// height: 46px;
height: var(--status-bar-height);
flex-shrink: 0;
}
::v-deep .uni-nav-bar-text{
font-size: 32rpx !important;
}
.list-item {
display: flex;
align-items: center;
/* background: #fff; */
@@ -187,30 +185,30 @@ const onItemClick = item => {
border-radius: 8rpx;
/* border-bottom:2rpx solid #f2f2f2; */
/* margin-bottom: 10rpx; */
}
}
.item-icon {
.item-icon {
width: 84rpx;
height: 84rpx;
/* margin-right: 20rpx; */
}
}
.item-content {
.item-content {
flex: 1;
display: flex;
flex-direction: row;
align-items: center;
}
}
.item-title {
.item-title {
font-size: 32rpx;
/* color: #333; */
font-weight: 400;
margin: 10rpx 20rpx;
/* margin-bottom: 6rpx; */
}
}
.item-desc {
.item-desc {
font-size: 24rpx;
color: #b5b5b5;
white-space: nowrap;
@@ -218,21 +216,21 @@ const onItemClick = item => {
overflow: hidden;
/* 超出隐藏 */
text-overflow: ellipsis;
}
}
.item-arrow {
.item-arrow {
width: 16rpx;
height: 16rpx;
border-right: 3rpx solid #999999;
border-bottom: 3rpx solid #999999;
transform: rotate(-45deg);
margin-right: 10rpx;
}
}
.page {
.page {
flex: 1;
overflow-y: auto;
padding: 0px 40rpx;
box-sizing: border-box;
}
}
</style>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 289 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 290 B