This commit is contained in:
曹辉 2023-01-13 09:08:31 +08:00
parent c76dc48cd9
commit 450b53462c
4 changed files with 83 additions and 76 deletions

View File

@ -248,6 +248,9 @@
} else if (e.length == 1) {
this.address = e[0].localName
this.query.areaCode = e[0].id
} else {
this.address = ''
this.query.areaCode = ''
}
},
//

View File

@ -177,6 +177,9 @@
} else if (e.length == 1) {
this.address = e[0].localName
this.appPersonallist.areaCode = e[0].id
}else {
this.address = ''
this.appPersonallist.areaCode = ''
}
},
//

View File

@ -181,6 +181,9 @@
} else if (e.length == 1) {
this.infolist.address = e[0].localName
this.infolist.areaCode = e[0].id
} else {
this.infolist.address = ''
this.infolist.areaCode = ''
}
}
},

View File

@ -149,64 +149,36 @@
},
onShow() {
var that = this
try {
const value = uni.getStorageSync('patientId');
if (value) {
getPatientInfo(value).then(res => {
if (res.code == 200) {
this.homeLatitudeLongitude = res.data
if (res.data.homeLatitude && res.data.homeLongitude) {
that.latitude = res.data.homeLatitude
that.longitude = res.data.homeLongitude
that.markers.push({
id: 3,
latitude: res.data.homeLatitude,
longitude: res.data.homeLongitude,
width: 20,
height: 25,
iconPath: "../../static/locatinsmall.png"
})
that.requestinfo();
} else {
that.latitude = that.latitude
that.longitude = that.longitude
that.requestinfo();
// uni.getLocation({
// type: 'wgs84',
// success: function(resp) {
// that.latitude = resp.latitude
// that.longitude = resp.longitude
// that.markers.push({
// id: 3,
// latitude: resp.latitude,
// longitude: resp.longitude,
// width: 20,
// height: 25,
// iconPath: "../../static/locatinsmall.png"
// })
// that.requestinfo();
// },
// fail(err) {
// that.mask = true;
// }
// });
}
} else if (res.code == 9999) {
const value = uni.getStorageSync('patientId');
if (value) {
getPatientInfo(value).then(res => {
if (res.code == 200) {
this.homeLatitudeLongitude = res.data
if (res.data.homeLatitude && res.data.homeLongitude) {
that.latitude = res.data.homeLatitude
that.longitude = res.data.homeLongitude
that.markers.push({
id: 3,
latitude: res.data.homeLatitude,
longitude: res.data.homeLongitude,
width: 20,
height: 25,
iconPath: "../../static/locatinsmall.png"
})
that.requestinfo();
} else {
that.latitude = that.latitude
that.longitude = that.longitude
that.requestinfo();
// that.markers.push({
// uni.getLocation({
// type: 'wgs84',
// success: function(resh) {
// that.latitude = resh.latitude
// that.longitude = resh.longitude
// success: function(resp) {
// that.latitude = resp.latitude
// that.longitude = resp.longitude
// that.markers.push({
// id: 3,
// latitude: resh.latitude,
// longitude: resh.longitude,
// latitude: resp.latitude,
// longitude: resp.longitude,
// width: 20,
// height: 25,
// iconPath: "../../static/locatinsmall.png"
@ -218,32 +190,58 @@
// }
// });
}
})
} else {
that.latitude = that.latitude
that.longitude = that.longitude
that.requestinfo();
// uni.getLocation({
// type: 'wgs84',
// success: function(res) {
// that.latitude = res.latitude
// that.longitude = res.longitude
// that.markers.push({
// id: 3,
// latitude: res.latitude,
// longitude: res.longitude,
// width: 20,
// height: 25,
// iconPath: "../../static/locatinsmall.png"
// })
// that.requestinfo();
// },
// fail(err) {
// that.mask = true;
// }
// });
}
} catch (e) {}
} else if (res.code == 9999) {
} else {
that.latitude = that.latitude
that.longitude = that.longitude
that.requestinfo();
// that.markers.push({
// uni.getLocation({
// type: 'wgs84',
// success: function(resh) {
// that.latitude = resh.latitude
// that.longitude = resh.longitude
// that.markers.push({
// id: 3,
// latitude: resh.latitude,
// longitude: resh.longitude,
// width: 20,
// height: 25,
// iconPath: "../../static/locatinsmall.png"
// })
// that.requestinfo();
// },
// fail(err) {
// that.mask = true;
// }
// });
}
})
} else {
that.latitude = that.latitude
that.longitude = that.longitude
that.requestinfo();
// uni.getLocation({
// type: 'wgs84',
// success: function(res) {
// that.latitude = res.latitude
// that.longitude = res.longitude
// that.markers.push({
// id: 3,
// latitude: res.latitude,
// longitude: res.longitude,
// width: 20,
// height: 25,
// iconPath: "../../static/locatinsmall.png"
// })
// that.requestinfo();
// },
// fail(err) {
// that.mask = true;
// }
// });
}
},
onLoad() {},
//1.