Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
self-support
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
李俊赕
self-support
Commits
93fb9aea
Commit
93fb9aea
authored
May 08, 2021
by
刘用法
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
定位权限问题
parent
a44c4882
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
4 deletions
+56
-4
order.vue
src/pages/index/order.vue
+20
-2
detail.vue
src/pages/order/detail.vue
+36
-2
No files found.
src/pages/index/order.vue
View file @
93fb9aea
...
...
@@ -170,8 +170,26 @@
dataValue
.
push
(
res
.
latitude
)
self
.
dataValue
=
dataValue
},
fail
(
err
)
{
complete
:
function
(
res
)
{
if
(
res
.
errMsg
.
indexOf
(
'auth'
)
!=
-
1
)
{
uni
.
showModal
({
title
:
'提示'
,
content
:
'获取权限失败,请到设置页面开启权限'
,
confirmText
:
'好的'
,
success
(
res
)
{
if
(
res
.
confirm
)
{
uni
.
openSetting
({
success
(
res
)
{
console
.
log
(
res
.
authSetting
)
}
});
}
}
})
}
},
fail
:
function
(
err
)
{
}
});
},
...
...
src/pages/order/detail.vue
View file @
93fb9aea
...
...
@@ -34,7 +34,7 @@
<u-icon
name=
"map"
size=
"28"
></u-icon>
<text
class=
"address-txt"
>
{{
order
.
contactAddress
}}
</text>
</view>
<u-image
width=
"48rpx"
height=
"48rpx"
:src=
"navigationIcon"
@
click=
"openLocation"
></u-image>
<u-image
width=
"48rpx"
height=
"48rpx"
:src=
"navigationIcon"
@
click=
"openLocation
(order.contactAddress)
"
></u-image>
</view>
<!--
<u-read-more
ref=
"uReadMore"
:show-height=
"40"
:shadowStyle=
"
{paddingTop: '0rpx',marginTop: '0rpx'}" close-text="查看更多" open-text="点击收起" toggle color="#2272FF" font-size="26"> -->
<view
v-if=
"readMore"
@
click=
"readMore = false"
class=
"read-more-toggle"
>
...
...
@@ -268,7 +268,7 @@
}
},
methods
:
{
openLocation
(){
openLocation
(
address
){
if
(
this
.
isAllowDianhuaAndDaohang
){
uni
.
getLocation
({
type
:
'gcj02'
,
//返回可以用于uni.openLocation的经纬度
...
...
@@ -281,7 +281,38 @@
success
:
function
()
{
console
.
log
(
'success'
);
}
});
},
complete
:
function
(
res
)
{
console
.
log
(
'-------complete-----'
,
res
)
if
(
res
.
errMsg
.
indexOf
(
'auth'
)
!=
-
1
)
{
uni
.
showModal
({
title
:
'提示'
,
content
:
'获取权限失败,请到设置页面开启权限'
,
confirmText
:
'好的'
,
success
(
res
)
{
if
(
res
.
confirm
)
{
uni
.
openSetting
({
success
(
res
)
{
console
.
log
(
res
.
authSetting
)
}
});
}
}
})
}
else
{
uni
.
setClipboardData
({
data
:
address
,
success
:
function
()
{
console
.
log
(
'success'
);
},
complete
:
function
(
res
)
{
console
.
log
(
res
)
}
});
}
}
});
}
...
...
@@ -789,6 +820,9 @@
line-height
:
24rpx
;
margin-top
:
20rpx
;
margin-bottom
:
40rpx
;
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
.left
{
.address-txt
{
margin-left
:
8rpx
;
...
...
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