暂时提交

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

@@ -1,7 +1,14 @@
<template>
<view class="HMfilterDropdown" :class="{'setDropdownBottom':maskVisibility}" :style="{'top':menuTop+'rpx'}"
<view class="HMfilterDropdown" :class="{'setDropdownBottom':maskVisibility}" :style="{
'top': menuTop+'rpx',
'--active-color': activeColor,
'--menu-text-color': menuTextColor,
'--submit-btn-bg': submitBtnBg,
'--submit-btn-color': submitBtnColor,
'--reset-btn-color': resetBtnColor
}"
@touchmove.stop.prevent="discard" @tap.stop="discard">
<view class="nav">
<view class="nav" :style="{'background': navBgGradient}">
<block v-for="(item,index) in menu" :key="index">
<view class="first-menu" :class="{'on':showPage==index}" @tap="togglePage(index)">
<text class="name">{{item.name}}</text>
@@ -141,6 +148,36 @@
dataFormat: {
value: String,
default: 'Array'
},
// 导航栏背景渐变色
navBgGradient: {
type: String,
default: 'linear-gradient(-90deg, rgb(207,240,255), rgb(179,217,255) 0% 99%)'
},
// 激活/高亮颜色(选中状态、按钮等)
activeColor: {
type: String,
default: '#f44336'
},
// 菜单文字默认颜色
menuTextColor: {
type: String,
default: '#000000'
},
// 提交按钮背景色
submitBtnBg: {
type: String,
default: '#f44336'
},
// 提交按钮文字色
submitBtnColor: {
type: String,
default: '#fff'
},
// 重置按钮文字色
resetBtnColor: {
type: String,
default: '#f44336'
}
},
watch: {
@@ -578,23 +615,22 @@
height: 44px;
border-bottom: solid 1rpx #eee;
z-index: 12;
background: linear-gradient(-90deg, #F9DED9 0%, #F8DFC0 99%);
flex-direction: row;
.first-menu {
width: 100%;
font-size: 15px;
color: #000000;
color: var(--menu-text-color, #000000);
flex-direction: row;
align-items: center;
justify-content: center;
transition: color .2s linear;
&.on {
color: #f44336;
color: var(--active-color, #f44336);
.iconfont {
color: #f44336;
color: var(--active-color, #f44336);
}
}
@@ -659,7 +695,7 @@
>.iconfont {
display: none;
font-size: 18px;
color: #f44336;
color: var(--active-color, #f44336);
}
}
}
@@ -689,7 +725,7 @@
border-bottom: solid 1rpx #e5e5e5;
&.on {
color: #f44336;
color: var(--active-color, #f44336);
>.menu-name {
>.iconfont {
@@ -712,12 +748,12 @@
>.iconfont {
display: none;
font-size: 18px;
color: #f44336;
color: var(--active-color, #f44336);
}
}
&.on {
color: #f44336;
color: var(--active-color, #f44336);
>.menu-name {
>.iconfont {
@@ -751,7 +787,7 @@
&.on {
border-color: #f6c8ac;
color: #f44336;
color: var(--active-color, #f44336);
}
.iconfont {
@@ -792,8 +828,8 @@
flex-wrap: wrap;
.on {
border-color: #f44336;
background-color: #f44336;
border-color: var(--active-color, #f44336);
background-color: var(--active-color, #f44336);
color: #fff;
}
@@ -829,18 +865,18 @@
width: 320rpx;
height: 42px;
border-radius: 42px;
border: 2rpx solid #f44336;
border: 2rpx solid var(--active-color, #f44336);
align-items: center;
justify-content: center;
}
.reset {
color: #f44336;
color: var(--reset-btn-color, #f44336);
}
.submit {
color: #fff;
background-color: #f44336;
color: var(--submit-btn-color, #fff);
background-color: var(--submit-btn-bg, #f44336);
}
}
}

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
// 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: 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
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 = data.managerPhone
this.managerPhone = '13800138000'
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)
})
}];
},
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;

View File

@@ -132,58 +132,102 @@
if(this.isSetTempAddress === 1){
return;
}
qqmapsdk.reverseGeocoder({
location: {
latitude: this.position.latitude,
longitude: this.position.longitude
// TODO: 接口联调时取消注释,删除 mock 数据
// qqmapsdk.reverseGeocoder({
// location: {
// latitude: this.position.latitude,
// longitude: this.position.longitude
// },
// get_poi: 1,
// poi_options: "page_size=30;page_index=1",
// success: res=> {
// res.result.pois.forEach(poi=>{
// if(!poi.ad_info){
// poi.ad_info = {
// adcode: poi.adcode,
// city: poi.city,
// district: poi.district,
// province: poi.province
// }
// }
// })
// if(this.tempAddress){
// if(this.tempAddress.title != res.result.pois[0].title){
// if(!this.tempAddress.ad_info){
// this.tempAddress.ad_info = {
// adcode: this.tempAddress.adcode,
// city: this.tempAddress.city,
// district: this.tempAddress.district,
// province: this.tempAddress.province
// }
// }
// res.result.pois.unshift(this.tempAddress);
// }
// this.tempAddress = null;
// this.isSetTempAddress = 1;
// setTimeout(()=>{
// this.isSetTempAddress = 0;
// }, 500)
// }
// if (s) {
// const ad_info = res.result.pois[0].ad_info;
// this.curCity = ad_info.city || '';
// res.result.pois[0].select = 1
// this.list = res.result.pois;
// this.checked = 0;
// } else {
// this.list = res.result.pois;
// }
// },
// fail: err=> {
// console.log(err)
// }
// })
// Mock 静态数据
const mockPois = [
{
title: '宜昌市西陵区东山大道435号',
address: '宜昌市西陵区东山大道435号',
location: { lng: 111.2842, lat: 30.7086 },
ad_info: { adcode: '420502', city: '宜昌市', district: '西陵区', province: '湖北省' }
},
get_poi: 1,
poi_options: "page_size=30;page_index=1",
success: res=> {
res.result.pois.forEach(poi=>{
if(!poi.ad_info){
poi.ad_info = {
adcode: poi.adcode,
city: poi.city,
district: poi.district,
province: poi.province
}
}
})
//有搜索结果时,手动追加到列表顶部
if(this.tempAddress){
if(this.tempAddress.title != res.result.pois[0].title){
if(!this.tempAddress.ad_info){
this.tempAddress.ad_info = {
adcode: this.tempAddress.adcode,
city: this.tempAddress.city,
district: this.tempAddress.district,
province: this.tempAddress.province
}
}
res.result.pois.unshift(this.tempAddress);
}
this.tempAddress = null;
this.isSetTempAddress = 1;
setTimeout(()=>{
this.isSetTempAddress = 0;
}, 500)
{
title: '宜昌市西陵区夷陵大道418号',
address: '宜昌市西陵区夷陵大道418号',
location: { lng: 111.2900, lat: 30.7120 },
ad_info: { adcode: '420502', city: '宜昌市', district: '西陵区', province: '湖北省' }
},
{
title: '宜昌市西陵区解放路88号',
address: '宜昌市西陵区解放路88号',
location: { lng: 111.2800, lat: 30.7050 },
ad_info: { adcode: '420502', city: '宜昌市', district: '西陵区', province: '湖北省' }
},
{
title: '宜昌市西陵区沿江大道168号',
address: '宜昌市西陵区沿江大道168号',
location: { lng: 111.2750, lat: 30.7000 },
ad_info: { adcode: '420502', city: '宜昌市', district: '西陵区', province: '湖北省' }
},
{
title: '宜昌市伍家岗区中南路56号',
address: '宜昌市伍家岗区中南路56号',
location: { lng: 111.3100, lat: 30.7200 },
ad_info: { adcode: '420503', city: '宜昌市', district: '伍家岗区', province: '湖北省' }
}
];
if (s) {
const ad_info = res.result.pois[0].ad_info;
this.curCity = ad_info.city || '';
res.result.pois[0].select = 1
this.list = res.result.pois;
this.curCity = '宜昌市';
mockPois[0].select = 1;
this.list = mockPois;
this.checked = 0;
} else {
this.list = res.result.pois;
this.list = mockPois;
}
},
fail: err=> {
console.log(err)
}
})
},
//地图区域改变
onRegionchange(e) {
clearTimeout(this.timer)

View File

@@ -5,7 +5,7 @@
<!-- Tabs -->
<view class="tab-wrapper">
<u-tabs :list="tabList" :current="currentTab" @change="onTabChange" lineColor="#EA4D3E" activeColor="#EA4D3E"
<u-tabs :list="tabList" :current="currentTab" @change="onTabChange" lineColor="#0088FE" activeColor="#0088FE"
itemStyle="padding: 0 30rpx;"></u-tabs>
</view>
@@ -16,20 +16,36 @@
<scroll-view scroll-y class="scroll-content" @scrolltolower="loadMore" :refresher-enabled="true"
:refresher-triggered="isRefreshing" @refresherrefresh="refresh">
<view v-if="contracts.length > 0" class="contract-list">
<view class="contract-card" v-for="item in contracts" :key="item.contractNo" @click="goDetail(item)">
<image class="contract-cover" :src="staticHost + (item.coverImgUrl || defaultCover)" mode="aspectFill" />
<view class="contract-info">
<view class="top-row">
<text class="asset-name">{{ $ellipsis(item.contractName,12) }}</text>
<u-icon name="arrow-right" size="28" color="#ccc" />
</view>
<view class="date-range">{{ item.startDate }} ~ {{ item.endDate }}</view>
<view :class="['contract-card', { 'is-expired': item.signStatus === 'expired' }]" v-for="item in contracts" :key="item.contractNo" @click="goDetail(item)">
<view class="card-header">
<text class="contract-name">{{ $ellipsis(item.contractName, 12) }}</text>
<view :class="['status-tag', item.signStatus]">
{{ getStatusText(item.signStatus) }}
</view>
</view>
<view class="card-divider"></view>
<view class="card-body">
<view class="info-row">
<view class="info-item">
<text class="info-label">合同类型</text>
<text class="info-value">电子合同</text>
</view>
<view class="info-item">
<text class="info-label">租金</text>
<text class="info-value">{{ item.contractNo }}</text>
</view>
</view>
<view class="info-row">
<view class="info-item">
<text class="info-label">开始日期</text>
<text class="info-value">{{ item.startDate }}</text>
</view>
<view class="info-item">
<text class="info-label">结束日期</text>
<text class="info-value">{{ item.endDate }}</text>
</view>
</view>
</view>
</view>
<u-loadmore :status="loadStatus" />
@@ -74,9 +90,9 @@ export default {
},
async onShow() {
try {
await this.$checkToken(this.$getToken())
// await this.$checkToken(this.$getToken())
// token 有效,继续执行
this.checkOaAuth()
// this.checkOaAuth()
this.loadContracts()
} catch (e) {
// token 无效,$checkToken 内部已处理跳转登录页
@@ -127,41 +143,68 @@ export default {
this.loadContracts();
},
loadContracts() {
// ✅ 正确判断加载状态
if (this.loadStatus !== 'more') return;
this.loadStatus = 'loading';
this.$u.post('/contract/queryPage', {
pageNo: this.pageNo,
pageSize: this.pageSize,
startDate: this.startDate,
endDate: this.endDate,
signStatus: this.statusFilter
}, {
WT: this.$getToken()
}).then(result => {
const rows = result.data.result || [];
// TODO: 接口联调时取消注释,删除 mock 数据
// this.$u.post('/contract/queryPage', {
// pageNo: this.pageNo,
// pageSize: this.pageSize,
// startDate: this.startDate,
// endDate: this.endDate,
// signStatus: this.statusFilter
// }, {
// WT: this.$getToken()
// }).then(result => {
// const rows = result.data.result || [];
// if (this.pageNo === 1 && rows.length === 0) {
// this.contracts = [];
// this.loadStatus = 'nomore';
// return;
// }
// this.contracts = this.contracts.concat(rows);
// if (rows.length < this.pageSize) {
// this.loadStatus = 'nomore';
// } else {
// this.pageNo++;
// this.loadStatus = 'more';
// }
// }).catch(err => {
// console.log("获取合同信息失败:", err);
// this.loadStatus = 'more';
// }).finally(() => {
// this.isRefreshing = false;
// });
if (this.pageNo === 1 && rows.length === 0) {
this.contracts = [];
this.loadStatus = 'nomore';
return;
// Mock 静态数据
const mockData = [
{
contractNo: 'HT-2026-001',
contractName: '东山大道435-2-1-104号房屋租赁合同',
startDate: '2026-01-01',
endDate: '2026-12-31',
signStatus: 'signed'
},
{
contractNo: 'HT-2026-002',
contractName: '夷陵大道418号房屋租赁合同',
startDate: '2026-03-01',
endDate: '2027-02-28',
signStatus: 'pending'
},
{
contractNo: 'HT-2025-003',
contractName: '解放路88-1-502号房屋租赁合同',
startDate: '2025-01-01',
endDate: '2025-12-31',
signStatus: 'expired'
}
];
this.contracts = this.contracts.concat(rows);
if (rows.length < this.pageSize) {
if (this.pageNo === 1) this.contracts = [];
this.contracts = this.contracts.concat(mockData);
this.loadStatus = 'nomore';
} else {
this.pageNo++;
this.loadStatus = 'more'; // ✅ 修复
}
}).catch(err => {
console.log("获取合同信息失败:", err);
this.loadStatus = 'more'; // ✅ 异常恢复
}).finally(() => {
this.isRefreshing = false;
});
},
refresh() {
this.isRefreshing = true;
@@ -205,79 +248,108 @@ export default {
.contract-list {
padding: 20rpx;
}
.contract-card {
display: flex;
background: #fff;
border-radius: 16rpx;
margin-bottom: 24rpx;
padding: 20rpx;
box-shadow: 0 4rpx 8rpx rgba(0, 0, 0, 0.05);
position: relative;
}
.contract-cover {
width: 193rpx;
height: 145rpx;
border-radius: 10rpx;
background-color: #FCE5E0;
flex-shrink: 0;
}
.contract-info {
.card-info {
flex: 1;
margin-left: 20rpx;
display: flex;
flex-direction: column;
position: relative;
justify-content: space-between;
}
.top-row {
.card-header {
display: flex;
justify-content: space-between;
align-items: center;
padding-bottom: 20rpx;
}
.card-divider {
height: 1rpx;
background-color: #f0f0f0;
}
.contract-card {
background: #fff;
border-radius: 16rpx;
margin-bottom: 24rpx;
padding: 24rpx;
box-shadow: 0 4rpx 8rpx rgba(0, 0, 0, 0.05);
}
.asset-name {
.card-header {
display: flex;
justify-content: space-between;
align-items: center;
padding-bottom: 20rpx;
}
.contract-name {
font-size: 30rpx;
font-weight: bold;
font-weight: 600;
color: #333;
flex: 1;
}
}
.asset-room {
font-size: 26rpx;
color: #555;
margin-top: 18rpx;
}
.date-range {
font-size: 24rpx;
color: #888;
margin-top: 20rpx;
}
.status-tag {
position: absolute;
bottom: 20rpx;
right: 0rpx;
padding: 12rpx 15rpx;
border-radius: 6rpx;
font-size: 26rpx;
font-size: 24rpx;
padding: 6rpx 16rpx;
border-radius: 8rpx;
flex-shrink: 0;
&.pending {
background: #FEEDDD;
color: #EFA049;
background: #FF8D1A;
color: #fff;
}
&.signed {
background: #FCE5E0;
color: #ED7748;
background: #0088FE;
color: #fff;
}
&.expired {
background: #CDCDCD;
color: #969696;
background: #A6A6A6;
color: #fff;
}
}
.card-divider {
height: 1rpx;
background-color: #f0f0f0;
}
.card-body {
padding-top: 20rpx;
}
.info-row {
display: flex;
margin-bottom: 16rpx;
padding: 20rpx 0;
&:last-child {
margin-bottom: 0;
}
}
.info-item {
flex: 1;
display: flex;
}
.info-label {
font-size: 24rpx;
color: #999;
margin-right: 8rpx;
flex-shrink: 0;
}
.info-value {
font-size: 24rpx;
color: #333;
}
.is-expired {
.contract-name,
.info-label,
.info-value {
color: #A6A6A6 !important;
}
}

View File

@@ -70,11 +70,11 @@
</view> -->
<!-- 底部操作栏完全保留原逻辑和样式 -->
<view v-if="contract.signStatus === '待签署'" class="bottom-bar">
<!-- <view v-if="contract.signStatus === '待签署'" class="bottom-bar">
<u-button class="sign-btn" @click="goSign">
去签署
</u-button>
</view>
</view> -->
</view>
</template>
@@ -94,7 +94,7 @@ export default {
async onShow() {
try {
await this.$checkToken(this.$getToken())
// await this.$checkToken(this.$getToken())
this.getContractDetail()
} catch (e) {
return
@@ -132,20 +132,30 @@ export default {
methods: {
/** 合同详情 + 第一条资产 */
getContractDetail() {
this.$u.get(`/contract/detail?contractNo=${this.contractNo}`, {},{
WT: this.$getToken()
}).then(res => {
console.log(res)
this.contract = res.data || {}
// TODO: 接口联调时取消注释,删除 mock 数据
// this.$u.get(`/contract/detail?contractNo=${this.contractNo}`, {},{
// WT: this.$getToken()
// }).then(res => {
// console.log(res)
// this.contract = res.data || {}
// // this.assetList = (res.assetsInfos.assets || []).map((item, index) => ({
// // ...item,
// // expanded: index === 0
// // }))
// // this.hasMoreAssets =
// // this.assetList.length < (res.totalAssets || 0)
// })
// this.assetList = (res.assetsInfos.assets || []).map((item, index) => ({
// ...item,
// expanded: index === 0
// }))
// this.hasMoreAssets =
// this.assetList.length < (res.totalAssets || 0)
})
// Mock 静态数据
this.contract = {
contractNo: this.contractNo || 'HT-2026-001',
contractName: '东山大道435-2-1-104号房屋租赁合同',
signStatus: '待签署',
startDate: '2026-01-01',
endDate: '2026-12-31',
rentFee: 2500,
deposit: 5000
}
},
/** 加载更多资产 */
@@ -337,7 +347,7 @@ export default {
&::v-deep .u-btn {
font-size: 30rpx;
color: #fff;
background: linear-gradient(90deg, #ff6f63 0%, #fb392a 100%);
background-color: #0088FE;
border-radius: 10rpx;
}
}

View File

@@ -205,7 +205,7 @@
.login-btn {
width: 100%;
height: 88rpx;
background-color: 0088FE;
background-color: #0088FE;
border-radius: 49rpx;
font-size: 36rpx;
color: #fff;

View File

@@ -47,9 +47,9 @@ export default {
},
async onShow() {
try {
await this.$checkToken(this.$getToken())
this.checkOaAuth()
this.fetchMessageList()
// await this.$checkToken(this.$getToken())
// this.checkOaAuth()
// this.fetchMessageList()
} catch (e) {
return
}
@@ -96,32 +96,70 @@ export default {
}
},
fetchMessageList(){
// ✅ 正确判断加载状态
if (this.loadStatus !== 'more') return;
this.loadStatus = 'loading';
let url = '/message/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);
// TODO: 接口联调时取消注释,删除 mock 数据
// let url = '/message/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';
// })
// ✅ 判断是否还有更多
if (rows.length < this.pageSize) {
this.loadStatus = 'nomore';
} else {
this.pageNo++;
this.loadStatus = 'more';
// Mock 静态数据
const mockData = [
{
id: '1',
icon: '/static/icon/msg-1.png',
title: '账单提醒',
desc: '您有一笔租金待支付,请及时处理',
time: '2026-06-27 10:30',
read: false
},
{
id: '2',
icon: '/static/icon/msg-2.png',
title: '合同签署',
desc: '您的租赁合同已生成,请尽快签署',
time: '2026-06-26 14:20',
read: false
},
{
id: '3',
icon: '/static/icon/msg-1.png',
title: '缴费成功',
desc: '您已成功缴纳5月份租金2500元',
time: '2026-06-25 09:15',
read: true
},
{
id: '4',
icon: '/static/icon/msg-2.png',
title: '预约确认',
desc: '您预约的看房申请已确认,管家将联系您',
time: '2026-06-24 16:45',
read: true
}
}).catch(err => {
console.log("获取消息列表失败:", err)
this.loadStatus = 'more'; // ✅ 异常恢复
})
];
if (this.pageNo === 1) this.flowList = [];
this.flowList = this.flowList.concat(mockData);
this.loadStatus = 'nomore';
},
loadMore() {
this.fetchMessageList()

View File

@@ -4,7 +4,7 @@
</u-navbar>
<view class="setting-content">
<u-cell-group>
<u-cell-item title="账号实名信息" @click="profile"></u-cell-item>
<!-- <u-cell-item title="账号实名信息" @click="profile"></u-cell-item> -->
<!-- <u-cell-item title="订阅系统消息" :arrow="false">
<u-switch v-model="longSubscribe" @change="toggleLongSubscribe" />

View File

@@ -20,51 +20,37 @@
:key="item.id"
class="record-card"
>
<!-- 资产名称和状态 -->
<!-- 预约时间 + 状态 -->
<view class="card-header">
<text class="asset-name">{{ item.assetName }}</text>
<text
:class="['record-status', item.status]"
>
<text class="reserve-time">{{ formatDate(item.date) }} 看房</text>
<text :class="['record-status', item.status]">
{{ statusText(item.status) }}
</text>
</view>
<!-- 内容部 -->
<view class="card-content">
<!-- 预约时间 -->
<view class="info-item">
<text class="info-label">预约时间</text>
<text class="info-value">{{ formatDate(item.date) }}</text>
</view>
<!-- 割线 -->
<view class="card-divider"></view>
<!-- 地址 -->
<view class="info-item">
<text class="info-label">地址</text>
<text class="info-value">{{ item.assetAddress }}</text>
<!-- 内容区左图右信息 -->
<view class="card-body">
<image class="cover-img" :src="staticHost + (item.coverImg || '/public/static/index/assets.jpg')" mode="aspectFill"></image>
<view class="card-info">
<text class="asset-name">{{ item.assetName }}</text>
<view class="info-row">
<u-icon name="map" size="26" color="#999"></u-icon>
<text class="info-text">{{ item.assetAddress }}</text>
</view>
<view class="info-row">
<u-icon name="account" size="26" color="#999"></u-icon>
<text class="info-text">{{ item.managerName || '未知' }}{{ item.managerPhone || '未知' }}</text>
</view>
<!-- 管家 -->
<view class="info-item">
<text class="info-label">管家</text>
<text class="info-value">{{ item.managerName || '未知'}}{{ item.managerPhone || '未知'}}</text>
</view>
</view>
<!-- 操作按钮 -->
<view class="action-buttons">
<button
class="location-btn"
@click="viewLocation(item)"
>
查看位置
</button>
<button
class="call-btn"
@click="callManager(item.managerPhone)"
>
拨打电话
</button>
<button class="location-btn" @click="viewLocation(item)">查看位置</button>
<button class="call-btn" @click="callManager(item.managerPhone)">拨打电话</button>
</view>
</view>
@@ -100,13 +86,18 @@ export default {
},
async onShow() {
try {
await this.$checkToken(this.$getToken())
// await this.$checkToken(this.$getToken())
this.fetchReserve()
} catch (e) {
return
}
},
// ✅ 删除 scroll-view 冲突的 onReachBottom
computed: {
staticHost() {
return this.$config.staticUrl
}
},
methods: {
statusText(status) {
switch (status) {
@@ -132,31 +123,62 @@ export default {
return `${year}-${month}-${day} ${weekday} ${hours}:${minutes}`;
},
fetchReserve(){
// ✅ 正确判断加载状态
if (this.loadStatus !== 'more') return;
this.loadStatus = 'loading';
let url = '/reservate/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 = '/reservate/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',
assetName: '东山大道435-2-1-104号',
status: 'pending',
date: '2026-06-28 14:00:00',
assetAddress: '宜昌市西陵区东山大道435号',
managerName: '张管家',
managerPhone: '13800138001',
lat: 30.7086,
lng: 111.2842,
coverImg: '/public/static/index/assets.jpg'
},
{
id: '2',
assetName: '夷陵大道418号',
status: 'done',
date: '2026-06-20 10:30:00',
assetAddress: '宜昌市西陵区夷陵大道418号',
managerName: '李管家',
managerPhone: '13800138002',
lat: 30.7120,
lng: 111.2900,
coverImg: '/public/static/index/assets.jpg'
}
}).catch(err => {
console.log("获取预约记录失败:", err)
this.loadStatus = 'more'; // ✅ 异常恢复
})
];
if (this.pageNo === 1) this.flowList = [];
this.flowList = this.flowList.concat(mockData);
this.loadStatus = 'nomore';
},
viewLocation(item) {
uni.openLocation({
@@ -198,7 +220,6 @@ export default {
.reserve-records {
min-height: 100vh;
padding-top: 175rpx;
background: linear-gradient(0deg, #F3F1ED 43%, #F5E9DB 100%);
box-sizing: border-box;
}
@@ -209,13 +230,13 @@ export default {
}
.record-list {
padding: 30rpx 40rpx;
padding: 30rpx 20rpx;
}
.record-card {
background: #fff;
border-radius: 12rpx;
padding: 32rpx;
padding: 25rpx;
margin-bottom: 30rpx;
box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.05);
}
@@ -224,63 +245,79 @@ export default {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 24rpx;
padding-bottom: 20rpx;
}
.asset-name {
font-size: 32rpx;
.reserve-time {
font-size: 30rpx;
font-weight: 500;
color: #2D2B2C;
color: #333;
}
.record-status {
font-size: 26rpx;
padding: 10rpx 15rpx;
font-size: 28rpx;
padding: 6rpx 16rpx;
border-radius: 4rpx;
&.done {
background: #FCE5E0;
color: #ED7748;
background: #fff;
color: #0088FE;
}
&.pending {
background: #F2F3F7;
color: #86868C;
background: #fff;
color: #FF8D1A;
}
}
.card-content {
margin-bottom: 32rpx;
.card-divider {
height: 1rpx;
background-color: #f0f0f0;
}
.info-item {
.card-body {
display: flex;
align-items: flex-start;
padding: 24rpx 0;
}
.info-item:last-child {
margin-bottom: 0;
}
.info-label {
font-size: 24rpx;
color: #666;
width: 120rpx;
.cover-img {
width: 160rpx;
height: 160rpx;
border-radius: 8rpx;
flex-shrink: 0;
line-height: 44rpx;
background-color: #f5f5f5;
}
.info-value {
font-size: 24rpx;
color: #333;
.card-info {
flex: 1;
line-height: 44rpx;
margin-left: 20rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.asset-name {
font-size: 30rpx;
font-weight: 600;
color: #2D2B2C;
margin-bottom: 12rpx;
}
.info-row {
display: flex;
align-items: center;
margin-bottom: 8rpx;
}
.info-text {
font-size: 24rpx;
color: #999;
margin-left: 8rpx;
}
.action-buttons {
display: flex;
justify-content: flex-end;
gap: 20rpx;
margin-top: 32rpx;
padding-top: 32rpx;
padding-top: 20rpx;
border-top: 1rpx solid #f0f0f0;
}
@@ -288,20 +325,20 @@ export default {
width: 220rpx;
height: 72rpx;
background: #fff;
color: #2D2B2C;
color: #0088FE;
font-size: 28rpx;
border-radius: 8rpx;
display: flex;
align-items: center;
justify-content: center;
box-sizing: border-box;
border: 1px solid #222222;
border: 1px solid #0088FE;
}
.call-btn {
width: 220rpx;
height: 72rpx;
background: #ff3b30;
background: #0088FE;
color: #fff;
font-size: 28rpx;
border-radius: 8rpx;

View File

@@ -4,14 +4,6 @@
back-icon-color="#2D2B2C">
</u-navbar>
<view class="search-list-content">
<view class="filter-dropdown-wrapper">
<u-sticky offset-top="0">
<view class="sticky" style="width: 100vw;">
<filterDropdown :menuTop="0" :filterData="filterData" :defaultSelected="defaultSelected"
:updateMenuName="true" @confirm="confirm" dataFormat="Object"></filterDropdown>
</view>
</u-sticky>
</view>
<view class="search-bar-wrapper">
<view class="search-bar">
<view class="city-select" @click="location()">{{ city ||'宜昌市'}} <text class="icon-down"></text>
@@ -22,6 +14,18 @@
</view>
</view>
</view>
<view class="filter-dropdown-wrapper">
<u-sticky offset-top="0">
<view class="sticky" style="width: 100vw;">
<filterDropdown :menuTop="0" :filterData="filterData" :defaultSelected="defaultSelected"
:updateMenuName="true" @confirm="confirm" dataFormat="Object"
navBgGradient="linear-gradient(-90deg, rgb(207,240,255), rgb(179,217,255) 0% 99%)"
activeColor="#0088FE"
submitBtnBg="#0088FE"
resetBtnColor="#0088FE"></filterDropdown>
</view>
</u-sticky>
</view>
<view class="tag-group">
<view class="tag-item" :class="{ active: selectedTags.includes(tag) }"
v-for="(tag, index) in tagGroupList" :key="index" @click="onTagClick(tag)">
@@ -96,7 +100,7 @@
tagGroupList: [],
selectedTags: [],
background: {
backgroundImage: 'linear-gradient(-90deg, #F9DED9 0%, #F8DFC0 99%);'
backgroundImage: 'linear-gradient(-90deg, rgb(207,240,255),rgb(179,217,255) 0% 99%);'
},
}
},
@@ -167,49 +171,93 @@
this.loadStatus = 'loading';
this.$u.post('/assets/queryPage', {
assetsStatus:'闲置中',
assetsType: type,
pageNo: this.pageNo,
pageSize: this.pageSize,
keyWord: keyword,
bizZone: this.searchData.bizZone,
layout: this.searchData.layout,
renovationStatus: this.searchData.decoration,
features: this.searchData.feature
}).then(result => {
const rows = result.data.result || [];
// TODO: 接口联调时取消注释,删除 mock 数据
// this.$u.post('/assets/queryPage', {
// assetsStatus:'闲置中',
// assetsType: type,
// pageNo: this.pageNo,
// pageSize: this.pageSize,
// keyWord: keyword,
// bizZone: this.searchData.bizZone,
// layout: this.searchData.layout,
// renovationStatus: this.searchData.decoration,
// features: this.searchData.feature
// }).then(result => {
// const rows = result.data.result || [];
// if (this.pageNo === 1 && rows.length === 0) {
// this.flowList = [];
// this.loadStatus = 'nomore';
// return;
// }
// rows.forEach(row => {
// if (row.coverImgUrl) {
// row.coverImgUrl = this.$config.staticUrl + row.coverImgUrl
// } else {
// row.coverImgUrl = this.$config.staticUrl + this.defaultImgUrl
// }
// })
// this.flowList = this.flowList.concat(rows);
// if (rows.length < this.pageSize) {
// this.loadStatus = 'nomore';
// } else {
// this.pageNo++;
// this.loadStatus = 'more';
// }
// this.keyWord = null
// }).catch(err => {
// console.log("获取资产信息失败:", err);
// this.loadStatus = 'more';
// }).finally(() => {
// uni.stopPullDownRefresh();
// });
if (this.pageNo === 1 && rows.length === 0) {
this.flowList = [];
// Mock 静态数据
const mockData = [
{
assetsNo: 'ASSET-001',
assetsName: '东山大道435-2-1-104号',
assetsType: '住宅',
footPrint: 120,
orientation: '南',
coverImgUrl: this.$config.staticUrl + this.defaultImgUrl,
tags: ['近地铁', '精装修']
},
{
assetsNo: 'ASSET-002',
assetsName: '夷陵大道418号商铺',
assetsType: '商铺',
footPrint: 85,
orientation: '东',
coverImgUrl: this.$config.staticUrl + this.defaultImgUrl,
tags: ['临街', '人流量大']
},
{
assetsNo: 'ASSET-003',
assetsName: '解放路88号写字楼',
assetsType: '写字楼',
footPrint: 200,
orientation: '南',
coverImgUrl: this.$config.staticUrl + this.defaultImgUrl,
tags: ['交通便利', '配套齐全']
},
{
assetsNo: 'ASSET-004',
assetsName: '沿江大道168号住房',
assetsType: '住宅',
footPrint: 95,
orientation: '南',
coverImgUrl: this.$config.staticUrl + this.defaultImgUrl,
tags: ['拎包入住', '采光好']
}
];
setTimeout(() => {
if (this.pageNo === 1) this.flowList = [];
this.flowList = this.flowList.concat(mockData);
this.loadStatus = 'nomore';
return;
}
rows.forEach(row => {
if (row.coverImgUrl) {
row.coverImgUrl = this.$config.staticUrl + row.coverImgUrl
} else {
row.coverImgUrl = this.$config.staticUrl + this.defaultImgUrl
}
})
this.flowList = this.flowList.concat(rows);
if (rows.length < this.pageSize) {
this.loadStatus = 'nomore';
} else {
this.pageNo++;
this.loadStatus = 'more'; // ✅ 恢复
}
this.keyWord = null
}).catch(err => {
console.log("获取资产信息失败:", err);
this.loadStatus = 'more'; // ✅ 恢复
}).finally(() => {
this.keyWord = null;
uni.stopPullDownRefresh();
});
}, 500);
},
loadMore() {
if (this.loadStatus !== 'more') return;
@@ -239,18 +287,26 @@
this.filterData = searchData;
},
async getFeatures(){
const res = await this.$u.get('/assets/getFeatures');
if (res.flag) {
return res.data;
}
return [];
// TODO: 接口联调时取消注释,删除 mock 数据
// const res = await this.$u.get('/assets/getFeatures');
// if (res.flag) {
// return res.data;
// }
// return [];
// Mock 静态数据
return ['近地铁', '精装修', '拎包入住', '采光好', '临街', '配套齐全', '交通便利'];
},
async getBizZone(){
const res = await this.$u.get('/assets/getBizZones');
if (res.flag) {
return res.data;
}
return [];
// TODO: 接口联调时取消注释,删除 mock 数据
// const res = await this.$u.get('/assets/getBizZones');
// if (res.flag) {
// return res.data;
// }
// return [];
// Mock 静态数据
return ['CBD商圈', '解放路商圈', '沿江大道', '东山大道', '夷陵大道'];
},
getImageSize(url, index) {
uni.getImageInfo({
@@ -306,13 +362,14 @@
}
.search-list-content {
background: linear-gradient(-90deg, #F9DED9 0%, #F8DFC0 99%);
background: linear-gradient(-90deg, rgb(207,240,255),rgb(179,217,255) 0% 99%);
border-radius: 0rpx;
padding-bottom: 20rpx;
padding-bottom: 0;
padding-top: var(--window-top, 0);
}
.search-bar-wrapper {
padding: 10rpx 20rpx;
padding: 10rpx 20rpx 0;
}
.search-bar {
@@ -361,7 +418,7 @@
}
.filter-dropdown-wrapper {
margin-bottom: 20rpx;
margin-bottom: 0;
}
.tag-group {

View File

@@ -9,18 +9,18 @@
<view class="user-info">
<view class="user-name">
<text class="name-text">{{user.userName || '用户0564'}}</text>
<text class="auth-tag">{{user.oaAuth ? '已认证' : '未认证'}}</text>
<image :src="staticHost + '/public/static/center/' + (user.userType === '0' && user.oaAuth ? 'personal-actived' : 'personal') + '.png'" class="user-type-icon" mode="widthFix"></image>
<image :src="staticHost + '/public/static/center/' + (user.userType === '1' && user.oaAuth ? 'org-actived' : 'org') + '.png'" class="user-type-icon" mode="widthFix"></image>
</view>
<view class="user-type">用户类型{{user.userType ==='0' ? '个人' : '组织'}}</view>
</view>
<view class="msg-setting">
<view class="u-relative msg-icon" @click="toMessage()">
<u-icon name="chat" size="48" color="#333"></u-icon>
<image :src="staticHost + '/public' + '/static/center/msg.png'" class="msg-icon-img" mode="widthFix"></image>
<view v-if="unreadMsgCount > 0" class="badge">
{{ unreadMsgCount > 99 ? '99+' : unreadMsgCount }}
</view>
</view>
<u-icon name="setting" size="48" color="#333" @click="toSetting()"></u-icon>
</view>
</view>
@@ -28,94 +28,134 @@
<!-- 我的合同和我的预约 -->
<view class="contract-appointment">
<view class="card" @click="clickNav('/pages-biz/contract/contract')">
<view class="card-title">我的合同</view>
<view class="card-main">
<view class="card-content">
<view class="card-left">
<view class="card-title">
我的合同
<u-icon name="arrow-right" color="#2979ff" size="28" class="arrow-icon"></u-icon>
</view>
<view class="card-info">
<view class="card-type">待签署合同</view>
<view class="card-number">{{unsignContractNum}}</view>
<view class="card-type">份待签署合同</view>
</view>
<view class="card-icon">
<image :src="staticHost + '/public' + '/static/icon/sign.png'" mode="widthFix"></image>
</view>
<view class="card-right">
<image class="card-icon" :src="staticHost + '/public' + '/static/center/contract-center.png'" mode="widthFix"></image>
</view>
</view>
<view class="card" @click="clickNav('/pages-biz/reserve/reserveRecords')">
<view class="card-title">我的预约</view>
<view class="card-main">
<view class="card-content">
<view class="card-left">
<view class="card-title">
我的预约
<u-icon name="arrow-right" color="#2979ff" size="28" class="arrow-icon"></u-icon>
</view>
<view class="card-info">
<view class="card-type">预约中</view>
<view class="card-number">{{handlingReserveNum}}</view>
<view class="card-type">个预约中</view>
</view>
<view class="card-icon">
<image :src="staticHost + '/public' + '/static/icon/sign.png'" mode="widthFix"></image>
</view>
<view class="card-right">
<image class="card-icon" :src="staticHost + '/public' + '/static/center/reserve-center.png'" mode="widthFix"></image>
</view>
</view>
</view>
<!-- 订单信息 -->
<view class="my-service">
<view class="service-title">订单信息</view>
<view class="service-title">常用功能</view>
<view class="service-list">
<view class="service-item" @click="clickNav('/pages-biz/bill/payHistory')">
<view class="service-item" @click="clickNav('/pages-biz/contract/contract')">
<view class="service-icon">
<image :src="staticHost + '/public' + '/static/icon/bill.png'"></image>
<image :src="staticHost + '/public' + '/static/center/contract.png'"></image>
</view>
<view class="service-name">账单</view>
</view>
<view class="service-item" @click="clickNav('/pages-biz/myrent/myLease')">
<view class="service-icon">
<image :src="staticHost + '/public' + '/static/icon/myrent.png'"></image>
</view>
<view class="service-name">租赁资产</view>
</view>
<view class="service-item" @click="clickNav('/pages-biz/wae/wae')">
<view class="service-icon badge-wrapper">
<image :src="staticHost + '/public' + '/static/icon/wae.png'"></image>
<view v-if="unpaidWaeCount > 0" class="badge">
{{ unpaidWaeCount > 99 ? '99+' : unpaidWaeCount }}
</view>
</view>
<view class="service-name">水电费待付</view>
<view class="service-name">我的合同</view>
</view>
<view class="service-item" @click="clickNav('/pages-biz/unpaid/unpaid')">
<view class="service-icon badge-wrapper">
<image :src="staticHost + '/public' + '/static/icon/unpaid.png'"></image>
<view v-if="unpaidRentCount > 0" class="badge">
<view class="service-icon">
<image :src="staticHost + '/public' + '/static/center/rentbill.png'"></image>
<!-- <view v-if="unpaidRentCount > 0" class="badge">
{{ unpaidRentCount > 99 ? '99+' : unpaidRentCount }}
</view> -->
</view>
<view class="service-name">租赁账单</view>
</view>
<view class="service-name">租金待付</view>
<view class="service-item" @click="clickNav('/pages-biz/wae/wae')">
<view class="service-icon">
<image :src="staticHost + '/public' + '/static/center/wae.png'"></image>
<!-- <view v-if="unpaidWaeCount > 0" class="badge">
{{ unpaidWaeCount > 99 ? '99+' : unpaidWaeCount }}
</view> -->
</view>
<view class="service-name">水电账单</view>
</view>
<view class="service-item" @click="clickNav('/pages-biz/bill/payHistory')">
<view class="service-icon badge-wrapper">
<image :src="staticHost + '/public' + '/static/center/payhistory.png'"></image>
</view>
<view class="service-name">收支记录</view>
</view>
<view class="service-item" @click="clickNav('/pages-biz/reserve/reserveRecords')">
<view class="service-icon badge-wrapper">
<image :src="staticHost + '/public' + '/static/center/reserve.png'"></image>
</view>
<view class="service-name">看房预约</view>
</view>
<view class="service-item" @click="clickNav('/pages-assets/discharge/leaseCancelList')">
<view class="service-icon badge-wrapper">
<image :src="staticHost + '/public' + '/static/center/discharge.png'"></image>
</view>
<view class="service-name">退租申请</view>
</view>
<view class="service-item" @click="clickNav('/pages-assets/fallback/fallback')">
<view class="service-icon badge-wrapper">
<image :src="staticHost + '/public' + '/static/center/fallback.png'"></image>
</view>
<view class="service-name">我要留言</view>
</view>
<view class="service-item" @click="clickNav('/pages-biz/unpaid/unpaidMargin')">
<view class="service-icon badge-wrapper">
<image :src="staticHost + '/public' + '/static/icon/unpaidMargin.png'"></image>
<view v-if="unpaidMargin > 0" class="badge">
{{ unpaidMargin > 99 ? '99+' : unpaidMargin }}
<image :src="staticHost + '/public' + '/static/center/repair.png'"></image>
</view>
</view>
<view class="service-name">保证金待付</view>
<view class="service-name">维修需求</view>
</view>
</view>
</view>
</view>
<!-- 辅助工具 -->
<!-- 其他功能 -->
<view class="common-tools">
<view class="tools-title">辅助工具</view>
<view class="tools-title">其他功能</view>
<view class="tools-list">
<view class="tool-item" @click="clickNav('/pages-assets/fallback/fallback')">
<view class="tool-icon">
<image :src="staticHost + '/public' + '/static/icon/fallback.png'" mode="widthFix"></image>
<view class="tool-item" @click="clickNav('/pages-biz/profile/profile')">
<image class="tool-icon" :src="staticHost + '/public' + '/static/center/auth.png'" mode="widthFix"></image>
<view class="tool-center">
<text class="tool-name">实名认证</text>
<text class="tool-desc">个人实名信息认证</text>
</view>
<view class="tool-name">留言板</view>
<text class="auth-tag">{{user.oaAuth ? '已认证' : '未认证'}}</text>
<u-icon name="arrow-right" color="#999" size="28"></u-icon>
</view>
<!-- 新增计算器 -->
<view class="tool-item" @click="clickNav('/pages-biz/tool/calculator')">
<view class="tool-icon">
<image :src="staticHost + '/public/static/icon/calculator.png'" mode="widthFix"></image>
<image class="tool-icon" :src="staticHost + '/public/static/center/caculator.png'" mode="widthFix"></image>
<view class="tool-center">
<text class="tool-name">计算器</text>
<text class="tool-desc">便捷工具</text>
</view>
<view class="tool-name">计算器</view>
<u-icon name="arrow-right" color="#999" size="28"></u-icon>
</view>
<view class="tool-item" @click="toSetting()">
<image class="tool-icon" :src="staticHost + '/public/static/center/setting.png'" mode="widthFix"></image>
<view class="tool-center">
<text class="tool-name">设置</text>
<text class="tool-desc">小程序相关设置</text>
</view>
<u-icon name="arrow-right" color="#999" size="28"></u-icon>
</view>
</view>
</view>
@@ -185,12 +225,12 @@
try {
// await this.$checkToken(this.$getToken())
this.loadUserInfo()
this.countHandlingReserve()
this.countUnHandleContract()
this.countUnpayRentBills()
this.countUnpayWaeBills()
this.countUnreadMsg()
this.countUnpaidRentMargin()
// this.countHandlingReserve()
// this.countUnHandleContract()
// this.countUnpayRentBills()
// this.countUnpayWaeBills()
// this.countUnreadMsg()
// this.countUnpaidRentMargin()
} catch (e) {
return
}
@@ -349,15 +389,21 @@
.name-text {
font-size: 38rpx;
font-weight: 500;
font-weight: 700;
color: #2D2B2C;
margin-right: 16rpx;
}
.user-type-icon {
width: 34rpx;
height: 34rpx;
margin-right: 8rpx;
}
.auth-tag {
font-size: 26rpx;
color: #86868C;
padding: 4rpx 12rpx;
padding: 8rpx 12rpx;
}
.user-type {
@@ -381,7 +427,7 @@
.contract-appointment {
display: flex;
gap: 30rpx;
padding: 20rpx;
padding: 15rpx;
}
.card {
@@ -389,59 +435,66 @@
background-color: #fff;
border-radius: 10rpx;
padding: 24rpx;
display: flex;
flex-direction: column;
}
.card-title {
font-size: 30rpx;
font-weight: 500;
color: #222222;
}
.card-main {
display: flex;
justify-content: space-between;
align-items: center;
position: relative;
min-height: 160rpx;
}
.card-content {
.card-left {
flex: 1;
}
.card-number {
font-size: 48rpx;
font-weight: 600;
color: #EC712E;
margin-bottom: 8rpx;
.card-title {
display: flex;
align-items: center;
font-size: 35rpx;
font-weight: 700;
color: #222222;
margin-bottom: 16rpx;
}
.arrow-icon {
margin-left: 5rpx;
}
.card-info {
display: flex;
flex-direction: column;
}
.card-type {
font-size: 26rpx;
color: #86868C;
margin-bottom: 8rpx;
}
.card-number {
font-size: 48rpx;
font-weight: 600;
color: #258AE6;
}
.card-right {
display: flex;
align-items: center;
}
.card-icon {
position: absolute;
right: 0;
bottom: -20rpx;
}
.card-icon image {
width: 120rpx;
height: 111rpx;
max-height: 100rpx;
}
/* 我的服务 */
.my-service {
margin-top: 50rpx;
padding: 30rpx 40rpx;
margin-bottom: 30rpx;
}
.service-title {
font-size: 30rpx;
font-weight: 500;
font-size: 40rpx;
font-weight: 700;
color: #222222;
margin-bottom: 30rpx;
}
@@ -464,7 +517,7 @@
}
.service-icon image {
width: 80rpx;
width: 70rpx;
height: 70rpx;
}
@@ -481,40 +534,49 @@
}
.tools-title {
font-size: 30rpx;
font-weight: 500;
font-size: 40rpx;
font-weight: 700;
color: #222222;
margin-bottom: 30rpx;
}
.tools-list {
margin-top: 50rpx;
margin-left: -20rpx;
display: flex;
flex-flow: row wrap;
background-color: #fff;
border-radius: 16rpx;
overflow: hidden;
}
.tool-item {
width: 25%;
margin-bottom: 40rpx;
display: flex;
flex-direction: column;
align-items: center;
padding: 28rpx 24rpx;
&:active {
background-color: #f8f8f8;
}
}
.tool-icon {
margin-bottom: 16rpx;
width: 48rpx;
height: 48rpx;
margin-right: 20rpx;
}
.tool-icon image {
width: 47rpx;
height: 47rpx;
.tool-center {
flex: 1;
display: flex;
flex-direction: column;
}
.tool-name {
font-size: 24rpx;
color: #222222;
font-size: 30rpx;
color: #333;
margin-bottom: 6rpx;
}
.tool-desc {
font-size: 24rpx;
color: #999;
}
.badge-wrapper {
position: relative;
@@ -548,4 +610,9 @@
.msg-icon {
position: relative;
}
.msg-icon-img {
width: 48rpx;
height: 48rpx;
}
</style>

View File

@@ -1,7 +1,7 @@
<template>
<view class="index">
<image :src="staticHost + '/public/static/index/index_bg.png'" mode="aspectFill" class="bg"></image>
<float-guide :initX="280" :initY="400" :videoSrc="staticHost + '/public/static/index/guide.mp4'" />
<!-- <float-guide :initX="280" :initY="400" :videoSrc="staticHost + '/public/static/index/guide.mp4'" /> -->
<!-- 搜索栏 -->
<view class="index-title" :style="{ top: capsuleTop + 'px', height: capsuleHeight + 'px', lineHeight: capsuleHeight + 'px' }">
新望资产
@@ -301,44 +301,83 @@
if (this.loadStatus !== 'more') return;
this.loadStatus = 'loading';
let recommendType = this.recommendTabs[this.activeRecommendTab].type;
let layoutList = this.activeFilterTabs.map(i => this.filterTabs[i].value);
this.$u.post('/assets/queryPage', {
assetsType: type,
pageNo: this.pageNo,
pageSize: this.pageSize,
assetsStatus: '闲置中',
recommendType: recommendType,
layout: layoutList.length > 0 ? layoutList.join(',') : null
}).then(result => {
let rows = result.data.result || [];
if (this.pageNo === 1 && rows.length === 0) {
this.flowList = [];
this.loadStatus = 'nomore';
return;
}
rows.forEach(row => {
if (row.coverImgUrl) {
row.coverImgUrl = this.$config.staticUrl + row.coverImgUrl
} else {
row.coverImgUrl = this.$config.staticUrl + this.defaultImgUrl
}
})
this.flowList = this.flowList.concat(rows);
if (rows.length < this.pageSize) {
this.loadStatus = 'nomore';
} else {
this.pageNo++;
this.loadStatus = 'more';
}
// TODO: 接口联调时取消注释,删除 mock 数据
// let recommendType = this.recommendTabs[this.activeRecommendTab].type;
// let layoutList = this.activeFilterTabs.map(i => this.filterTabs[i].value);
// this.$u.post('/assets/queryPage', {
// assetsType: type,
// pageNo: this.pageNo,
// pageSize: this.pageSize,
// assetsStatus: '闲置中',
// recommendType: recommendType,
// layout: layoutList.length > 0 ? layoutList.join(',') : null
// }).then(result => {
// let rows = result.data.result || [];
// if (this.pageNo === 1 && rows.length === 0) {
// this.flowList = [];
// this.loadStatus = 'nomore';
// return;
// }
// rows.forEach(row => {
// if (row.coverImgUrl) {
// row.coverImgUrl = this.$config.staticUrl + row.coverImgUrl
// } else {
// row.coverImgUrl = this.$config.staticUrl + this.defaultImgUrl
// }
// })
// 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';
// }).finally(() => {
// uni.stopPullDownRefresh();
// });
}).catch(err => {
console.log("获取资产信息失败:", err);
this.loadStatus = 'more';
}).finally(() => {
// Mock 静态数据
const mockData = [
{
assetsNo: 'ASSET-001',
assetsName: '东山大道435-2-1-104号',
assetsType: '住宅',
footPrint: 120,
coverImgUrl: this.$config.staticUrl + this.defaultImgUrl
},
{
assetsNo: 'ASSET-002',
assetsName: '夷陵大道418号商铺',
assetsType: '商铺',
footPrint: 85,
coverImgUrl: this.$config.staticUrl + this.defaultImgUrl
},
{
assetsNo: 'ASSET-003',
assetsName: '解放路88号写字楼',
assetsType: '写字楼',
footPrint: 200,
coverImgUrl: this.$config.staticUrl + this.defaultImgUrl
},
{
assetsNo: 'ASSET-004',
assetsName: '沿江大道168号住房',
assetsType: '住宅',
footPrint: 95,
coverImgUrl: this.$config.staticUrl + this.defaultImgUrl
}
];
setTimeout(() => {
if (this.pageNo === 1) this.flowList = [];
this.flowList = this.flowList.concat(mockData);
this.loadStatus = 'nomore';
uni.stopPullDownRefresh();
});
}, 500);
},
clickImage(assetsNo) {
console.log(assetsNo)
@@ -383,22 +422,30 @@
});
},
getNoticecList() {
let url = "/notice/pageQuery";
this.$u.post(url, {
pageNo: 1,
pageSize: 10
}).then(obj => {
if (obj.flag) {
let data = obj.data.result
if (data) {
data.filter(item => {
this.noticeList.push((item.noticeTitle || item.noticeContent))
})
}
}
}).catch(err => {
console.log("获取招商公告失败:", err)
});
// TODO: 接口联调时取消注释,删除 mock 数据
// let url = "/notice/pageQuery";
// this.$u.post(url, {
// pageNo: 1,
// pageSize: 10
// }).then(obj => {
// if (obj.flag) {
// let data = obj.data.result
// if (data) {
// data.filter(item => {
// this.noticeList.push((item.noticeTitle || item.noticeContent))
// })
// }
// }
// }).catch(err => {
// console.log("获取招商公告失败:", err)
// });
// Mock 静态数据
this.noticeList = [
'东山大道435号房屋招租公告',
'夷陵大道418号商铺招租',
'2026年第三季度资产招租计划'
];
},
onBannerTap(item) {
if (item.url) {
@@ -585,7 +632,7 @@
.filter-item.active {
background: #d4e2ef;
color: #258AE6;
color: #0088FE;
}
.demo-warter {
@@ -613,7 +660,7 @@
.item-price {
font-size: 32rpx;
color: #258AE6;
color: #0088FE;
margin-bottom: 10rpx;
}
@@ -669,7 +716,7 @@
width: 100%;
height: 88rpx;
line-height: 88rpx;
background: linear-gradient(135deg, #258AE6, #79b5ff);
background: linear-gradient(135deg, #0088FE, #79b5ff);
color: #fff;
font-size: 30rpx;
font-weight: 500;