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
db32b6fd
Commit
db32b6fd
authored
Aug 02, 2024
by
彭佳妮(贵阳日报)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
6a8da824
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
58 additions
and
23 deletions
+58
-23
pages.json
src/pages.json
+11
-15
shop.vue
src/pages/shop/shop.vue
+1
-1
detail.vue
src/pages/ticket/detail.vue
+45
-6
ticket.vue
src/pages/ticket/ticket.vue
+1
-1
No files found.
src/pages.json
View file @
db32b6fd
...
...
@@ -7,22 +7,22 @@
},
"pages"
:
[
//
pages
数组中第一项表示应用启动页
{
"path"
:
"pages/
index/index
"
,
"path"
:
"pages/
shop/shop
"
,
"style"
:
{
"navigationBarTitleText"
:
"小程序平台"
"navigationBarTitleText"
:
"店铺首页"
,
"onReachBottomDistance"
:
50
}
},
{
"path"
:
"pages/index/
foodClassification
"
,
"path"
:
"pages/index/
index
"
,
"style"
:
{
"navigationBarTitleText"
:
""
"navigationBarTitleText"
:
"
小程序平台
"
}
},
{
"path"
:
"pages/
shop/shop
"
,
"path"
:
"pages/
index/foodClassification
"
,
"style"
:
{
"navigationBarTitleText"
:
"店铺首页"
,
"onReachBottomDistance"
:
50
"navigationBarTitleText"
:
""
}
},
{
...
...
@@ -54,8 +54,7 @@
"style"
:
{
"navigationBarTitleText"
:
"查看券码"
}
}
,
},
{
"path"
:
"pages/ticket/ticket"
,
"style"
:
{
...
...
@@ -67,22 +66,19 @@
"style"
:
{
"navigationBarTitleText"
:
"优惠券详情"
}
}
,
},
{
"path"
:
"pages/shop/confirmOrder"
,
"style"
:
{
"navigationBarTitleText"
:
"确认订单"
}
}
,
},
{
"path"
:
"pages/shop/paymentSuccessful"
,
"style"
:
{
"navigationBarTitleText"
:
"支付成功"
}
}
,
},
{
"path"
:
"pages/order/remark"
,
"style"
:
{
...
...
src/pages/shop/shop.vue
View file @
db32b6fd
...
...
@@ -483,7 +483,7 @@ const getEvaluationPageFn = () => {
});
xma
.
showLoading
({
title
:
'加载中...'
,
mask
:
tru
e
,
mask
:
fals
e
,
});
return
getEvaluationPage
({
current
:
params
.
value
.
current
,
...
...
src/pages/ticket/detail.vue
View file @
db32b6fd
...
...
@@ -10,12 +10,19 @@
<view
class=
"left"
>
<text
class=
"title"
>
{{
shopDetail
.
shopName
}}
</text>
<view
class=
"ratebox"
>
<wd-rate
v-model=
"value"
size=
"13px"
space=
"1px"
active-color=
"#f12929"
/>
<text
class=
"rate"
>
4.9
</text>
<wd-rate
v-model=
"shopDetail.grade"
size=
"13px"
space=
"1px"
active-color=
"#f12929"
/>
<text
class=
"rate"
>
{{
shopDetail
.
grade
}}
</text>
</view>
<view
class=
"ratebox"
>
<text>
营业时间:
</text>
<text
class=
"time"
>
6:00-22:00
</text>
<text
class=
"time"
>
{{
shopDetail
.
transactionStart
}}
-
{{
shopDetail
.
transactionEnd
}}
</text>
</view>
</view>
...
...
@@ -27,14 +34,14 @@
<view
class=
"bottom"
>
<image
class=
"address"
src=
"@/static/ticket/address.png"
></image>
<view
class=
"infobox"
>
<text
class=
"addr"
>
贵阳市南明区花果园R1区1209
</text>
<text
class=
"addr"
>
{{
shopDetail
.
shopAddress
}}
</text>
<text>
距您400米
</text>
</view>
<view
class=
"iconbox"
>
<image
class=
"img"
src=
"@/static/ticket/map.png"
></image>
<text>
导航到店
</text>
</view>
<view
class=
"iconbox"
>
<view
class=
"iconbox"
@
tap=
"callShopPhone(shopDetail.phone)"
>
<image
class=
"img"
src=
"@/static/ticket/phone.png"
></image>
<text>
电话
</text>
</view>
...
...
@@ -51,10 +58,17 @@
<
script
setup
>
import
{
shopCouponList
}
from
'@/api/ticket'
;
import
{
getShopDetail
}
from
'@/api/order'
;
import
{
getDistance
}
from
'@/utils/common'
;
import
Header
from
'@/pages/order/components/Header/index.vue'
;
import
TicketList
from
'@/pages/ticket/components/TicketList/index.vue'
;
const
value
=
ref
(
4
);
onShow
(()
=>
{
// 获取位置
getLocationFn
();
});
// 当前位置的经纬度
const
currentLatitudeAndLongitude
=
ref
({
latitude
:
0
,
longitude
:
0
});
const
shopId
=
ref
(
'1626126617850544129'
);
const
getList
=
async
()
=>
{
...
...
@@ -74,6 +88,31 @@ const getShopMailDetail = async () => {
}
};
getShopMailDetail
();
/**
* 拨打商家电话
* @param {*} phoneNumber
*/
function
callShopPhone
(
phoneNumber
)
{
xma
.
makePhoneCall
({
phoneNumber
,
// 仅为示例
});
}
function
getLocationFn
()
{
xma
.
getLocation
({
type
:
'wgs84'
,
success
:
function
(
res
)
{
const
myLatitude
=
currentLatitudeAndLongitude
.
value
.
latitude
;
const
myLongitude
=
currentLatitudeAndLongitude
.
value
.
longitude
;
const
distance
=
getDistance
(
res
.
latitude
,
res
.
longitude
,
myLatitude
,
myLongitude
,
1
);
shopInfo
.
value
.
distance
=
distance
;
},
fail
:
function
(
err
)
{
return
err
;
},
});
}
</
script
>
<
style
scoped
lang=
"scss"
>
...
...
src/pages/ticket/ticket.vue
View file @
db32b6fd
...
...
@@ -67,7 +67,7 @@ const changeStatus = (index) => {
/**
* 获取用户统计列表
*/
const
discountAmount
=
ref
(
0.0
0
);
const
discountAmount
=
ref
(
0.0
);
const
getStatistics
=
async
()
=>
{
const
params
=
{
statuMain
:
currentTab
.
value
,
...
...
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