|
@@ -6,8 +6,7 @@ import del from '@/assets/icons/landlord/delete.png'
|
6
|
6
|
import addImg from '@/assets/icons/landlord/add.png'
|
7
|
7
|
import copyRoomImg from '@/assets/icons/landlord/copyroom.png'
|
8
|
8
|
import React, { useState, useEffect, useRef, useImperativeHandle, useMemo } from 'react'
|
9
|
|
-import { getRoomList,getRoomDetail, saveRoom, deleteRoom, saveExtend,copyRoom } from '@/services/landlord'
|
10
|
|
-import { getExtendContent } from "@/services/home";
|
|
9
|
+import { getRoomList,deleteRoom,copyRoom } from '@/services/landlord'
|
11
|
10
|
import Spin3 from '@/components/Spin/Spin3';
|
12
|
11
|
import cutoverUser from '@/assets/icons/UserCenter/cutoverUser.png'
|
13
|
12
|
import ToggleRole from '@/components/toggleRole/ToggleRole'
|
|
@@ -81,7 +80,6 @@ export default React.forwardRef((props, ref) => {
|
81
|
80
|
useEffect(() => {
|
82
|
81
|
//首次加载页面时
|
83
|
82
|
if (!mounted.current && hotel.hotelId) {
|
84
|
|
-
|
85
|
83
|
getRoomList({ hotelId: hotel.hotelId }).then((res) => {
|
86
|
84
|
setDetail(res.records || [])
|
87
|
85
|
mounted.current = true
|
|
@@ -138,7 +136,7 @@ export default React.forwardRef((props, ref) => {
|
138
|
136
|
}
|
139
|
137
|
//本店指南
|
140
|
138
|
const [loading, setLoading] = useState(false)
|
141
|
|
- const handelCopy = (e, val) => {
|
|
139
|
+ const handelCopy = (e, val) => {
|
142
|
140
|
//阻止冒泡不允许执行父元素的点击事件
|
143
|
141
|
e.stopPropagation()
|
144
|
142
|
setLoading(true)
|
|
@@ -149,14 +147,13 @@ export default React.forwardRef((props, ref) => {
|
149
|
147
|
}
|
150
|
148
|
})
|
151
|
149
|
copyRoom(val.roomId).then((res) => {
|
152
|
|
- setLoading(false)
|
153
|
|
- Taro.showToast({
|
154
|
|
- title: '复制房源成功',
|
155
|
|
- icon: 'none',
|
156
|
|
- })
|
157
|
|
- setDetail([...detail.slice(0, copy), res, ...detail.slice(copy)])
|
|
150
|
+ setLoading(false)
|
|
151
|
+ Taro.showToast({
|
|
152
|
+ title: '复制房源成功',
|
|
153
|
+ icon: 'none',
|
158
|
154
|
})
|
159
|
|
-
|
|
155
|
+ setDetail([...detail.slice(0, copy), res, ...detail.slice(copy)])
|
|
156
|
+ })
|
160
|
157
|
}
|
161
|
158
|
const [showCutover3, setShowCutover3] = useState(false)
|
162
|
159
|
const ShowMoldeOn3 = () => {
|