feat(house): 优化房源区域选择及删除功能
- 保存按钮布局调整优化,提升用户体验 - 房源详情地区显示只展示市级,简化展示信息 - 地区选择器调整,只显示市,确保区域数据统一 - 删除房源操作添加确认弹窗,避免误删 - 省市区数据加载逻辑简化,使用固定城区列表替代异步接口请求 - 替换首页及闪屏logo图片,更新为新资源路径 - 隐藏房源详情页电话咨询按钮,暂不支持电话功能 - 代码格式和注释优化,提升代码可读性
This commit is contained in:
@@ -15,9 +15,9 @@
|
||||
<view class="btn">
|
||||
<u-button text="下架" plain size="small" @click="onStatus(10)"></u-button>
|
||||
</view>
|
||||
<!-- <view class="btn">
|
||||
<view class="btn">
|
||||
<u-button text="删除" plain size="small" @click="onDel()"></u-button>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="btn">
|
||||
<u-button text="编辑" plain size="small" @click="onEdit()"></u-button>
|
||||
</view>
|
||||
@@ -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 => {
|
||||
|
||||
Reference in New Issue
Block a user