张延森 4 年之前
父節點
當前提交
5b6bf8855d

+ 1
- 1
src/pages/customer/index.js 查看文件

67
       })
67
       })
68
     }
68
     }
69
 
69
 
70
-    request({url:'/taHouseSurround', params:{houseId:houseId}}).then((res)=>{
70
+    request({url:'/taHouseSurround', params:{houseId:houseId, pageSize: 500}}).then((res)=>{
71
         const { records } = res.data.data  
71
         const { records } = res.data.data  
72
         setSurroundList(records)
72
         setSurroundList(records)
73
     })
73
     })

+ 12
- 8
src/pages/house/household/index.jsx 查看文件

41
 
41
 
42
   const onCopy = value => {
42
   const onCopy = value => {
43
     wx.setClipboardData({
43
     wx.setClipboardData({
44
-      data: value.name + " " + value.phone,
44
+      data: value,
45
       success(res) {}
45
       success(res) {}
46
     });
46
     });
47
   };
47
   };
58
               <ContainerLayout className="household-view-card">
58
               <ContainerLayout className="household-view-card">
59
                 {list[item].map(x => {
59
                 {list[item].map(x => {
60
                   return (
60
                   return (
61
-                    <view onClick={() => onCopy(x)}>
62
-                      <Text>
63
-                        {x.name}: {x.phone}   
64
-                      </Text>
65
-                      <Image className="household-view-card-icon" src={copy}></Image>
66
-                    </view>
61
+                    <View className="card-person">
62
+                      <View style="flex: none" onClick={() => onCopy(x.name)}>
63
+                        {x.name}
64
+                        <Image className="household-view-card-icon" src={copy}></Image>
65
+                      </View>
66
+                      <View style="flex: none; margin-left: 16px" onClick={() => onCopy(x.phone)}>
67
+                        {x.phone} 
68
+                        <Image className="household-view-card-icon" src={copy}></Image>
69
+                      </View>
70
+                    </View>
67
                   );
71
                   );
68
                 })}
72
                 })}
69
-                <view>{`入住时间:${getDate(list[item][0].createDate)}`}</view>
73
+                <View style="margin-top: 1em">{`入住时间:${getDate(list[item][0].createDate)}`}</View>
70
                 {list[item].length == 0 && "暂无入住人信息"}
74
                 {list[item].length == 0 && "暂无入住人信息"}
71
               </ContainerLayout>
75
               </ContainerLayout>
72
             </View>
76
             </View>

+ 18
- 8
src/pages/house/household/index.scss 查看文件

24
       margin-top: 26.67px;
24
       margin-top: 26.67px;
25
       position: relative;
25
       position: relative;
26
       // min-height: 150px;
26
       // min-height: 150px;
27
-line-height: 45px;
28
- text-align: center;
29
-background-color:#274291;
27
+      line-height: 45px;
28
+      text-align: center;
29
+      background-color:#274291;
30
 
30
 
31
-&-icon{
32
-  width: 30px;
33
-  height: 30px;
34
-  margin-left: 20px;
35
-}
31
+      &-icon{
32
+        width: 30px;
33
+        height: 30px;
34
+        margin-left: 20px;
35
+      }
36
+
37
+      .card-person {
38
+        display: flex;
39
+        text-align: center;
40
+        justify-content: center;
41
+
42
+        & + .card-person {
43
+          margin-top: 1em;
44
+        }
45
+      }
36
     }
46
     }
37
   }
47
   }
38
 }
48
 }

+ 1
- 1
src/pages/house/index.jsx 查看文件

44
     })
44
     })
45
 
45
 
46
     const getImageList=()=>{
46
     const getImageList=()=>{
47
-        request({url:'/taHouseSurround',params:{houseId:houseId}}).then((res)=>{
47
+        request({url:'/taHouseSurround',params:{houseId:houseId, pageSize: 500}}).then((res)=>{
48
             const {records,...page} =res.data.data  
48
             const {records,...page} =res.data.data  
49
             setImgSource(records)
49
             setImgSource(records)
50
         })
50
         })

+ 4
- 1
src/util/request.js 查看文件

124
 function paramsToString(params) {
124
 function paramsToString(params) {
125
   return Object.keys(params).map((key) => {
125
   return Object.keys(params).map((key) => {
126
     const val = params[key]
126
     const val = params[key]
127
+    if (val === undefined || val === null) {
128
+      return `${key}=`
129
+    }
130
+
127
     return Array.isArray(val) ? val.map((x) => {
131
     return Array.isArray(val) ? val.map((x) => {
128
       return composeKeyValue(key, x)
132
       return composeKeyValue(key, x)
129
     }).join('&') : composeKeyValue(key, val)
133
     }).join('&') : composeKeyValue(key, val)
132
 }
136
 }
133
 
137
 
134
 function composeKeyValue(k, v, encode) {
138
 function composeKeyValue(k, v, encode) {
135
-
136
   return encode === false ? `${k}=${v}` : `${encodeURIComponent(k)}=${encodeURIComponent(v)}`
139
   return encode === false ? `${k}=${v}` : `${encodeURIComponent(k)}=${encodeURIComponent(v)}`
137
 }
140
 }