Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hls-xcmg-vue-app
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xugong
hls-xcmg-vue-app
Commits
35298caa
Commit
35298caa
authored
Feb 10, 2022
by
胡
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 接上,提交部分多余
parent
7645a3da
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
24 deletions
+24
-24
home-page.vue
src/pages/home/home-page.vue
+12
-12
location.vue
src/pages/home/location.vue
+12
-12
No files found.
src/pages/home/home-page.vue
View file @
35298caa
...
...
@@ -141,18 +141,18 @@ export default {
console
.
log
(
'&&&&&&&&&&&&___ios'
)
// if (!$config.isMobilePlatform) {
// }
//
baidumap_location.getCurrentPosition(function (result) {
//
if (window.localStorage.getItem('province')) {
//
vm.city = window.localStorage.getItem('city')
//
vm.province = window.localStorage.getItem('province')
//
vm.guessingQuery(vm.city)
//
} else {
//
vm.city = result.city
//
vm.province = result.province
//
vm.guessingQuery(result.city)
//
}
//
}, function (error) {
//
})
baidumap_location
.
getCurrentPosition
(
function
(
result
)
{
if
(
window
.
localStorage
.
getItem
(
'province'
))
{
vm
.
city
=
window
.
localStorage
.
getItem
(
'city'
)
vm
.
province
=
window
.
localStorage
.
getItem
(
'province'
)
vm
.
guessingQuery
(
vm
.
city
)
}
else
{
vm
.
city
=
result
.
city
vm
.
province
=
result
.
province
vm
.
guessingQuery
(
result
.
city
)
}
},
function
(
error
)
{
})
// setTimeout(vm.guessingQuery(), 0)
},
goFunctionHome
(
data
)
{
...
...
src/pages/home/location.vue
View file @
35298caa
...
...
@@ -111,18 +111,18 @@ export default {
// console.log(error)
// }, {enableHighAccuracy: true})
// } else { // ios使用插件定位
//
baidumap_location.getCurrentPosition(function (result) {
//
console.log('*********** ' + JSON.stringify(result))
//
window.localStorage.setItem('province', result.province)
//
window.localStorage.setItem('city', result.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('errorerrorerrorerror ' + error)
//
})
baidumap_location
.
getCurrentPosition
(
function
(
result
)
{
console
.
log
(
'*********** '
+
JSON
.
stringify
(
result
))
window
.
localStorage
.
setItem
(
'province'
,
result
.
province
)
window
.
localStorage
.
setItem
(
'city'
,
result
.
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
(
'errorerrorerrorerror '
+
error
)
})
// }
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment