提交 c205ad0e 编写于 作者: 张敬贤's avatar 张敬贤

新增百度,腾讯地图uri

上级 934b727e
......@@ -139,7 +139,6 @@
import {getDetailByYunOrderNo} from '@/api/appoint';
import { mapActions, mapGetters } from 'vuex';
import store from 'storejs';
import { log } from 'console';
export default {
data() {
return {
......@@ -151,7 +150,7 @@ export default {
style: 'backgroundColor:#ffffff;zIndex:100;',
background: '',
},
actions: [{ name: '高德地图', value:1 }, { name: '腾讯地图', value:1 }, { name: '百度地图', value:1}],
actions: [{ name: '高德地图', value:1 }, { name: '腾讯地图', value:2 }, { name: '百度地图', value:3}],
detailInfo: {},
showSsheet:false,
yunOrderNo: '',
......@@ -199,16 +198,32 @@ export default {
const hospitalName = '上海市浦东新区兰花路333';
let url = '';
const latitude = '121.287689';
const longitude = '31.234527';
if (geolocation && geolocation.lat && geolocation.lng) {
// https://uri.amap.com/navigation
} else {
console.log(item);
const latitude = '121.287689';
const longitude = '31.234527';
url = 'https://uri.amap.com/marker?&name=' + hospitalName + '&position=' + latitude + ',' + longitude + '&callnative=1';
// url = 'https://uri.amap.com/marker?&name=' + hospitalName + '&position=' + latitude + ',' + longitude + '&callnative=1';
switch (item.value) {
case 1:
url = 'https://uri.amap.com/marker?&name=' + hospitalName + '&position=' + latitude + ',' + longitude + '&callnative=1';
break;
case 2:
url = 'https://apis.map.qq.com/uri/v1/geocoder?coord=' + latitude + ',' + longitude + '&referer=PICA';
break;
case 3:
url = 'http://api.map.baidu.com/marker?location=' + latitude + ',' + longitude + '&title=' + hospitalName + '&output=html&src=webapp.baidu.openAPIdemo';
break;
default:
url = 'https://uri.amap.com/marker?&name=' + hospitalName + '&position=' + latitude + ',' + longitude + '&callnative=1';
break;
}
}
console.log('geolocation', url);
window.open(url);
// window.open(url);
},
bindingCode() {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册