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) { } else if (e.length == 1) {
this.address = e[0].localName this.address = e[0].localName
this.query.areaCode = e[0].id this.query.areaCode = e[0].id
} else {
this.address = ''
this.query.areaCode = ''
} }
}, },
// //

View File

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

View File

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

View File

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