Commit 1881a25e authored by Jennie Shi's avatar Jennie Shi

定位提示

parent c8fe933c
Pipeline #5401 canceled with stages
......@@ -11,5 +11,5 @@ module.exports = {
ocrPath:'"http://www.xcmgfs.com:8087/r/api"',
fileUploadSvcPath:'"http://www.xcmgfs.com:8087/r/api/app/fileUploadSvc?sysName=XCMG_PROD&apiName="',
appId: '"com.xcmg.app"',
currentVersion: '"0.1.0"'
currentVersion: '"0.1.1"'
}
......@@ -11,6 +11,6 @@ module.exports = {
ocrPath:'"http://180.104.121.66:8088/r/api"',
fileUploadSvcPath:'"http://180.104.121.66:8088/r/api/app/fileUploadSvc?sysName=XCMG_UAT&apiName="',
appId: '"com.xcmg.app.dev"',
currentVersion: '"2.1.5"'
currentVersion: '"2.1.6"'
}
......@@ -100,27 +100,27 @@ export default {
// 定位
getLocation () {
let vm = this
if (vum.Platform.isAndroid()) { // 安卓采用jsapi
var geolocation = new BMap.Geolocation()
vm.hlsPopup.showLoading('数据加载中')
geolocation.getCurrentPosition(function (res) {
vm.hlsPopup.hideLoading()
if (this.getStatus() === 0) {
// 判断是否是手动选择过定位
if (window.localStorage.getItem('province')) {
vm.city = window.localStorage.getItem('city')
vm.province = window.localStorage.getItem('province')
vm.guessingQuery(vm.city)
} else {
// 没有就定位当前位置
console.log(res)
vm.city = res.address.city
vm.province = res.address.province
vm.guessingQuery(res.address.city)
}
}
}, {enableHighAccuracy: true})
} else { // ios使用插件定位
// if (vum.Platform.isAndroid()) { // 安卓采用jsapi
// var geolocation = new BMap.Geolocation()
// vm.hlsPopup.showLoading('数据加载中')
// geolocation.getCurrentPosition(function (res) {
// vm.hlsPopup.hideLoading()
// if (this.getStatus() === 0) {
// // 判断是否是手动选择过定位
// if (window.localStorage.getItem('province')) {
// vm.city = window.localStorage.getItem('city')
// vm.province = window.localStorage.getItem('province')
// vm.guessingQuery(vm.city)
// } else {
// // 没有就定位当前位置
// console.log(res)
// vm.city = res.address.city
// vm.province = res.address.province
// vm.guessingQuery(res.address.city)
// }
// }
// }, {enableHighAccuracy: true})
// } else { // ios使用插件定位
console.log('&&&&&&&&&&&&___ios')
baidumap_location.getCurrentPosition(function (result) {
if (window.localStorage.getItem('province')) {
......@@ -134,7 +134,7 @@ export default {
}
}, function (error) {
})
}
// }
// setTimeout(vm.guessingQuery(), 0)
},
goFunctionHome (data) {
......
......@@ -95,22 +95,22 @@ export default {
// 重新定位到当前位置
relocation () {
let vm = this
if (vum.Platform.isAndroid()) { // 安卓采用jsapi
var geolocation = new BMap.Geolocation()
geolocation.getCurrentPosition(function (res) {
if (this.getStatus() === 0) {
window.localStorage.setItem('province', res.address.province)
window.localStorage.setItem('city', res.address.city)
vm.places = window.localStorage.getItem('province') + '-' + window.localStorage.getItem('city')
vm.province = '请选择省'
vm.city = '请选择市'
vm.flag = false
vm.province_flag = true
}
}, function (error) {
console.log(error)
}, {enableHighAccuracy: true})
} else { // ios使用插件定位
// if (vum.Platform.isAndroid()) { // 安卓采用jsapi
// var geolocation = new BMap.Geolocation()
// geolocation.getCurrentPosition(function (res) {
// if (this.getStatus() === 0) {
// window.localStorage.setItem('province', res.address.province)
// window.localStorage.setItem('city', res.address.city)
// vm.places = window.localStorage.getItem('province') + '-' + window.localStorage.getItem('city')
// vm.province = '请选择省'
// vm.city = '请选择市'
// vm.flag = false
// vm.province_flag = true
// }
// }, function (error) {
// console.log(error)
// }, {enableHighAccuracy: true})
// } else { // ios使用插件定位
baidumap_location.getCurrentPosition(function (result) {
console.log('*********** ' + JSON.stringify(result))
window.localStorage.setItem('province', result.province)
......@@ -123,7 +123,7 @@ export default {
}, function (error) {
console.log('errorerrorerrorerror ' + error)
})
}
// }
},
// 省份查询
......
File added
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no,width=device-width,viewport-fit=cover"><meta name=format-detection content="telephone=no"><meta name=format-detection content="email=no"><meta name=apple-mobile-web-app-capable content=yes><meta name=apple-mobile-web-app-status-bar-style content=black><script type=text/javascript src=./static/vuePlatform.js></script><script type=text/javascript src=./static/prototype.js></script><script type=text/javascript src=./cordova.js></script><script type=text/javascript src="http://api.map.baidu.com/api?v=2.0&ak=Eoo0EtfjYCdAy7r8D19gZ0vMojdZpHqU"></script><title>徐工金服</title><link href=./static/css/app.4df5bfd4df456db4bc580b0772f120e7.css rel=stylesheet></head><body><div id=app-box></div><script type=text/javascript src=./static/js/manifest.6a178e8d77c32e3c385d.js></script><script type=text/javascript src=./static/js/vendor.adf9b230a1046c0fc990.js></script><script type=text/javascript src=./static/js/app.b1b90efe22b1d77d9c11.js></script></body></html>
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no,width=device-width,viewport-fit=cover"><meta name=format-detection content="telephone=no"><meta name=format-detection content="email=no"><meta name=apple-mobile-web-app-capable content=yes><meta name=apple-mobile-web-app-status-bar-style content=black><script type=text/javascript src=./static/vuePlatform.js></script><script type=text/javascript src=./static/prototype.js></script><script type=text/javascript src=./cordova.js></script><script type=text/javascript src="http://api.map.baidu.com/api?v=2.0&ak=Eoo0EtfjYCdAy7r8D19gZ0vMojdZpHqU"></script><title>徐工金服</title><link href=./static/css/app.d089c3d6affb6993374aa520f9b599cf.css rel=stylesheet></head><body><div id=app-box></div><script type=text/javascript src=./static/js/manifest.6a178e8d77c32e3c385d.js></script><script type=text/javascript src=./static/js/vendor.adf9b230a1046c0fc990.js></script><script type=text/javascript src=./static/js/app.8001ee304fb16957d18d.js></script></body></html>
\ No newline at end of file
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