Browse Source

图片回显 接口增加图片入参 所有状态完好才允许提交房源

wyx
mk 3 months ago
parent
commit
b901ad2026
  1. 47
      pagesA/release/detail/detail.vue
  2. 2
      pagesA/release/list/list.vue

47
pagesA/release/detail/detail.vue

@ -1,7 +1,7 @@
<template>
<view class="checkout-detail-bg">
<!-- 房间图片 -->
<image class="room-img" :src="roomDetail.roomImg" mode="aspectFill"></image>
<image class="room-img" :src="userInfo.houseTypeCoverImg" mode="aspectFill"></image>
<!-- 基本信息卡片 -->
<view class="info-card">
<view class="info-header">
@ -283,29 +283,29 @@ export default {
return;
}
// if (!this.roomDetail.facilitiesCheckResults || this.roomDetail.facilitiesCheckResults.length === 0) {
// uni.showToast({ title: "", icon: "none" });
// return;
// }
//
// const unfinishedDevices = this.roomDetail.facilitiesCheckResults.filter(item =>
// item.checkResult === undefined || item.checkResult === null
// );
// if (unfinishedDevices.length > 0) {
// uni.showToast({ title: "", icon: "none" });
// return;
// }
// if (!this.value || this.value.trim() === '') {
// uni.showToast({ title: "", icon: "none" });
// return;
// }
// if (!this.fileList || this.fileList.length === 0) {
// uni.showToast({ title: "", icon: "none" });
// return;
// }
if (!this.roomDetail.facilitiesCheckResults || this.roomDetail.facilitiesCheckResults.length === 0) {
uni.showToast({ title: "请完成设备检查", icon: "none" });
return;
}
//
const unfinishedDevices = this.roomDetail.facilitiesCheckResults.filter(item =>
item.checkResult === undefined || item.checkResult === null
);
if (unfinishedDevices.length > 0) {
uni.showToast({ title: "请完成所有设备检查", icon: "none" });
return;
}
// 0
const nonIntactDevices = this.roomDetail.facilitiesCheckResults.filter(item =>
item.checkResult !== 0
);
if (nonIntactDevices.length > 0) {
uni.showToast({ title: "所有设备必须都是完好状态才能提交", icon: "none" });
return;
}
let parm = {
roomId: this.roomId,
@ -313,6 +313,7 @@ export default {
cleaned: this.cleaned,
facilitiesCheckDesc: this.value,
facilitiesCheckImages: this.fileList,
imageList:this.fileList
};
const res = await releaseRoom(parm);

2
pagesA/release/list/list.vue

@ -10,7 +10,7 @@
>
<u-list-item v-for="item in list" :key="item.id">
<view class="checkout-card" @click="goDetail(item)">
<image :src="item.img" class="room-img" mode="aspectFill"></image>
<image :src="item.houseTypeCoverImg" class="room-img" mode="aspectFill"></image>
<view class="room-info">
<view class="room-title">{{ item.roomNamePath }}</view>
<view class="room-user">

Loading…
Cancel
Save