暂时提交

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

@@ -126,63 +126,107 @@
})
}
},
//获取poi列表
//获取poi列表
getAddressList(s = 0) {
//在ios下防止搜索返回时多次加载地址列表的问题
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)
}
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;
}
{
title: '宜昌市西陵区夷陵大道418号',
address: '宜昌市西陵区夷陵大道418号',
location: { lng: 111.2900, lat: 30.7120 },
ad_info: { adcode: '420502', city: '宜昌市', district: '西陵区', province: '湖北省' }
},
fail: err=> {
console.log(err)
{
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) {
this.curCity = '宜昌市';
mockPois[0].select = 1;
this.list = mockPois;
this.checked = 0;
} else {
this.list = mockPois;
}
},
//地图区域改变
onRegionchange(e) {

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) {
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) this.contracts = [];
this.contracts = this.contracts.concat(mockData);
this.loadStatus = 'nomore';
this.isRefreshing = false;
},
refresh() {
this.isRefreshing = true;
@@ -205,79 +248,108 @@ export default {
.contract-list {
padding: 20rpx;
}
.card-info {
flex: 1;
margin-left: 20rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.card-header {
display: flex;
justify-content: space-between;
align-items: center;
padding-bottom: 20rpx;
}
.card-divider {
height: 1rpx;
background-color: #f0f0f0;
}
.contract-card {
display: flex;
background: #fff;
border-radius: 16rpx;
margin-bottom: 24rpx;
padding: 20rpx;
padding: 24rpx;
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 {
flex: 1;
margin-left: 20rpx;
display: flex;
flex-direction: column;
position: relative;
}
.top-row {
.card-header {
display: flex;
justify-content: space-between;
align-items: center;
.asset-name {
font-size: 30rpx;
font-weight: bold;
color: #333;
flex: 1;
}
padding-bottom: 20rpx;
}
.asset-room {
font-size: 26rpx;
color: #555;
margin-top: 18rpx;
}
.date-range {
font-size: 24rpx;
color: #888;
margin-top: 20rpx;
.contract-name {
font-size: 30rpx;
font-weight: 600;
color: #333;
flex: 1;
}
.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);
// ✅ 判断是否还有更多
if (rows.length < this.pageSize) {
this.loadStatus = 'nomore';
} else {
this.pageNo++;
this.loadStatus = 'more';
// 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';
// })
// 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>
<!-- 管家 -->
<view class="info-item">
<text class="info-label">管家</text>
<text class="info-value">{{ item.managerName || '未知'}}{{ item.managerPhone || '未知'}}</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>
</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';
this.loadStatus = 'loading';
// 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,25 +4,29 @@
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>
</view>
<view class="search-input" @click="search">
<text class="icon-search"></text>
<input type="text" placeholder="搜索商铺/住房/土地" />
</view>
<view class="search-bar-wrapper">
<view class="search-bar">
<view class="city-select" @click="location()">{{ city ||'宜昌市'}} <text class="icon-down"></text>
</view>
<view class="search-input" @click="search">
<text class="icon-search"></text>
<input type="text" placeholder="搜索商铺/住房/土地" />
</view>
</view>
<view class="tag-group">
</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)">
{{ 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 || [];
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
// 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();
// });
}).catch(err => {
console.log("获取资产信息失败:", err);
this.loadStatus = 'more'; // ✅ 恢复
}).finally(() => {
// 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';
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 {