Commit 35b2ad20 authored by gengchunlei's avatar gengchunlei

修改完毕一

parent cc2ea96b
......@@ -14,7 +14,6 @@
"less-loader": "^7.0.2",
"mint-ui": "^2.2.13",
"vue": "^2.6.11",
"vue-qrcode-reader": "^2.3.14",
"vue-router": "^3.2.0",
"vuex": "^3.4.0"
},
......
......@@ -3,18 +3,23 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta name = "format-detection" content = "telephone=yes">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" /> <meta name = "format-detection" content = "telephone=yes">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<link rel="stylesheet" type="text/css" href="http://at.alicdn.com/t/font_2002967_absxhdgm27r.css">
<link rel="stylesheet" href="https://a.amap.com/jsapi_demos/static/demo-center/css/demo-center.css" />
<script type="text/javascript"
src="https://webapi.amap.com/maps?v=1.4.15&key=8830df3ce60e0b6348e0854a939ffa9d"></script>
<script src="https://a.amap.com/jsapi_demos/static/demo-center/js/demoutils.js"></script>
<link rel="stylesheet" href="path/to/font-awesome/css/font-awesome.min.css">
<!-- <script src="https://cdn.bootcdn.net/ajax/libs/vConsole/3.3.4/vconsole.min.js"></script>-->
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
<body>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
<!--<script>
var vConsole =new VConsole();
console.log('Hello world');
</script>-->
</html>
......@@ -3,6 +3,19 @@ html, body ,#app{
margin: 0px;
padding: 0px;
}
body {
-webkit-overflow-scrolling: touch;
overflow-scrolling: touch;
}
Element {
-webkit-appearance: none;
-webkit-tap-highlight-color:rgba(255,255,255,0)
}
input, button {
appearance: none;
-moz-appearance: none;
-webkit-appearance: none;
}
/*去掉高德地图的logo*/
.amap-logo{
display: none!important;
......
......@@ -7,7 +7,6 @@ import ReturnVisit from '../views/returnVisit'
import ChoiceContraceptives from '../views/choiceContraceptives'
import SiteDetails from '../views/siteDetails'
import ReceiveSuccess from '../views/receiveSuccess'
import qrcodeReader from "../views/scanComponent/qrcodeReader"
Vue.use(VueRouter)
......@@ -19,7 +18,6 @@ const routes = [
{path: '/choiceContraceptives', name: 'choiceContraceptives', component: ChoiceContraceptives},
{path: '/siteDetails', name: 'siteDetails', component: SiteDetails},
{path: '/receiveSuccess', name: 'receiveSuccess', component: ReceiveSuccess},
{path:'/qrcodeReader', name: 'qrcodeReader', component: qrcodeReader},
]
......
......@@ -2,23 +2,39 @@ import AMap from 'AMap';
var mapObj;
export const location = {
initMap(id){
initMap(id='map-container'){
mapObj= new AMap.Map(id, {zoom: 13,mapStyle: "amap://styles/macaron"});
let geolocation;
mapObj.plugin(['AMap.Geolocation'], function () {
geolocation = new AMap.Geolocation({
enableHighAccuracy: true, // 是否使用高精度定位,默认:true
// timeout: 5000, // 超过10秒后停止定位,默认:无穷大
// timeout: 10000, // 超过10秒后停止定位,默认:无穷大
maximumAge: 0, // 定位结果缓存0毫秒,默认:0
convert: true, // 自动偏移坐标,偏移后的坐标为高德坐标,默认:true
showButton: false, // 显示定位按钮,默认:true
buttonPosition: 'LB', // 定位按钮停靠位置,默认:'LB',左下角
showButton: true, // 显示定位按钮,默认:true
buttonPosition: 'RT', // 定位按钮停靠位置,默认:'LB',左下角
buttonOffset: new AMap.Pixel(10, 20), // 定位按钮与设置的停靠位置的偏移量,默认:Pixel(10, 20)
showMarker: true, // 定位成功后在定位到的位置显示点标记,默认:true
showCircle: true, // 定位成功后用圆圈表示定位精度范围,默认:true
panToLocation: true, // 定位成功后将定位到的位置作为地图中心点,默认:true
zoomToAccuracy: false // 定位成功后调整地图视野范围使定位位置及精度范围视野内可见,默认:false
})
/* // 解决ios 4g 网络获取不到经纬度的问题
// ios环境切换到使用远程https定位
if (AMap.UA.ios) {
//使用远程定位,见 remogeo.js
var remoGeo = new RemoGeoLocation();
//替换方法
navigator.geolocation.getCurrentPosition = function() {
return remoGeo.getCurrentPosition.apply(remoGeo, arguments);
};
//替换方法
navigator.geolocation.watchPosition = function() {
return remoGeo.watchPosition.apply(remoGeo, arguments);
};
}
*/
mapObj.addControl(geolocation)
geolocation.getCurrentPosition();
})
......
function RemoGeoLocation() {
this._remoteSvrUrl = 'https://webapi.amap.com/html/geolocate.html';
this._callbackList = [];
this._seqBase = 1;
this._frameReady = 0;
this._watchIdMap = {};
}
RemoGeoLocation.prototype = {
_getSeq: function() {
return this._seqBase++;
},
_onRrameReady: function(callback) {
if (this._frameReady === 0) {
if (!this._frameReadyList) {
this._frameReadyList = [];
}
this._frameReadyList.push(callback);
this._prepareIframe();
return;
}
callback.call(this);
},
_prepareIframe: function() {
if (this._iframeWin) {
return;
}
var ifrm = document.createElement('iframe');
ifrm.src = this._remoteSvrUrl +
(this._remoteSvrUrl.indexOf('?') > 0 ? '&' : '?');
ifrm.width = '0px';
ifrm.height = '0px';
ifrm.style.position = 'absolute';
ifrm.style.display = 'none';
var self = this;
var timeoutId = setTimeout(function() {
self._frameReady = false;
self._callbackFrameReadyList();
}, 5000);
ifrm.onload = function() {
clearTimeout(timeoutId);
self._frameReady = true;
self._callbackFrameReadyList();
ifrm.onload = null;
};
document.body.appendChild(ifrm);
this._iframeWin = ifrm.contentWindow;
window.addEventListener('message', function(e) {
if (self._remoteSvrUrl.indexOf(e['origin']) !== 0) {
return;
}
self._handleRemoteMsg(e['data']);
}, false);
},
_callbackFrameReadyList: function() {
if (this._frameReadyList) {
var list = this._frameReadyList;
this._frameReadyList = null;
for (var i = 0, len = list.length; i < len; i++) {
list[i].call(this, this._frameReady);
}
}
},
_pickCallback: function(seqNum, keepInList) {
var callbackList = this._callbackList;
for (var i = 0, len = callbackList.length; i < len; i++) {
var cbkInfo = callbackList[i];
if (seqNum === cbkInfo.seq) {
if (!keepInList) {
callbackList.splice(i, 1);
}
return cbkInfo;
}
}
},
_handleRemoteMsg: function(msg) {
var seqNum = msg['seq'];
var cbkInfo = this._pickCallback(seqNum, !!msg['notify']);
if (cbkInfo) {
cbkInfo.cbk.call(null, msg['error'], msg['result']);
} else {
console.warn('Receive remote msg: ', msg);
}
},
_postMessage: function(cmd, args, callback, seq) {
this._prepareIframe();
var msg = {
'cmd': cmd,
'args': args,
'seq': seq || this._getSeq()
};
this._callbackList.push({
cbk: callback,
seq: msg['seq']
});
this._onRrameReady(function() {
if (this._frameReady === true) {
try {
this._iframeWin.postMessage(msg, '*');
} catch (e) {
this._pickCallback(msg['seq']);
callback(e);
}
} else {
this._pickCallback(msg['seq']);
callback({
'message': 'iFrame load failed!'
});
}
});
},
'getCurrentPosition': function(succHandler, errHandler, options) {
this._postMessage('getCurrentPosition', [options], function(err, result) {
if (err) {
if (errHandler) {
errHandler(err);
}
return;
}
if (succHandler) {
succHandler(result);
}
});
},
'watchPosition': function(succHandler, errHandler, options) {
var watchKey = 'wk' + this._getSeq(),
cmdSeq = this._getSeq();
this._watchIdMap[watchKey] = {
stat: 0,
seq: cmdSeq
};
var self = this;
this._postMessage('watchPosition', [options], function(err, result) {
var id = null;
if (result) {
id = result['id'];
}
var watchInfo = self._watchIdMap[watchKey];
watchInfo.id = id;
watchInfo.stat = 1;
if (watchInfo.callbackList) {
var list = watchInfo.callbackList;
watchInfo.callbackList = null;
for (var i = 0, len = list.length; i < len; i++) {
list[i].call(self, id);
}
}
if (err) {
if (errHandler) {
errHandler(err);
}
return;
}
if (succHandler) {
succHandler(result['pos']);
}
}, cmdSeq);
return watchKey;
},
'clearWatch': function(watchKey, callback) {
if (!this._watchIdMap[watchKey]) {
callback('Id not exists: ' + watchKey);
return;
}
var watchInfo = this._watchIdMap[watchKey];
var self = this;
function clearId(id) {
self._postMessage('clearWatch', [id], function(err, result) {
if (!err) {
self._pickCallback(watchInfo.seq);
delete self._watchIdMap[watchKey];
}
if (callback) {
callback(err, result);
}
});
}
if (watchInfo.stat < 1) {
if (!watchInfo.callbackList) {
watchInfo.callbackList = [];
}
watchInfo.callbackList.push(function(id) {
clearId(id);
});
} else {
clearId(watchInfo.id);
}
}
};
......@@ -34,14 +34,15 @@
<script>
import AMap from 'AMap';
import {location} from "../utils/mapUtils";
// import {location} from "../utils/mapUtils";
import machinesImg from '../assets/img/machines.png';
import closeImg from '../assets/img/close.png';
import presonImg from '../assets/img/preson.png';
import sharpImg from '../assets/img/sharp.png';
import {getNetworkInfo, getUserReceiveNum} from '../utils/api';
import {callMobile, getQueryVariable} from "../utils/common";
import { MessageBox } from 'mint-ui';
import {MessageBox} from 'mint-ui';
export default {
name: "myMap",
data() {
......@@ -50,7 +51,8 @@
jumpHref: {},
lngLat: [],
showMap: false,
machines: []
machines: [],
locationInfo: undefined
}
},
created() {
......@@ -67,15 +69,15 @@
methods: {
// 接收url后的数据
urltext() {
let mobileToken = getQueryVariable('token')
let userId = getQueryVariable('userId')
let mobilePhone= getQueryVariable('mobile')
let mobileTokenIno = {
token: mobileToken,
userId: userId,
phone: mobilePhone
}
window.sessionStorage.setItem('mobileTokenIno', JSON.stringify(mobileTokenIno))
let mobileToken = getQueryVariable('token')
let userId = getQueryVariable('userId')
let mobilePhone = getQueryVariable('mobile')
let mobileTokenIno = {
token: mobileToken,
userId: userId,
phone: mobilePhone
}
window.sessionStorage.setItem('mobileTokenIno', JSON.stringify(mobileTokenIno))
},
ScanCode() {
let info = JSON.parse(window.sessionStorage.getItem('mobileTokenIno'))
......@@ -83,18 +85,21 @@
let par = {telephone: phone, residentId: userId}//居民id
getUserReceiveNum(par).then(({data}) => {
if (data.data == true) {//true 该用户非首次领取需要填写随访
this.$router.push( `/returnVisit`);
this.$router.push(`/returnVisit`);
} else {
callMobile("qrcode", {});
}
})
},
subscanQRCallBack(result){
this.$router.push({path: `/choiceContraceptives`,query:{info:result}});
subscanQRCallBack(result) {
this.$router.push({path: `/choiceContraceptives`, query: {info: result}});
},
toCollectRecords() {
/* this.$router.push({path: `/siteDetails`,query:{info:JSON.stringify({"id": 1,
/* this.$router.push({
path: `/siteDetails`, query: {
info: JSON.stringify({
"id": 1,
"createUnitId": 16625,
"netName": "网点1",
"netType": 1,
......@@ -111,7 +116,10 @@
"statusName": "启用",
"created": "2020-11-02 11:48:15",
"updated": "2020-11-02 17:05:14",
})}});*/
'nowLocal': this.lngLat
})
}
});*/
// this.$router.push({path: `/choiceContraceptives`,query:{info:1986}});
this.$router.push('/collectRecords');
},
......@@ -120,69 +128,71 @@
},
createMap() {
let self = this
let geolocation = location.initMap("map-container"); //定位
AMap.event.addListener(geolocation, 'complete', onComplete)
AMap.event.addListener(geolocation, 'error', onError)
function onComplete(data) {
// data是具体的定位信息
console.log('定位成功信息:', data)
self.creatNetwork(data, 1)
}
function onError(data) { //非安全域禁止定位(localhost不限制) 改为https即可
// 定位出错
console.log('定位失败错误:', data)
self.getLngLatLocation()
}
// let geolocation = location.initMap("map-container"); //定位
let mapObj;
let geolocation;
mapObj = new AMap.Map('map-container', {zoom: 13, mapStyle: "amap://styles/macaron"});
mapObj.plugin('AMap.Geolocation', function () {
geolocation = new AMap.Geolocation({
enableHighAccuracy: true,//是否使用高精度定位,默认:true
timeout: 10000, //超过10秒后停止定位,默认:无穷大
maximumAge: 0, //定位结果缓存0毫秒,默认:0
convert: true, //自动偏移坐标,偏移后的坐标为高德坐标,默认:true
showButton: true, //显示定位按钮,默认:true
buttonPosition: 'RT', //定位按钮停靠位置,默认:'LB',左下角
buttonOffset: new AMap.Pixel(10, 20),//定位按钮与设置的停靠位置的偏移量,默认:Pixel(10, 20)
showMarker: true, //定位成功后在定位到的位置显示点标记,默认:true
showCircle: true, //定位成功后用圆圈表示定位精度范围,默认:true
panToLocation: true, //定位成功后将定位到的位置作为地图中心点,默认:true
zoomToAccuracy: false //定位成功后调整地图视野范围使定位位置及精度范围视野内可见,默认:false
});
/* // 解决ios 4g 网络获取不到经纬度的问题
// ios环境切换到使用远程https定位
if (AMap.UA.ios) {
//使用远程定位,见 remogeo.js
var remoGeo = new RemoGeoLocation();
//替换方法
navigator.geolocation.getCurrentPosition = function() {
return remoGeo.getCurrentPosition.apply(remoGeo, arguments);
};
//替换方法
navigator.geolocation.watchPosition = function() {
return remoGeo.watchPosition.apply(remoGeo, arguments);
};
}
*/
mapObj.addControl(geolocation);
geolocation.getCurrentPosition();
AMap.event.addListener(geolocation, 'complete', onComplete)
AMap.event.addListener(geolocation, 'error', onError)
self.locationInfo = mapObj
function onComplete(data) {
// data是具体的定位信息
console.log('定位成功信息:', data)
self.creatNetwork(data)
}
},
getLngLatLocation() {
let self = this
AMap.plugin('AMap.CitySearch', function () {
var citySearch = new AMap.CitySearch()
citySearch.getLocalCity(function (status, result) {
if (status === 'complete' && result.info === 'OK') {
// 查询成功,result即为当前所在城市信息
console.log('通过ip获取当前城市:',result)
//逆向地理编码
AMap.plugin('AMap.Geocoder', function() {
var geocoder = new AMap.Geocoder({
// city 指定进行编码查询的城市,支持传入城市名、adcode 和 citycode
city: result.adcode
})
var lnglat = result.rectangle.split(';')[0].split(',')
self.creatNetwork(lnglat, 2)
/* geocoder.getAddress(lnglat, function(status, data) {
if (status === 'complete' && data.info === 'OK') {
// result为对应的地理位置详细信息
console.log(data)
}
})*/
})
}
})
function onError(data) { //非安全域禁止定位(localhost不限制) 改为https即可
// 定位出错
console.log('定位失败错误:', data)
}
})
},
creatNetwork(result, flag) {
creatNetwork(result) {
let par = {}
if (flag == 1) {
this.lngLat = [result.position.lng, result.position.lat];
par = {latitude:result.position.lat,longitude:result.position.lng}
} else {
this.lngLat = [...result];
par = {latitude:result[1],longitude:result[0]}
}
getNetworkInfo(par).then(res=>{
if(res.data.code==='SUCCESS'){
this.machines=res.data.data;
par = {latitude: result.position.lat, longitude: result.position.lng}
getNetworkInfo(par).then(res => {
if (res.data.code === 'SUCCESS') {
this.machines = res.data.data;
this.createSign();
}
})
},
createSign() {
// 创建一个机器Icon
let map = location.gatMap();
let map = this.locationInfo;
var machinesIcon = new AMap.Icon({
size: new AMap.Size(25, 50),
image: machinesImg,
......@@ -198,25 +208,26 @@
});
let markers = [];
this.machines.forEach(x => {
if(x.netType==2){
if (x.netType == 2) {
let marker = new AMap.Marker({
map: map,
icon: personIcon,
position: [x.netLongitude,x.netLatitude]
position: [x.netLongitude, x.netLatitude]
});
this.createInfoWindow(map, marker, x);
markers.push(marker);
}else {
} else {
let marker = new AMap.Marker({
map: map,
icon: machinesIcon,
position: [x.netLongitude,x.netLatitude]
position: [x.netLongitude, x.netLatitude]
});
this.createInfoWindow(map, marker, x);
markers.push(marker);
}
});
},
}
,
/*为标记绑定弹窗事件*/
createInfoWindow(map, marker, info) {
var infoWindow = new AMap.InfoWindow({ //创建信息窗体
......@@ -229,7 +240,8 @@
//e.target就是被点击的Marker
}
marker.on('click', onMarkerClick);//绑定click事件
},
}
,
/*弹窗样式*/
windowStyle(marker, info) {
let _that = this;
......@@ -279,49 +291,27 @@
bottom.appendChild(sharp);
content.appendChild(bottom);
return content;
},
}
,
/*关闭弹窗*/
closeInfoWindow() {
let map = location.gatMap();
let map = this.locationInfo;
map.clearInfoWindow();
},
}
,
navigation(info) {
var u = navigator.userAgent;
var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1; //android终端或者uc浏览器
var isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
if (isAndroid) {
//这个是安卓操作系统
// window.location.href="androidamap://viewMap?sourceApplication=appname&poiname="+info.netName+"&lat="+info.netLatitude+"&lon="+info.netLongitude+"&dev=0";
window.location.href = `https://uri.amap.com/navigation?to=${info.netLongitude},${info.netLatitude},${info.netAddress}&callnative=1&mode=car&policy=1&src=mypage&coordinate=gaode&callnative=1`
//判断是否切出浏览器
/* setTimeout(function(){
let hidden = window.document.hidden || window.document.mozHidden || window.document.msHidden ||window.document.webkitHidden
MessageBox('TE', hidden )
if(typeof hidden =="undefined" || hidden ==false){
//应用宝下载地址
MessageBox('提示', '请下载高德地图进行导航')
}
}, 5000);*/
}
if (isIOS) {
//这个是ios操作系统
window.location.href = `https://uri.amap.com/navigation?to=${info.netLongitude},${info.netLatitude},${info.netAddress}&callnative=1&mode=car&policy=1&src=mypage&coordinate=gaode&callnative=1`
// window.location.href="iosamap://viewMap?sourceApplication=appname&poiname="+info.netName+"&lat="+info.netLatitude+"&lon="+info.netLongitude+"&dev=0"
//判断是否切出浏览器
/* setTimeout(function(){
let hidden = window.document.hidden || window.document.mozHidden || window.document.msHidden ||window.document.webkitHidden
if(typeof hidden =="undefined" || hidden ==false){
//应用宝下载地址
MessageBox('提示', '请下载高德地图进行导航')
}
}, 5000);*/
}
/*this.$router.push({path: '/navigation', query: {Lng: Lng, Lat: Lat}})*/
},
/* if (this.lngLat.length > 0) {
window.location.href = `https://uri.amap.com/navigation?from=${this.lngLat[0]},${this.lngLat[1]},我的位置&to=${info.netLongitude},${info.netLatitude},${info.netAddress}&mode=car&policy=1&src=mypage&coordinate=gaode&callnative=0`
} else {*/
window.location.href = `https://uri.amap.com/navigation?to=${info.netLongitude},${info.netLatitude},${info.netAddress}&mode=car&policy=1&src=mypage&coordinate=gaode&callnative=0`
/* }*/
}
,
jumpInfo(info) {
this.$router.push({path: `/siteDetails`,query:{info:JSON.stringify(info)}});
},
info['nowLocal'] = this.lngLat
this.$router.push({path: `/siteDetails`, query: {info: JSON.stringify(info)}});
}
,
},
}
</script>
......
<!--
* @Description: In User Settings Edit
* @Author: your name
* @Date: 2019-08-18 10:13:28
* @LastEditTime: 2019-08-18 15:24:32
* @LastEditors: Please set LastEditors
-->
<template>
<div>
<p class="error">{{ error }}</p>
<p class="decode-result">
Last result:
<b>{{ result }}</b>
</p>
<QrcodeStream @decode="onDecode" @init="onInit" :camera="camera"/>
</div>
</template>
<script>
import { QrcodeStream } from "vue-qrcode-reader";
export default {
components: { QrcodeStream },
data() {
return {
result: "",
camera: 'auto',
error: ""
};
},
methods: {
onDecode(result) {
this.result = result;
},
async onInit(promise) {
try {
await promise;
} catch (error) {
if (error.name === "NotAllowedError") {
this.error = "ERROR: you need to grant camera access permisson";
} else if (error.name === "NotFoundError") {
this.error = "ERROR: no camera on this device";
} else if (error.name === "NotSupportedError") {
this.error = "ERROR: secure context required (HTTPS, localhost)";
} else if (error.name === "NotReadableError") {
this.error = "ERROR: is the camera already in use?";
} else if (error.name === "OverconstrainedError") {
this.error = "ERROR: installed cameras are not suitable";
} else if (error.name === "StreamApiNotSupportedError") {
this.error = "ERROR: Stream API is not supported in this browser";
}
}
}
}
};
</script>
<style scoped>
.error {
font-weight: bold;
color: red;
}
</style>
......@@ -11,12 +11,12 @@
style="margin-left: 20px;font-size: 15px">类型:{{siteDetail.netTypeName}}</label></div>
<div class="ui-flex justify-center center" style="line-height: 29px">地址:
<label @click="clickAddress" class="btn">{{siteDetail.netAddress}}</label>
<div class="cell"><img src="../assets/img/phone.png"/></div>
<div class="cell" ><img src="../assets/img/mark.png" style="width: 16px;height: 16px"/></div>
</div>
<div class="ui-flex justify-center center">联系电话:
<label @click="clickPhone" class="btn"><a
:href="`tel:${siteDetail.netPhone}`">{{siteDetail.netPhone}}</a></label>
<div class="cell"><img src="../assets/img/phone.png"/></div>
<label @click="clickPhone" class="btn">
<a :href="`tel:${siteDetail.netPhone}`">{{siteDetail.netPhone}}</a></label>
<div class="cell" ><img src="../assets/img/phone.png"/></div>
</div>
</div>
<div style="padding:0 20px;font-size: 15px">该网点当前可领取的药具</div>
......@@ -62,7 +62,7 @@
import {getStockInfo} from "../utils/api";
import NoData from "./component/noData";
import {Indicator} from 'mint-ui';
import { MessageBox } from 'mint-ui';
import {MessageBox} from 'mint-ui';
export default {
name: "siteDetails",
......@@ -120,39 +120,48 @@
},
clickAddress() {
let info = this.siteDetail
var u = navigator.userAgent;
var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1; //android终端或者uc浏览器
var isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
if (isAndroid) {
// window.location.href=`https://uri.amap.com/marker?position=${info.netLongitude}, ${info.netLatitude}&name=${info.netAddress}`;
window.location.href = `https://uri.amap.com/navigation?to=${info.netLongitude},${info.netLatitude},${info.netAddress}&callnative=1&mode=car&policy=1&src=mypage&coordinate=gaode&callnative=0`
//这个是安卓操作系统
// window.location.href="androidamap://viewMap?sourceApplication=amap&poiname="+info.netName+"&lat="+info.netLatitude+"&lon="+info.netLongitude+"&dev=0";
//判断是否切出浏览器
/* setTimeout(function(){
// const {nowLocal = []} = info
/* if (nowLocal.length > 0) {
window.location.href = `https://uri.amap.com/navigation?from=${nowLocal[0]},${nowLocal[1]},我的位置&to=${info.netLongitude},${info.netLatitude},${info.netAddress}&mode=car&policy=1&src=mypage&coordinate=gaode&callnative=0`
} else {*/
window.location.href = `https://uri.amap.com/navigation?to=${info.netLongitude},${info.netLatitude},${info.netAddress}&mode=car&policy=1&src=mypage&coordinate=gaode&callnative=0`
/*}*/
// window.location.href = `https://uri.amap.com/navigation?to=${info.netLongitude},${info.netLatitude},${info.netAddress}&callnative=1&mode=car&policy=1&src=mypage&coordinate=gaode&callnative=0`
// window.location.href=`https://uri.amap.com/marker?position=${info.netLongitude}, ${info.netLatitude}&name=${info.netAddress}`
// window.location.href = `http://api.map.baidu.com/marker?location=${info.netLatitude}, ${info.netLongitude}&title=终点'&content=${info.netAddress}&output=html&src=webapp.baidu.openAPIdemo`
/* var u = navigator.userAgent;
var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1; //android终端或者uc浏览器
var isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
if (isAndroid) {
// window.location.href=`https://uri.amap.com/marker?position=${info.netLongitude}, ${info.netLatitude}&name=${info.netAddress}`;
window.location.href = `https://uri.amap.com/navigation?to=${info.netLongitude},${info.netLatitude},${info.netAddress}&callnative=1&mode=car&policy=1&src=mypage&coordinate=gaode&callnative=1`
//这个是安卓操作系统
// window.location.href="androidamap://viewMap?sourceApplication=amap&poiname="+info.netName+"&lat="+info.netLatitude+"&lon="+info.netLongitude+"&dev=0";
//判断是否切出浏览器
setTimeout(function(){
let hidden = window.document.hidden || window.document.mozHidden || window.document.msHidden ||window.document.webkitHidden
if(typeof hidden =="undefined" || hidden ==false){
//应用宝下载地址
MessageBox('提示', '请下载高德地图进行导航')
}
}, 2500);*/
}
if (isIOS) {
// window.location.href=`https://uri.amap.com/marker?position=${info.netLongitude}, ${info.netLatitude}&name=${info.netAddress}`;
window.location.href = `https://uri.amap.com/navigation?to=${info.netLongitude},${info.netLatitude},${info.netAddress}&callnative=1&mode=car&policy=1&src=mypage&coordinate=gaode&callnative=0`
}, 2500);
}
if (isIOS) {
// window.location.href=`https://uri.amap.com/marker?position=${info.netLongitude}, ${info.netLatitude}&name=${info.netAddress}`;
window.location.href = `https://uri.amap.com/navigation?to=${info.netLongitude},${info.netLatitude},${info.netAddress}&callnative=1&mode=car&policy=1&src=mypage&coordinate=gaode&callnative=1`
//这个是ios操作系统
// window.location.href="iosamap://viewMap?sourceApplication=amap&poiname="+info.netName+"&lat="+info.netLatitude+"&lon="+info.netLongitude+"&dev=0"
//判断是否切出浏览器
/*setTimeout(function(){
let hidden = window.document.hidden || window.document.mozHidden || window.document.msHidden ||window.document.webkitHidden
if(typeof hidden =="undefined" || hidden ==false){
//应用宝下载地址
MessageBox('提示', '请下载高德地图进行导航')
}
}, 2500);*/
}
/* this.$router.push({path: '/navigation', query: {Lng: Lng, Lat: Lat}})*/
//这个是ios操作系统
// window.location.href="iosamap://viewMap?sourceApplication=amap&poiname="+info.netName+"&lat="+info.netLatitude+"&lon="+info.netLongitude+"&dev=0"
//判断是否切出浏览器
setTimeout(function(){
let hidden = window.document.hidden || window.document.mozHidden || window.document.msHidden ||window.document.webkitHidden
if(typeof hidden =="undefined" || hidden ==false){
//应用宝下载地址
MessageBox('提示', '请下载高德地图进行导航')
}
}, 2500);
}*/
/* this.$router.push({path: '/navigation', query: {Lng: Lng, Lat: Lat}})*/
},
clickPhone() {
console.log(456);
......
......@@ -2249,11 +2249,6 @@ caller-path@^2.0.0:
dependencies:
caller-callsite "^2.0.0"
callforth@^0.3.1:
version "0.3.1"
resolved "https://registry.npm.taobao.org/callforth/download/callforth-0.3.1.tgz#d40f610c7dd47d0011fd84bac32b3fe11cff1785"
integrity sha1-1A9hDH3UfQAR/YS6wys/4Rz/F4U=
callsites@^2.0.0:
version "2.0.0"
resolved "https://registry.npm.taobao.org/callsites/download/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50"
......@@ -7338,13 +7333,6 @@ ripemd160@^2.0.0, ripemd160@^2.0.1:
hash-base "^3.0.0"
inherits "^2.0.1"
rtcpeerconnection-shim@^1.2.15:
version "1.2.15"
resolved "https://registry.npm.taobao.org/rtcpeerconnection-shim/download/rtcpeerconnection-shim-1.2.15.tgz#e7cc189a81b435324c4949aa3dfb51888684b243"
integrity sha1-58wYmoG0NTJMSUmqPftRiIaEskM=
dependencies:
sdp "^2.6.0"
run-async@^2.4.0:
version "2.4.1"
resolved "https://registry.npm.taobao.org/run-async/download/run-async-2.4.1.tgz?cache=0&sync_timestamp=1587965791385&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Frun-async%2Fdownload%2Frun-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455"
......@@ -7447,11 +7435,6 @@ scss-tokenizer@^0.2.3:
js-base64 "^2.1.8"
source-map "^0.4.2"
sdp@^2.12.0, sdp@^2.6.0:
version "2.12.0"
resolved "https://registry.npm.taobao.org/sdp/download/sdp-2.12.0.tgz#338a106af7560c86e4523f858349680350d53b22"
integrity sha1-M4oQavdWDIbkUj+Fg0loA1DVOyI=
select-hose@^2.0.0:
version "2.0.0"
resolved "https://registry.npm.taobao.org/select-hose/download/select-hose-2.0.0.tgz#625d8658f865af43ec962bfc376a37359a4994ca"
......@@ -8629,16 +8612,6 @@ vue-loader@^15.9.2:
vue-hot-reload-api "^2.3.0"
vue-style-loader "^4.1.0"
vue-qrcode-reader@^2.3.14:
version "2.3.14"
resolved "https://registry.npm.taobao.org/vue-qrcode-reader/download/vue-qrcode-reader-2.3.14.tgz#d2b105570ebad91f6d631e82a78dd715c15fdf4a"
integrity sha1-0rEFVw662R9tYx6Cp43XFcFf30o=
dependencies:
callforth "^0.3.1"
core-js "^3.6.5"
vue "^2.6.11"
webrtc-adapter "7.7.0"
vue-router@^3.2.0:
version "3.4.7"
resolved "https://registry.npm.taobao.org/vue-router/download/vue-router-3.4.7.tgz?cache=0&sync_timestamp=1602838656586&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvue-router%2Fdownload%2Fvue-router-3.4.7.tgz#bf189bafd16f4e4ef783c4a6250a3090f2c1fa1b"
......@@ -8836,14 +8809,6 @@ webpack@^4.0.0:
watchpack "^1.7.4"
webpack-sources "^1.4.1"
webrtc-adapter@7.7.0:
version "7.7.0"
resolved "https://registry.npm.taobao.org/webrtc-adapter/download/webrtc-adapter-7.7.0.tgz#e56ff25f925177ac553a7c49323ca4108d2b5f4d"
integrity sha1-5W/yX5JRd6xVOnxJMjykEI0rX00=
dependencies:
rtcpeerconnection-shim "^1.2.15"
sdp "^2.12.0"
websocket-driver@0.6.5:
version "0.6.5"
resolved "https://registry.npm.taobao.org/websocket-driver/download/websocket-driver-0.6.5.tgz#5cb2556ceb85f4373c6d8238aa691c8454e13a36"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment