thirdScriptError
plus is not defined; [Component] Event Handler Error @ pages/map/map#bound handleProxy
ReferenceError: plus is not defined
下面是代码
openMap: function (){
let url = ""
plus.nativeUI.actionSheet({title: "选择地图应用", cancel: "取消", buttons: [{title:"百度地图"}, {title:"高德地图"}, {title:"腾讯地图"}]}, function(e){
switch (e.index) {
case 1:
url = "baidumap://map/marker?location=39.968789,116.347247&title=DCloud&src=Hello%20uni-app"
break;
case 2:
url = "iosamap://viewMap?sourceApplication=Hello%20uni-app&poiname=DCloud&lat=39.9631018208&lon=116.3406135236&dev=0"
break;
}
if (url!="") {
plus.runtime.openURL( url, function( e ) {
plus.nativeUI.alert("本机未安装指定的地图应用");
});
}
})
},
<button type="primary" class="cu-btn lg bg-theme" @click="openMap">去这里</button>
1***@qq.com
uniapp官网不是说了 小程序中也能使用
2022-03-08 09:42