对接小区、故障报修接口,更换图片地址

This commit is contained in:
zhouyanli
2026-05-13 17:49:02 +08:00
parent d45bb90c5e
commit 7e5ee9d4e0
28 changed files with 495 additions and 629 deletions

View File

@@ -13,13 +13,13 @@
<view class="location-area">
<!-- 定位图标 -->
<view class="location-icon">
<image src="/static/imgs/adress.png" style="height: 100%; width: 100%"></image>
<image src="http://47.104.199.163:9090/images/imgs/adress.png" style="height: 100%; width: 100%"></image>
</view>
<!-- 小区名称和下拉箭头 -->
<view class="community-selector">
<text class="community-name">{{ currentCommunity }}</text>
<view class="community-icon">
<image src="/static/imgs/三角形.png" style="height: 100%; width: 100%"></image>
<image src="http://47.104.199.163:9090/images/imgs/三角形.png" style="height: 100%; width: 100%"></image>
</view>
</view>
</view>
@@ -52,7 +52,7 @@
<view class="noticeClass">
<!-- 左侧消息通知文字 -->
<view class="notice-left">
<image src="/static/imgs/notice.png" class="notice-icon"></image>
<image src="http://47.104.199.163:9090/images/imgs/notice.png" class="notice-icon"></image>
</view>
<!-- 右侧滚动公告 -->
<view class="notice-right" @click="getNoticeMore">
@@ -93,26 +93,26 @@
<!-- 第一行功能:故障上报、一键开门、工单大厅、我的工单 -->
<view class="function-row">
<view class="function-item" @click="goToReport">
<image class="item-icon" src="/static/imgs/fault-report.png" mode="aspectFit"></image>
<image class="item-icon" src="http://47.104.199.163:9090/images/imgs/fault-report.png" mode="aspectFit"></image>
<text class="item-text">故障上报</text>
</view>
<view class="function-item" @click="goToOneOpenDoor">
<image class="item-icon" src="/static/imgs/open.png" mode="aspectFit"></image>
<image class="item-icon" src="http://47.104.199.163:9090/images/imgs/open.png" mode="aspectFit"></image>
<text class="item-text">一键开门</text>
</view>
<view class="function-item" @tap="goToTicketHall">
<image class="item-icon" src="/static/imgs/work-order.png" mode="aspectFit"></image>
<image class="item-icon" src="http://47.104.199.163:9090/images/imgs/work-order.png" mode="aspectFit"></image>
<text class="item-text">工单大厅</text>
</view>
<view class="function-item" @tap="goToMyTicket">
<image class="item-icon" src="/static/imgs/my-work.png" mode="aspectFit"></image>
<image class="item-icon" src="http://47.104.199.163:9090/images/imgs/my-work.png" mode="aspectFit"></image>
<text class="item-text">我的工单</text>
</view>
</view>
<!-- 第二行 -->
<view class="function-row" style="margin-top: 2px">
<view class="function-item" @tap="goToComplaint">
<image class="item-icon" src="/static/imgs/complaint.png" mode="aspectFit"></image>
<image class="item-icon" src="http://47.104.199.163:9090/images/imgs/complaint.png" mode="aspectFit"></image>
<text class="item-text">投诉处理</text>
</view>
</view>
@@ -126,15 +126,22 @@ import { onLoad, onUnload } from '@dcloudio/uni-app'
// 列表数据状态
const current = ref(0)
const currentCommunity = ref('碧桂园小区')
const bannerList = ref([{ img: '/static/imgs/banner1.png' }])
const currentCommunity = ref('')
const bannerList = ref([{ img: 'http://47.104.199.163:9090/images/imgs/banner1.png' }])
const noticeText = ref('公告公告本小区今天安装了摄像头')
// =======方法=======
// 跳转小区
const navigateToPage = () => {
const curVillageId = uni.getStorageSync('currentVillage')
let villageId = ''
if(curVillageId){
try{
villageId = JSON.parse(curVillageId).id
}catch(e){}
}
uni.navigateTo({
url: '/pageSubPack/notice-list/select-community'
url: `/pageSubPack/notice-list/select-community?villageId=${villageId}`
})
}
// 跳转公告
@@ -187,11 +194,20 @@ const goToReport = () => {
}
// 接收选择小区返回的参数
const slelctHomeData = data => {
currentCommunity.value = data.name
currentCommunity.value = data.villageName
uni.setStorageSync('currentVillage', JSON.stringify(data))
}
onLoad(() => {
uni.$on('confirm', slelctHomeData)
// 读取本地缓存的小区
const cache = uni.getStorageSync('currentVillage')
if (cache) {
try {
const village = JSON.parse(cache)
currentCommunity.value = village.villageName
} catch (e) {}
}
})
onUnload(() => {