Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
U
uni-pdtravel
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
panyongping
uni-pdtravel
Commits
01d56b68
Commit
01d56b68
authored
Aug 30, 2024
by
潘永坪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
组合票定位取消
parent
31d096d6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
31 deletions
+43
-31
distributionCombiChoose.vue
...ation/distributionCombiChoose/distributionCombiChoose.vue
+43
-31
No files found.
pages/combination/distributionCombiChoose/distributionCombiChoose.vue
View file @
01d56b68
...
@@ -344,37 +344,49 @@ export default {
...
@@ -344,37 +344,49 @@ export default {
let
newTimestamp
=
uni
.
getStorageSync
(
'newTimestamp'
)
||
''
let
newTimestamp
=
uni
.
getStorageSync
(
'newTimestamp'
)
||
''
let
token
=
uni
.
getStorageSync
(
'token'
)
let
token
=
uni
.
getStorageSync
(
'token'
)
if
(
token
)
{
if
(
token
)
{
uni
.
getLocation
({
let
latitude
=
''
success
:
res
=>
{
let
longitude
=
''
let
latitude
=
res
.
latitude
//纬度
//判断时间戳,之前请求失败,必须大于缓存时间戳才进行请求
let
longitude
=
res
.
longitude
//经度
if
(
newTimestamp
){
this
.
showDistance
=
true
if
(
Date
.
now
()
>
newTimestamp
){
//判断时间戳,之前请求失败,必须大于缓存时间戳才进行请求
this
.
initList
(
latitude
,
longitude
)
if
(
newTimestamp
){
}
else
{
if
(
Date
.
now
()
>
newTimestamp
){
this
.
showTip
=
true
this
.
initList
(
latitude
,
longitude
)
}
}
else
{
}
else
{
this
.
showTip
=
true
this
.
initList
(
latitude
,
longitude
)
}
}
}
else
{
// uni.getLocation({//定位暂时注释
this
.
initList
(
latitude
,
longitude
)
// success: res => {
}
// let latitude = res.latitude //纬度
},
// let longitude = res.longitude //经度
fail
:
res
=>
{
// this.showDistance = true
let
latitude
=
''
// //判断时间戳,之前请求失败,必须大于缓存时间戳才进行请求
let
longitude
=
''
// if(newTimestamp){
//判断时间戳,之前请求失败,必须大于缓存时间戳才进行请求
// if(Date.now()>newTimestamp){
if
(
newTimestamp
){
// this.initList(latitude, longitude)
if
(
Date
.
now
()
>
newTimestamp
){
// }else{
this
.
initList
(
latitude
,
longitude
)
// this.showTip=true
}
else
{
// }
this
.
showTip
=
true
// }else{
}
// this.initList(latitude, longitude)
}
else
{
// }
this
.
initList
(
latitude
,
longitude
)
// },
}
// fail: res => {
}
// let latitude = ''
})
// let longitude = ''
// //判断时间戳,之前请求失败,必须大于缓存时间戳才进行请求
// if(newTimestamp){
// if(Date.now()>newTimestamp){
// this.initList(latitude, longitude)
// }else{
// this.showTip=true
// }
// }else{
// this.initList(latitude, longitude)
// }
// }
// })
}
}
},
},
methods
:
{
methods
:
{
...
...
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