230320a303 11 months ago
parent
commit
b98304c2d5
3 changed files with 37 additions and 0 deletions
  1. 3 0
      src/api/room.js
  2. 25 0
      src/pagesMore/center/uploadRoom2.jsx
  3. 9 0
      src/pagesMore/center/uploadRoom2.scss

+ 3 - 0
src/api/room.js

@@ -87,6 +87,9 @@ export default {
   apieshouserecordremind: params => { // 二手房 房源 房源跟进 提醒
     return request('/api/eshouse/record/remind', params, 'loading')
   },
+  apieshousecheck: params => { // 二手房 房源 检测唯一
+    return request('/api/eshouse/check', params, 'loading')
+  },
   apirenthouselist: params => { // 二手房 出租 列表
     return request('/api/rent/house/list', params, 'loading')
   },

+ 25 - 0
src/pagesMore/center/uploadRoom2.jsx

@@ -440,6 +440,30 @@ class Index extends Component {
       </View>
     )
   }
+  renderCheckOnly () {
+    const { formObj, addr1, addr2, addr3 } = this.state
+    return (
+      <View className="scoped-checkout-only" onClick={() => {
+        if (!formObj.estate_id) {
+          Taro.$msg('请选择楼盘')
+          return
+        }
+        let house_no = ''
+        if (addr1 && addr2 && addr3) {
+          house_no = `${addr1}-${addr2}-${addr3}`
+        } else {
+          Taro.$msg('请输入楼栋单号房间号')
+          return
+        }
+        Taro.api.room.apieshousecheck({
+          estate_id: formObj.estate_id,
+          house_no,
+        }).then(res => {
+          Taro.$msg(res.errmsg)
+        })
+      }}>检测房源唯一</View>
+    )
+  }
   renderHouseType () {
     const { hType1, hType2, hType3 } = this.state
     return (
@@ -668,6 +692,7 @@ class Index extends Component {
             keyStr="地址(必填)"
           />
           {this.renderAddr()}
+          {this.renderCheckOnly()}
         </View>
         <View className="l-floor-pos2">
           <LFormGroup

+ 9 - 0
src/pagesMore/center/uploadRoom2.scss

@@ -154,4 +154,13 @@
   font-size: 22rpx;
   color: #369af7;
   font-weight: bold;
+}
+
+.scoped-checkout-only {
+  position: absolute;
+  bottom: 0;
+  left: 0;
+  color: #f00;
+  font-weight: bold;
+  font-size: 24rpx;
 }