暂时提交

This commit is contained in:
2026-07-24 10:46:00 +08:00
parent 070f3bab4f
commit 9bf70e785e
15 changed files with 1133 additions and 630 deletions

View File

@@ -232,46 +232,78 @@
const index = Math.floor(Math.random() * this.tagColors.length)
return this.tagColors[index]
},
// 模拟接口请求
// 加载资产详情
loadAssetDetail() {
let url = `/assets/detail?id=${this.assetId}`
this.$u.get(url).then(result => {
const data = result.data
this.asset = {
name: data.assetsName,
bizZone: data.bizZone,
code: data.assetsNo,
type: data.assetsType,
area: data.footPrint,
rent: data.rentFee,
address: data.assetsAddress,
hasLift: data.hasLift,
lat: data.latitude,
lng: data.longitude,
unitNo: data.unitNo,
roomNo: data.roomNo,
floorNo: data.floorNo,
description: data.assetsDesc,
detailImgs: data.detailImgs,
layout: data.layout, //户型
orientation: data.orientation, //朝向
vrImgs: data.vrImgs,
remark: data.assetsDesc,
status: data.assetsStatus,
features: data.features
};
this.managerPhone = data.managerPhone
this.markers = [{
id: 1,
latitude: this.asset.lat,
longitude: this.asset.lng,
title: this.asset.name,
}, ];
this.recordView(this.assetId);
}).catch(err => {
console.log("获取资产信息失败:", err)
})
// TODO: 接口联调时取消注释,删除 mock 数据
// let url = `/assets/detail?id=${this.assetId}`
// this.$u.get(url).then(result => {
// const data = result.data
// this.asset = {
// name: data.assetsName,
// bizZone: data.bizZone,
// code: data.assetsNo,
// type: data.assetsType,
// area: data.footPrint,
// rent: data.rentFee,
// address: data.assetsAddress,
// hasLift: data.hasLift,
// lat: data.latitude,
// lng: data.longitude,
// unitNo: data.unitNo,
// roomNo: data.roomNo,
// floorNo: data.floorNo,
// description: data.assetsDesc,
// detailImgs: data.detailImgs,
// layout: data.layout,
// orientation: data.orientation,
// vrImgs: data.vrImgs,
// remark: data.assetsDesc,
// status: data.assetsStatus,
// features: data.features
// };
// this.managerPhone = data.managerPhone
// this.markers = [{
// id: 1,
// latitude: this.asset.lat,
// longitude: this.asset.lng,
// title: this.asset.name,
// }, ];
// this.recordView(this.assetId);
// }).catch(err => {
// console.log("获取资产信息失败:", err)
// })
// Mock 静态数据
this.asset = {
name: '东山大道435号房屋',
bizZone: 'CBD商圈',
code: 'ASSET-001',
type: '住宅',
area: 120,
rent: 2500,
address: '宜昌市西陵区东山大道435号',
hasLift: '有',
lat: 30.7086,
lng: 111.2842,
unitNo: '2单元',
roomNo: '104',
floorNo: '1层',
description: '精装修两居室,采光好,交通便利',
detailImgs: [],
layout: '2室1厅1卫',
orientation: '南',
vrImgs: [],
remark: '精装修两居室,采光好,交通便利,周边配套齐全',
status: '闲置中',
features: ['近地铁', '精装修', '拎包入住']
};
this.managerPhone = '13800138000'
this.markers = [{
id: 1,
latitude: this.asset.lat,
longitude: this.asset.lng,
title: this.asset.name,
}];
},
formatMoney(num) {
return Number(num).toLocaleString();

View File

@@ -86,7 +86,7 @@
},
async onShow() {
try {
await this.$checkToken(this.$getToken())
// await this.$checkToken(this.$getToken())
this.fetchContractList()
} catch (e) {
return
@@ -259,7 +259,7 @@
.submit-btn {
width: 100%;
height: 80rpx;
background: linear-gradient(90deg, #FF6F63 0%, #FB392A 100%);
background: #0088FE;
border-radius: 10rpx;
color: #ffffff;
font-size: 32rpx;

View File

@@ -109,30 +109,63 @@
const minutes = String(date.getMinutes()).padStart(2, '0');
return `${year}-${month}-${day} ${weekday} ${hours}:${minutes}`;
},
// 👇 你的请求逻辑完全不动
// 加载退租申请列表
fetchApplys() {
if (this.loadStatus !== 'more') return;
this.loadStatus = 'loading';
let url = '/discharge/queryPage'
this.$u.post(url, {
pageNo: this.pageNo,
pageSize: this.pageSize
}, {
WT: this.$getToken()
}).then(res => {
const rows = res.data.result || [];
if (this.pageNo === 1) this.flowList = [];
this.flowList = this.flowList.concat(rows);
if (rows.length < this.pageSize) {
this.loadStatus = 'nomore';
} else {
this.pageNo++;
this.loadStatus = 'more';
// TODO: 接口联调时取消注释,删除 mock 数据
// let url = '/discharge/queryPage'
// this.$u.post(url, {
// pageNo: this.pageNo,
// pageSize: this.pageSize
// }, {
// WT: this.$getToken()
// }).then(res => {
// const rows = res.data.result || [];
// if (this.pageNo === 1) this.flowList = [];
// this.flowList = this.flowList.concat(rows);
// if (rows.length < this.pageSize) {
// this.loadStatus = 'nomore';
// } else {
// this.pageNo++;
// this.loadStatus = 'more';
// }
// }).catch(err => {
// console.log("获取退租申请信息失败:", err)
// this.loadStatus = 'more';
// })
// Mock 静态数据
const mockData = [
{
id: '1',
contractName: '东山大道435号房屋租赁合同',
status: '申请中',
applyDate: '2026-06-15',
dischargeItem: '东山大道435-2-1-104号',
remark: '等待审批中'
},
{
id: '2',
contractName: '夷陵大道418号房屋租赁合同',
status: '已批准',
applyDate: '2026-06-10',
dischargeItem: '夷陵大道418号',
remark: '已通过审批,请办理退租手续'
},
{
id: '3',
contractName: '解放路88号房屋租赁合同',
status: '退租完成',
applyDate: '2026-05-20',
dischargeItem: '解放路88-1-502',
remark: '退租已完成,押金已退还'
}
}).catch(err => {
console.log("获取退租申请信息失败:", err)
this.loadStatus = 'more';
})
];
if (this.pageNo === 1) this.flowList = [];
this.flowList = this.flowList.concat(mockData);
this.loadStatus = 'nomore';
},
// 👇 你的跳转 1 行没改
toApply() {
@@ -180,8 +213,8 @@
},
async onShow() {
try {
await this.$checkToken(this.$getToken())
this.checkOaAuth()
// await this.$checkToken(this.$getToken())
// this.checkOaAuth()
this.fetchApplys()
} catch (e) {
return
@@ -235,17 +268,17 @@
border-radius: 4rpx;
&.done {
background: #FCE5E0;
color: #ED7748;
background: #0088FE;
color: #fff;
}
&.pending {
background: #F2F3F7;
color: #86868C;
background: #FF8D1A;
color: #fff;
}
&.reject {
background: #FFE4E1;
color: #DC143C;
background: #DC143C;
color: #fff;
}
}
@@ -290,7 +323,7 @@
.add-btn {
width: 100%;
height: 80rpx;
background: linear-gradient(90deg, #FF6F63 0%, #FB392A 100%);
background: #0088FE;
border-radius: 10rpx;
color: #ffffff;
font-size: 32rpx;

View File

@@ -83,8 +83,8 @@
},
async onShow() {
try {
await this.$checkToken(this.$getToken())
this.checkOaAuth()
// await this.$checkToken(this.$getToken())
// this.checkOaAuth()
this.fetchFallback()
} catch (e) {
return
@@ -135,25 +135,55 @@
fetchFallback() {
if (this.loadStatus !== 'more') return;
this.loadStatus = 'loading';
this.$u.post('/fallback/queryPage', {
pageNo: this.pageNo,
pageSize: this.pageSize
}, {
WT: this.$getToken()
}).then(res => {
const rows = res.data.result || [];
if (this.pageNo === 1) this.flowList = [];
this.flowList = this.flowList.concat(rows)
if (rows.length < this.pageSize) {
this.loadStatus = 'nomore';
} else {
this.pageNo++;
this.loadStatus = 'more';
// TODO: 接口联调时取消注释,删除 mock 数据
// this.$u.post('/fallback/queryPage', {
// pageNo: this.pageNo,
// pageSize: this.pageSize
// }, {
// WT: this.$getToken()
// }).then(res => {
// const rows = res.data.result || [];
// if (this.pageNo === 1) this.flowList = [];
// this.flowList = this.flowList.concat(rows)
// if (rows.length < this.pageSize) {
// this.loadStatus = 'nomore';
// } else {
// this.pageNo++;
// this.loadStatus = 'more';
// }
// }).catch(err => {
// console.log("获取留言失败", err)
// this.loadStatus = 'more';
// })
// Mock 静态数据
const mockData = [
{
id: '1',
content: '小区路灯损坏,晚上出行不方便,希望尽快维修',
status: 'processed',
statusText: '已处理',
summitDate: '2026-06-20'
},
{
id: '2',
content: '楼道卫生需要加强清洁,垃圾桶经常满溢',
status: 'processing',
statusText: '处理中',
summitDate: '2026-06-18'
},
{
id: '3',
content: '建议增加小区健身设施,方便居民锻炼身体',
status: 'pending',
statusText: '待处理',
summitDate: '2026-06-15'
}
}).catch(err => {
console.log("获取留言失败", err)
this.loadStatus = 'more';
})
];
if (this.pageNo === 1) this.flowList = [];
this.flowList = this.flowList.concat(mockData);
this.loadStatus = 'nomore';
},
loadMore() {
if (this.loadStatus !== 'more') return;
@@ -225,7 +255,6 @@
padding-top: 175rpx;
min-height: 100vh;
position: relative;
background: linear-gradient(0deg, #F3F1ED 43%, #F5E9DB 100%);
box-sizing: border-box;
}
.scroll-view {
@@ -236,9 +265,9 @@
.message-item {
background-color: #ffffff;
border-radius: 10rpx;
padding: 32rpx;
padding-left: 95rpx;
width: 92%;
padding: 50rpx;
padding-left: 120rpx;
width: 100%;
margin: auto;
margin-bottom: 20rpx;
position: relative;
@@ -255,16 +284,17 @@
margin-right: 20rpx;
color: #ffffff;
position: absolute;
top: 60rpx;
left: 10rpx;
}
.status-tag.processed {
background: linear-gradient(90deg, #F34038 0%, #FF7C76 100%);
background: linear-gradient(90deg, #6ca3eb 0%, #156bf4 100%);
}
.status-tag.processing {
background: linear-gradient(90deg, #FEAF04 0%, #FFC145 100%);
}
.status-tag.pending {
background: linear-gradient(90deg, #6688FC 0%, #809BFB 100%);
background: linear-gradient(90deg, #F34038 0%, #FF7C76 100%);
}
.message-title {
font-size: 30rpx;
@@ -316,7 +346,7 @@
margin-top: 20rpx;
width: 100%;
height: 80rpx;
background: #FF6F63;
background: #0088FE;
color: #fff;
border-radius: 8rpx;
font-size: 30rpx;
@@ -354,7 +384,7 @@
.add-btn {
width: 100%;
height: 80rpx;
background: linear-gradient(90deg, #FF6F63 0%, #FB392A 100%);
background: #0088FE;
border-radius: 10rpx;
color: #ffffff;
font-size: 32rpx;