Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
groupPurchase-miniapp
Project
Project
Details
Activity
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
彭佳妮(贵阳日报)
groupPurchase-miniapp
Commits
0bdd8888
Commit
0bdd8888
authored
Aug 02, 2024
by
彭佳妮(贵阳日报)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
db32b6fd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
10 deletions
+21
-10
detail.vue
src/pages/ticket/detail.vue
+21
-10
No files found.
src/pages/ticket/detail.vue
View file @
0bdd8888
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<view
class=
"content"
>
<view
class=
"content"
>
<view
class=
"shop"
>
<view
class=
"shop"
>
<image
src=
"@/static/ticket/logo.png
"
class=
"logo"
mode=
"aspectFill"
></image>
<image
:src=
"fileDomain + shopDetail.shopLogo
"
class=
"logo"
mode=
"aspectFill"
></image>
<view
class=
"info"
>
<view
class=
"info"
>
<view
class=
"top"
>
<view
class=
"top"
>
<view
class=
"left"
>
<view
class=
"left"
>
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
</view>
</view>
</view>
</view>
<view
class=
"btn"
>
<view
class=
"btn"
@
tap=
"toShop"
>
<image
src=
"@/static/ticket/shopmail.png"
></image>
<image
src=
"@/static/ticket/shopmail.png"
></image>
<text>
进店
</text>
<text>
进店
</text>
</view>
</view>
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
<image
class=
"address"
src=
"@/static/ticket/address.png"
></image>
<image
class=
"address"
src=
"@/static/ticket/address.png"
></image>
<view
class=
"infobox"
>
<view
class=
"infobox"
>
<text
class=
"addr"
>
{{
shopDetail
.
shopAddress
}}
</text>
<text
class=
"addr"
>
{{
shopDetail
.
shopAddress
}}
</text>
<text>
距您
400米
</text>
<text>
距您
{{
shopDetail
.
distance
}}
</text>
</view>
</view>
<view
class=
"iconbox"
>
<view
class=
"iconbox"
>
<image
class=
"img"
src=
"@/static/ticket/map.png"
></image>
<image
class=
"img"
src=
"@/static/ticket/map.png"
></image>
...
@@ -62,13 +62,16 @@ import { getDistance } from '@/utils/common';
...
@@ -62,13 +62,16 @@ import { getDistance } from '@/utils/common';
import
Header
from
'@/pages/order/components/Header/index.vue'
;
import
Header
from
'@/pages/order/components/Header/index.vue'
;
import
TicketList
from
'@/pages/ticket/components/TicketList/index.vue'
;
import
TicketList
from
'@/pages/ticket/components/TicketList/index.vue'
;
const
fileDomain
=
import
.
meta
.
env
.
VITE_APP_IMG_URL
;
onShow
(()
=>
{
onShow
(()
=>
{
// 获取位置
// 获取位置
getLocationFn
();
getLocationFn
();
});
});
// 当前位置的经纬度
onLoad
(()
=>
{
const
currentLatitudeAndLongitude
=
ref
({
latitude
:
0
,
longitude
:
0
});
})
const
shopId
=
ref
(
'1626126617850544129'
);
const
shopId
=
ref
(
'1626126617850544129'
);
const
getList
=
async
()
=>
{
const
getList
=
async
()
=>
{
...
@@ -80,7 +83,9 @@ getList();
...
@@ -80,7 +83,9 @@ getList();
/**
/**
* 获取商铺信息
* 获取商铺信息
*/
*/
const
shopDetail
=
ref
();
const
shopDetail
=
ref
({
shopName
:
'店铺详情'
,
});
const
getShopMailDetail
=
async
()
=>
{
const
getShopMailDetail
=
async
()
=>
{
const
res
=
await
getShopDetail
({
shopId
:
shopId
.
value
});
const
res
=
await
getShopDetail
({
shopId
:
shopId
.
value
});
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
...
@@ -93,7 +98,7 @@ getShopMailDetail();
...
@@ -93,7 +98,7 @@ getShopMailDetail();
* 拨打商家电话
* 拨打商家电话
* @param {*} phoneNumber
* @param {*} phoneNumber
*/
*/
function
callShopPhone
(
phoneNumber
)
{
function
callShopPhone
(
phoneNumber
)
{
xma
.
makePhoneCall
({
xma
.
makePhoneCall
({
phoneNumber
,
// 仅为示例
phoneNumber
,
// 仅为示例
});
});
...
@@ -103,16 +108,22 @@ function getLocationFn() {
...
@@ -103,16 +108,22 @@ function getLocationFn() {
xma
.
getLocation
({
xma
.
getLocation
({
type
:
'wgs84'
,
type
:
'wgs84'
,
success
:
function
(
res
)
{
success
:
function
(
res
)
{
const
myLatitude
=
currentLatitudeAndLongitude
.
value
.
latitude
;
const
myLatitude
=
shopDetail
.
value
.
shopLat
;
const
myLongitude
=
currentLatitudeAndLongitude
.
value
.
longitude
;
const
myLongitude
=
shopDetail
.
value
.
shopLng
;
const
distance
=
getDistance
(
res
.
latitude
,
res
.
longitude
,
myLatitude
,
myLongitude
,
1
);
const
distance
=
getDistance
(
res
.
latitude
,
res
.
longitude
,
myLatitude
,
myLongitude
,
1
);
shop
Info
.
value
.
distance
=
distance
;
shop
Detail
.
value
.
distance
=
distance
;
},
},
fail
:
function
(
err
)
{
fail
:
function
(
err
)
{
return
err
;
return
err
;
},
},
});
});
}
}
const
toShop
=
()
=>
{
xma
.
navigateTo
({
url
:
`/pages/shop/shop?shopId=
${
shopId
.
value
}
`
,
});
};
</
script
>
</
script
>
<
style
scoped
lang=
"scss"
>
<
style
scoped
lang=
"scss"
>
...
...
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