定位
This commit is contained in:
parent
9829e24529
commit
a8ca5bd533
@ -140,10 +140,10 @@
|
|||||||
},
|
},
|
||||||
//失败
|
//失败
|
||||||
fail: (res) => {
|
fail: (res) => {
|
||||||
uni.showToast({
|
// uni.showToast({
|
||||||
icon: 'none',
|
// icon: 'none',
|
||||||
title: '获取地址失败,请打开定位',
|
// title: '获取地址失败,请打开定位',
|
||||||
})
|
// })
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@ -98,8 +98,10 @@
|
|||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
total: 0,
|
total: 0,
|
||||||
latitude: 39.90374,
|
// latitude: 39.90374,
|
||||||
longitude: 116.397827,
|
// longitude: 116.397827,
|
||||||
|
latitude:'',
|
||||||
|
longitude:'',
|
||||||
nurseClassId: '', //护理站分类id
|
nurseClassId: '', //护理站分类id
|
||||||
itemClassId: '', //护理项目分类id
|
itemClassId: '', //护理项目分类id
|
||||||
searchName: '', //通用名称
|
searchName: '', //通用名称
|
||||||
@ -190,6 +192,7 @@
|
|||||||
success: function(res) {
|
success: function(res) {
|
||||||
that.latitude = res.latitude
|
that.latitude = res.latitude
|
||||||
that.longitude = res.longitude
|
that.longitude = res.longitude
|
||||||
|
|
||||||
that.mask = false
|
that.mask = false
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -278,23 +281,27 @@
|
|||||||
const value = uni.getStorageSync('patientId');
|
const value = uni.getStorageSync('patientId');
|
||||||
if (value) {
|
if (value) {
|
||||||
getPatientInfo(value).then(res => {
|
getPatientInfo(value).then(res => {
|
||||||
|
console.log(res)
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
if (res.data.homeLatitude && res.data.homeLongitude) {
|
if (res.data.homeLatitude && res.data.homeLongitude) {
|
||||||
that.latitude = res.data.homeLatitude
|
that.latitude = res.data.homeLatitude
|
||||||
that.longitude = res.data.homeLongitude
|
that.longitude = res.data.homeLongitude
|
||||||
|
|
||||||
that.requestinfo();
|
that.requestinfo();
|
||||||
} else {
|
} else {
|
||||||
uni.getLocation({
|
that.requestinfo();
|
||||||
type: 'wgs84',
|
// uni.getLocation({
|
||||||
success: function(resp) {
|
// type: 'wgs84',
|
||||||
that.latitude = resp.latitude
|
// success: function(resp) {
|
||||||
that.longitude = resp.longitude
|
// that.latitude = resp.latitude
|
||||||
that.requestinfo();
|
// that.longitude = resp.longitude
|
||||||
},
|
// console.log(that.latitude,that.longitude)
|
||||||
fail(err) {
|
// that.requestinfo();
|
||||||
that.mask = true;
|
// },
|
||||||
}
|
// fail(err) {
|
||||||
});
|
// that.mask = true;
|
||||||
|
// }
|
||||||
|
// });
|
||||||
}
|
}
|
||||||
} else if (res.code == 9999) {} else {
|
} else if (res.code == 9999) {} else {
|
||||||
that.requestinfo();
|
that.requestinfo();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user