|
@@ -13,11 +13,13 @@ import './roomOrder.less'
|
13
|
13
|
export default withLayout((props) => {
|
14
|
14
|
const { roomId, roomName } = props.router.params
|
15
|
15
|
const [detail, setDetail] = useState([])
|
|
16
|
+
|
16
|
17
|
useEffect(() => {
|
17
|
18
|
getRoomOrderList({ roomId: roomId }).then((res) => {
|
18
|
19
|
setDetail(res.records || [])
|
19
|
20
|
})
|
20
|
21
|
}, [])
|
|
22
|
+
|
21
|
23
|
const CopyName = (val) => {
|
22
|
24
|
Taro.setClipboardData({
|
23
|
25
|
data: val,
|
|
@@ -30,6 +32,7 @@ export default withLayout((props) => {
|
30
|
32
|
}
|
31
|
33
|
})
|
32
|
34
|
}
|
|
35
|
+
|
33
|
36
|
const CopyPhone = (val) => {
|
34
|
37
|
Taro.setClipboardData({
|
35
|
38
|
data: val,
|
|
@@ -42,20 +45,21 @@ export default withLayout((props) => {
|
42
|
45
|
}
|
43
|
46
|
})
|
44
|
47
|
}
|
|
48
|
+
|
45
|
49
|
return (
|
46
|
50
|
<View style={{ padding: '0 30px' }}>
|
47
|
51
|
<view className="index-navbar">
|
48
|
|
- <CustomNav title={roomName ? roomName : '房间名'} />
|
|
52
|
+ <CustomNav title={roomName ? decodeURIComponent(roomName) : '房间名'} />
|
49
|
53
|
</view>
|
50
|
54
|
<scroll-view scrollY style={{ height: 'calc(100vh - 65px)' }}>
|
51
|
55
|
|
52
|
56
|
{
|
53
|
57
|
detail.length == 0 ? <View className='houseCard'>暂无入住人数据</View>
|
54
|
|
- : detail.map((item) =>
|
55
|
|
- <View className='houseCard'>
|
|
58
|
+ : detail.map((item, index) =>
|
|
59
|
+ <View className='houseCard' key={index}>
|
56
|
60
|
{
|
57
|
|
- (item.personList || []).map((item2) =>
|
58
|
|
- <View className='operation'>
|
|
61
|
+ (item.personList || []).map((item2, inx) =>
|
|
62
|
+ <View className='operation' key={inx}>
|
59
|
63
|
<View style={{ display: 'inline-block' }} onClick={() => CopyName(item2.customerName)}>
|
60
|
64
|
<Label>{item2.customerName}</Label>
|
61
|
65
|
<Image src={copy} />
|