This commit is contained in:
wpf 2024-03-15 14:46:33 +08:00
parent dcee6e6e15
commit 797ad790d4

View File

@ -17,20 +17,6 @@ export const initEvent = () => {
console.log('获取定位');
let res = await uniMPgetLocation();
console.log(res);
// plus.geolocation.getCurrentPosition(function(position) {
// console.log('经度:' + position.coords.longitude);
// console.log('纬度:' + position.coords.latitude);
// // that.markers[1].latitude = position.coords.longitude;
// // that.markers[1].longitude = position.coords.longitude;
// mp.sendUniMPEvent(
// ret.fromAppid,
// 'getLocation', {...position.coords},
// (ret) => {
// console.log('Host sendEvent: ' + JSON.stringify(ret));
// });
// }, function(error) {
// console.error('获取位置失败:', error.message);
// }, {provider:'gps'});
mp.sendUniMPEvent(
ret.fromAppid,
'getLocation', {...res},
@ -51,8 +37,6 @@ export const initEvent = () => {
});
}
if (ret.event == 'log') {
// console.log('2222222')
console.log('收到小程序事件: ' + JSON.stringify(ret));
}