From d66a8dfe8c17de65739b372258612c2172613652 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=B5=B5=E5=BF=A0=E6=9E=97?= <170083662@qq.com>
Date: Fri, 1 May 2026 10:55:34 +0800
Subject: [PATCH] =?UTF-8?q?feat(house):=20=E4=BC=98=E5=8C=96=E6=88=BF?=
=?UTF-8?q?=E6=BA=90=E5=8C=BA=E5=9F=9F=E9=80=89=E6=8B=A9=E5=8F=8A=E5=88=A0?=
=?UTF-8?q?=E9=99=A4=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 保存按钮布局调整优化,提升用户体验
- 房源详情地区显示只展示市级,简化展示信息
- 地区选择器调整,只显示市,确保区域数据统一
- 删除房源操作添加确认弹窗,避免误删
- 省市区数据加载逻辑简化,使用固定城区列表替代异步接口请求
- 替换首页及闪屏logo图片,更新为新资源路径
- 隐藏房源详情页电话咨询按钮,暂不支持电话功能
- 代码格式和注释优化,提升代码可读性
---
.idea/workspace.xml | 26 ++++++++++++--
.workbuddy/expert-history.json | 17 +++++++++
pages/flash/index.vue | 2 +-
pages/house/house.vue | 33 ++++++-----------
pages/index/index.vue | 2 +-
pages/login/components/main.vue | 2 +-
static/empty-02.jpg | Bin 0 -> 19405 bytes
static/empty-02.png | Bin 8448 -> 0 bytes
static/logo-chang.jpg | Bin 0 -> 19405 bytes
static/logo-chang.png | Bin 12973 -> 0 bytes
static/logo.jpg | Bin 0 -> 29721 bytes
static/logo.png | Bin 13657 -> 0 bytes
sub_pages/house/add.vue | 62 ++++++++++++++++++--------------
sub_pages/house/detail.vue | 2 +-
sub_pages/house/house.vue | 33 +++++++++++------
15 files changed, 114 insertions(+), 65 deletions(-)
create mode 100644 .workbuddy/expert-history.json
create mode 100644 static/empty-02.jpg
delete mode 100755 static/empty-02.png
create mode 100644 static/logo-chang.jpg
delete mode 100644 static/logo-chang.png
create mode 100644 static/logo.jpg
delete mode 100644 static/logo.png
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 943b85c..db9e501 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,7 +4,9 @@
-
+
+
+
@@ -73,6 +75,7 @@
+
@@ -138,12 +141,31 @@
1775224711201
-
+
+
+ 1775278015655
+
+
+
+ 1775278015655
+
+
+
+
+
diff --git a/.workbuddy/expert-history.json b/.workbuddy/expert-history.json
new file mode 100644
index 0000000..328a43d
--- /dev/null
+++ b/.workbuddy/expert-history.json
@@ -0,0 +1,17 @@
+{
+ "version": 2,
+ "sessions": {
+ "0839885c6a514b4f9b378f70d7ca86e5": [
+ {
+ "expertId": "SeniorDeveloper",
+ "name": "Will",
+ "profession": "高级开发工程师",
+ "avatarUrl": "https://acc-1258344699.cos.accelerate.myqcloud.com/workbuddy/experts/avatars/02-Engineering/SeniorDeveloper/SeniorDeveloper.png",
+ "promptUrl": "https://acc-1258344699.cos.accelerate.myqcloud.com/workbuddy/experts/experts/02-Engineering/SeniorDeveloper/SeniorDeveloper_zh.md",
+ "usedAt": 1775884910819,
+ "industryId": "all"
+ }
+ ]
+ },
+ "lastUpdated": 1775889214452
+}
\ No newline at end of file
diff --git a/pages/flash/index.vue b/pages/flash/index.vue
index 10acc33..11a11ab 100644
--- a/pages/flash/index.vue
+++ b/pages/flash/index.vue
@@ -2,7 +2,7 @@
-
+
-
+
+
@@ -318,7 +315,7 @@
status: 10,
address: ''
},
- fileList1: [],
+ fileList1: [],
fileList2: [],
loading: false,
// regionsData: [
@@ -407,18 +404,20 @@
})
},
- getHouse(id) {
- const app = this
- console.log('id: ', id);
- getHouseInfo(id).then(res => {
- console.log('res: ', res);
- app.form = res.data
- app.houseLabel = JSON.parse(app.form.houseLabel) || []
- app.fileList1 = JSON.parse(app.form.files) || []
-
-
- })
- },
+ getHouse(id) {
+ const app = this
+ console.log('id: ', id);
+ getHouseInfo(id).then(res => {
+ console.log('res: ', res);
+ app.form = res.data
+ app.houseLabel = JSON.parse(app.form.houseLabel) || []
+ app.fileList1 = JSON.parse(app.form.files) || []
+ // 回显时只显示市
+ if (app.form.city) {
+ app.form.area = app.form.city
+ }
+ })
+ },
onChangeTab(e) {
const app = this
app.tabIndex = e.value
@@ -651,7 +650,7 @@
onArea() {
this.$refs.area.open()
},
- //地址选择成功
+ //地址选择成功 - 存储省市区,但显示只显示市
chooseSuccess(e) {
console.log('chooseSuccess 收到数据:', JSON.stringify(e));
const data = e.value
@@ -664,12 +663,14 @@
// 根据选择层级保存数据
if (data.length >= 3 && data[2]) {
this.form.region = data[2].label
- this.form.area = `${data[0].label} ${data[1].label} ${data[2].label}`
+ // 显示只显示市
+ this.form.area = data[1].label
} else {
this.form.region = ''
- this.form.area = `${data[0].label} ${data[1].label}`
+ // 显示只显示市
+ this.form.area = data[1].label
}
- console.log('地区选择完成 - province:', this.form.province, 'city:', this.form.city, 'area:', this.form.area);
+ console.log('地区选择完成 - province:', this.form.province, 'city:', this.form.city, 'region:', this.form.region, 'area:', this.form.area);
},
changeHandler(e) {
console.log("e: ", e);
@@ -706,15 +707,12 @@
closeToward() {
this.showToward = false
},
-
- closeVideo(){
+ closeVideo() {
this.form.videoUrl = ''
updateHouseInfo(this.form).then(res => {
this.$toast('删除成功')
})
},
-
-
confirmRegion(e) {
this.form.region = e.value[0] + ' ' + e.value[1]
this.showRegion = false
@@ -911,6 +909,18 @@
padding: 0 20rpx;
}
+ .action-btns {
+ display: flex;
+ flex-direction: row;
+ justify-content: space-between;
+ gap: 20rpx;
+
+ .u-button {
+ flex: 1;
+ font-size: 26rpx;
+ }
+ }
+
.btn-item {
flex: 1;
font-size: 28rpx;
diff --git a/sub_pages/house/detail.vue b/sub_pages/house/detail.vue
index 936228f..2ca31de 100644
--- a/sub_pages/house/detail.vue
+++ b/sub_pages/house/detail.vue
@@ -196,7 +196,7 @@
@click="$push('sub_pages/checkout/checkout?id=' + form.houseId)">
-->
-
+
diff --git a/sub_pages/house/house.vue b/sub_pages/house/house.vue
index 535806b..0e0cb70 100644
--- a/sub_pages/house/house.vue
+++ b/sub_pages/house/house.vue
@@ -15,9 +15,9 @@
-
+
@@ -158,17 +158,28 @@
},
- onDel() {
- const app = this
- app.list.map(d => {
- if (d.selected == true) {
- HouseInfoApi.removeHouseInfo(d.houseId).then(res => {
- app.$success(res.message)
+ onDel() {
+ const app = this
+ const selectedItems = app.list.filter(d => d.selected == true)
+ if (selectedItems.length === 0) {
+ app.$error('请选择要删除的房源')
+ return
+ }
+ uni.showModal({
+ title: '删除确认',
+ content: `确定要删除选中的 ${selectedItems.length} 条房源吗?此操作不可恢复!`,
+ success: (res) => {
+ if (res.confirm) {
+ selectedItems.forEach(d => {
+ HouseInfoApi.removeHouseInfo(d.houseId).then(res => {
+ app.$success(res.message)
+ })
})
+ app.onSearch()
}
- })
- app.onSearch()
- },
+ }
+ })
+ },
onStatus(status) {
const app = this
app.list.map(d => {