更新
This commit is contained in:
parent
dcee6e6e15
commit
797ad790d4
@ -17,20 +17,6 @@ export const initEvent = () => {
|
|||||||
console.log('获取定位');
|
console.log('获取定位');
|
||||||
let res = await uniMPgetLocation();
|
let res = await uniMPgetLocation();
|
||||||
console.log(res);
|
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(
|
mp.sendUniMPEvent(
|
||||||
ret.fromAppid,
|
ret.fromAppid,
|
||||||
'getLocation', {...res},
|
'getLocation', {...res},
|
||||||
@ -51,8 +37,6 @@ export const initEvent = () => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (ret.event == 'log') {
|
if (ret.event == 'log') {
|
||||||
// console.log('2222222')
|
|
||||||
|
|
||||||
console.log('收到小程序事件: ' + JSON.stringify(ret));
|
console.log('收到小程序事件: ' + JSON.stringify(ret));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user