|
@@ -9,6 +9,7 @@ import { getExtendContent } from "@/services/home";
|
9
|
9
|
//export default是导出模块的 export也是导出模块的 如果引用时不加{}就是引用默认模块加了就是引用相应的模块
|
10
|
10
|
import { uploadFile } from '@/utils/request'
|
11
|
11
|
import Popup from '@/components/Popup'
|
|
12
|
+import chooselError from '@/utils/chooselError';
|
12
|
13
|
import Extend from "../../components/Extend";
|
13
|
14
|
import './addRoom.less'
|
14
|
15
|
|
|
@@ -32,9 +33,16 @@ export default withLayout((props) => {
|
32
|
33
|
const [wifiName, setwifiName] = useState()
|
33
|
34
|
|
34
|
35
|
const onRoomMap = () => {
|
35
|
|
- Taro.chooseLocation().then((res) => {
|
36
|
|
- setRoomModel({ ...roomModel, location: res.longitude + ',' + res.latitude, locName: res.name, address: res.address })
|
37
|
|
- })
|
|
36
|
+ Taro.chooseLocation()
|
|
37
|
+ .then((res) => {
|
|
38
|
+ setRoomModel({ ...roomModel, location: res.longitude + ',' + res.latitude, locName: res.name, address: res.address })
|
|
39
|
+ })
|
|
40
|
+ .catch(e => {
|
|
41
|
+ console.log("🚀 ~ file: addRoom.jsx ~ line 41 ~ onRoomMap ~ e", e)
|
|
42
|
+ chooselError('提示', '获取当前位置需要授权,是否跳转到设置界面?')
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+ })
|
38
|
46
|
}
|
39
|
47
|
|
40
|
48
|
const onParkMap = () => {
|