张延森 4 years ago
parent
commit
f9666ea2ff
1 changed files with 23 additions and 7 deletions
  1. 23
    7
      src/pages/guide/index.jsx

+ 23
- 7
src/pages/guide/index.jsx View File

@@ -193,17 +193,33 @@ const guide = props => {
193 193
                 <Text className="guide-view-info">wifi信息</Text>
194 194
                 <ContainerLayout
195 195
                   className="guide-view-layout guide-view-wifi"
196
+                  style={{ display: "flex", justifyContent: "space-between" }}
196 197
                   onClick={() => onToMap("wifi")}
197 198
                 >
198 199
                   <View>
199
-                    <Text>名称:</Text>
200
-                    <Text>{detail.wifiName}</Text>
201
-                  </View>
202
-                  <View onClick={() => handleCopy(detail.wifiPassword)}>
203
-                    <Text>密码:</Text>
204
-                    <Text style="display: inline-block; margin-right: 6px">{detail.wifiPassword}</Text>
205
-                    <mp-icon icon="copy" size={12}></mp-icon>
200
+                    <View>
201
+                      <Text>名称:</Text>
202
+                      <Text>{detail.wifiName}</Text>
203
+                    </View>
204
+                    <View>
205
+                      <Text>密码:</Text>
206
+                      <Text style="display: inline-block; margin-right: 6px">{detail.wifiPassword}</Text>
207
+                    </View>
206 208
                   </View>
209
+                  {user.role == userRloe.customer && (
210
+                    <View
211
+                      style={{
212
+                        float: "right",
213
+                        display: "flex",
214
+                        justifyContent: "center",
215
+                        flexDirection: "column"
216
+                      }}
217
+                      onClick={() => handleCopy(detail.wifiPassword)}
218
+                    >
219
+                      <mp-icon icon="copy" size={24} color="#FED12F" type="field"></mp-icon>
220
+                      <View className="icontext">复制</View>
221
+                    </View>
222
+                  )}
207 223
                 </ContainerLayout>
208 224
               </View>
209 225
             )