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
5b3a4de8
Commit
5b3a4de8
authored
May 11, 2024
by
qipeng
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of
http://192.168.0.204/panyongping/uni-pdtravel
into develop
parents
79d2e9c5
8a3c7f66
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
508 additions
and
279 deletions
+508
-279
buyKnow.vue
components/buyKnow.vue
+2
-2
manifest.json
manifest.json
+2
-1
combiChoose.vue
pages/combination/combiChoose/combiChoose.vue
+3
-3
center.vue
pages/indexs/center/center.vue
+17
-0
combinationProduct.vue
pages/scenic/combinationProduct/combinationProduct.vue
+1
-1
scenicCombiOrder.vue
pages/scenic/scenicCombiOrder/scenicCombiOrder.vue
+5
-5
scenicProduct-new.vue
pages/scenic/scenicProduct/scenicProduct-new.vue
+0
-222
scenicProduct-old.vue
pages/scenic/scenicProduct/scenicProduct-old.vue
+60
-0
scenicProduct.vue
pages/scenic/scenicProduct/scenicProduct.vue
+413
-40
scenicSingleOrder.vue
pages/scenic/scenicSingleOrder/scenicSingleOrder.vue
+5
-5
No files found.
components/buyKnow.vue
View file @
5b3a4de8
...
@@ -39,8 +39,8 @@
...
@@ -39,8 +39,8 @@
<!--
<view
class=
"middle-list"
style=
"border-bottom: none;"
v-if=
"buyKnowData.merchantId!='z0015605022691a5945bbe463141668c'"
>
-->
<!--
<view
class=
"middle-list"
style=
"border-bottom: none;"
v-if=
"buyKnowData.merchantId!='z0015605022691a5945bbe463141668c'"
>
-->
<view
class=
"middle-list"
style=
"border-bottom: none;"
>
<view
class=
"middle-list"
style=
"border-bottom: none;"
>
<view
class=
"middle-title"
>
<view
class=
"middle-title"
>
<text
v-if=
"buyKnowData.backChangeRule == 0"
>
不可退
换
</text>
<text
v-if=
"buyKnowData.backChangeRule == 0"
>
不可退
</text>
<text
v-if=
"buyKnowData.backChangeRule == 1"
>
条件退
</text>
<text
v-if=
"buyKnowData.backChangeRule == 1"
>
有
条件退
</text>
<text
v-if=
"buyKnowData.backChangeRule == 2"
>
随时可退
</text>
<text
v-if=
"buyKnowData.backChangeRule == 2"
>
随时可退
</text>
</view>
</view>
<view
v-if=
"buyKnowData.productRefundRuleVo&&buyKnowData.productRefundRuleVo.refundType== 1"
>
<view
v-if=
"buyKnowData.productRefundRuleVo&&buyKnowData.productRefundRuleVo.refundType== 1"
>
...
...
manifest.json
View file @
5b3a4de8
...
@@ -74,7 +74,8 @@
...
@@ -74,7 +74,8 @@
"uniStatistics"
:
{
"uniStatistics"
:
{
"enable"
:
false
"enable"
:
false
},
},
"requiredPrivateInfos"
:
[
"getLocation"
]
"requiredPrivateInfos"
:
[
"getLocation"
],
"embeddedAppIdList"
:
[
"wx882fabc8844b5363"
,
"wx888e5ed62eb274db"
]
//第一个途比达,第二个长江索道
},
},
"mp-alipay"
:
{
"mp-alipay"
:
{
"usingComponents"
:
true
,
"usingComponents"
:
true
,
...
...
pages/combination/combiChoose/combiChoose.vue
View file @
5b3a4de8
...
@@ -57,15 +57,15 @@
...
@@ -57,15 +57,15 @@
<text
class=
"product-rule"
v-if=
"items.productRefundRuleVo"
>
<text
class=
"product-rule"
v-if=
"items.productRefundRuleVo"
>
<!-- 索道写死 -->
<!-- 索道写死 -->
<!-- <text v-if="item.id== 'z0015605022691a5945bbe463141668c'">
<!-- <text v-if="item.id== 'z0015605022691a5945bbe463141668c'">
条件退
有
条件退
</text>
</text>
<template v-else>
<template v-else>
<text v-if="items.productRefundRuleVo.refundType == 0">不可退</text>
<text v-if="items.productRefundRuleVo.refundType == 0">不可退</text>
<text v-if="items.productRefundRuleVo.refundType == 1">条件退</text>
<text v-if="items.productRefundRuleVo.refundType == 1">
有
条件退</text>
<text v-if="items.productRefundRuleVo.refundType == 2">随时可退</text>
<text v-if="items.productRefundRuleVo.refundType == 2">随时可退</text>
</template> -->
</template> -->
<text
v-if=
"items.productRefundRuleVo.refundType == 0"
>
不可退
</text>
<text
v-if=
"items.productRefundRuleVo.refundType == 0"
>
不可退
</text>
<text
v-if=
"items.productRefundRuleVo.refundType == 1"
>
条件退
</text>
<text
v-if=
"items.productRefundRuleVo.refundType == 1"
>
有
条件退
</text>
<text
v-if=
"items.productRefundRuleVo.refundType == 2"
>
随时可退
</text>
<text
v-if=
"items.productRefundRuleVo.refundType == 2"
>
随时可退
</text>
</text>
</text>
<text
class=
"product-rule"
>
无需取票
</text>
<text
class=
"product-rule"
>
无需取票
</text>
...
...
pages/indexs/center/center.vue
View file @
5b3a4de8
...
@@ -184,6 +184,23 @@ export default {
...
@@ -184,6 +184,23 @@ export default {
}
}
})
})
},
},
aaa
(){
uni
.
openEmbeddedMiniProgram
({
appId
:
'wx882fabc8844b5363'
,
// 目标小程序的appid
path
:
'pages/orders/orders'
,
// 打开的页面路径,可选
extraData
:
{
// 需要传递给目标小程序的数据,可选
orderId
:
'z001715240555636905c358cf6758baa'
},
success
:
(
res
)
=>
{
// 打开成功的回调
console
.
log
(
'打开嵌入的小程序成功'
,
res
)
},
fail
:
(
err
)
=>
{
// 打开失败的回调
console
.
error
(
'打开嵌入的小程序失败'
,
err
)
}
})
},
//---跳转到订单列表
//---跳转到订单列表
goOrderlist
(
orderStatus
){
goOrderlist
(
orderStatus
){
uni
.
navigateTo
({
uni
.
navigateTo
({
...
...
pages/scenic/combinationProduct/combinationProduct.vue
View file @
5b3a4de8
...
@@ -55,7 +55,7 @@
...
@@ -55,7 +55,7 @@
<view
style=
"font-size: 24rpx;display: flex;"
>
<view
style=
"font-size: 24rpx;display: flex;"
>
<text
class=
"product-rule"
v-if=
"items.productRefundRuleVo"
>
<text
class=
"product-rule"
v-if=
"items.productRefundRuleVo"
>
<text
v-if=
"items.productRefundRuleVo.refundType == 0"
>
不可退
</text>
<text
v-if=
"items.productRefundRuleVo.refundType == 0"
>
不可退
</text>
<text
v-if=
"items.productRefundRuleVo.refundType == 1"
>
条件退
</text>
<text
v-if=
"items.productRefundRuleVo.refundType == 1"
>
有
条件退
</text>
<text
v-if=
"items.productRefundRuleVo.refundType == 2"
>
随时可退
</text>
<text
v-if=
"items.productRefundRuleVo.refundType == 2"
>
随时可退
</text>
</text>
</text>
...
...
pages/scenic/scenicCombiOrder/scenicCombiOrder.vue
View file @
5b3a4de8
...
@@ -19,15 +19,15 @@
...
@@ -19,15 +19,15 @@
<view>
<view>
<!-- 索道写死 -->
<!-- 索道写死 -->
<!--
<text
v-if=
"item.merchantId=='z0015605022691a5945bbe463141668c'"
>
<!--
<text
v-if=
"item.merchantId=='z0015605022691a5945bbe463141668c'"
>
条件退
有
条件退
</text>
</text>
<template
v-else
>
<template
v-else
>
<text
v-if=
"item.backChangeRule == 0"
>
不可退
换
</text>
<text
v-if=
"item.backChangeRule == 0"
>
不可退
</text>
<text
v-if=
"item.backChangeRule == 1"
>
条件退
</text>
<text
v-if=
"item.backChangeRule == 1"
>
有
条件退
</text>
<text
v-if=
"item.backChangeRule == 2"
>
随时可退
</text>
<text
v-if=
"item.backChangeRule == 2"
>
随时可退
</text>
</
template
>
-->
</
template
>
-->
<text
v-if=
"item.backChangeRule == 0"
>
不可退
换
</text>
<text
v-if=
"item.backChangeRule == 0"
>
不可退
</text>
<text
v-if=
"item.backChangeRule == 1"
>
条件退
</text>
<text
v-if=
"item.backChangeRule == 1"
>
有
条件退
</text>
<text
v-if=
"item.backChangeRule == 2"
>
随时可退
</text>
<text
v-if=
"item.backChangeRule == 2"
>
随时可退
</text>
<text
v-if=
"item.isFetch == 1"
style=
"margin-left: 10rpx;"
>
无需取号
</text>
<text
v-if=
"item.isFetch == 1"
style=
"margin-left: 10rpx;"
>
无需取号
</text>
</view>
</view>
...
...
pages/scenic/scenicProduct/scenicProduct-new.vue
deleted
100644 → 0
View file @
79d2e9c5
<
template
>
<view>
<view
class=
"banner"
v-if=
"detailData"
>
<u-swiper
:list=
"detailData.imgList"
@
change=
"e => currentNum = e.current"
indicatorStyle=
"right: 20px;bottom:25px"
height=
"400"
circular
>
<view
slot=
"indicator"
class=
"indicator-num"
>
<text
class=
"indicator-num__text"
>
{{
currentNum
+
1
}}
/
{{
detailData
.
imgList
.
length
}}
</text>
</view>
</u-swiper>
</view>
<view
class=
"middle"
>
<view
class=
"middle-introduce"
>
<view
class=
"introduce-one"
>
<view
class=
"merchantname"
>
重庆湖广会馆
</view>
<view
class=
"businesstime"
>
<view
style=
"font-size: 24rpx;"
>
<text
style=
"color: #3688ff;margin-right: 20rpx;"
>
开园中
</text>
<text
style=
"color: #999;"
>
09:00~18:30
</text>
</view>
<view
style=
"display: flex;"
>
<text>
详情
</text>
<u-icon
name=
'arrow-right'
></u-icon>
</view>
</view>
</view>
<view
class=
'introduce-two'
>
<text>
5分
</text>
<text>
0条好评
</text>
</view>
<view
class=
"introduce-three"
>
<view
style=
"flex: 1;margin-right: 20rpx;"
>
重庆市市辖区渝中区联合国际大厦
</view>
<view
class=
"introduce-icon"
>
<u-icon
name=
'map-fill'
color=
'#3688ff'
size=
'44'
></u-icon>
<text></text>
<u-icon
name=
'phone-fill'
color=
'#3688ff'
size=
'44'
></u-icon>
</view>
</view>
</view>
<view
class=
"middle-list"
>
<view>
<view>
景区门票
</view>
<view>
<text>
无需换票
</text>
<text></text>
<text>
随时可退
</text>
</view>
</view>
<view>
</view>
</view>
</view>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
ticketList
:[],
//门票列表
detailData
:
''
,
//详情数据
currentNum
:
0
,
//轮播图下标
}
},
onLoad
(
option
)
{
this
.
nowTime
=
parseInt
(
new
Date
().
Format
(
'hhmm'
))
this
.
companyId
=
this
.
$commonjs
.
getCompanyId
(
option
)
||
''
this
.
merchantId
=
this
.
$commonjs
.
getKey
(
option
,
'merchantId'
)
||
''
this
.
channelType
=
this
.
$commonjs
.
getKey
(
option
,
'channelType'
)
||
0
this
.
initProduct
()
this
.
initDetail
()
},
methods
:
{
//---产品加载
initProduct
(){
this
.
ticketList
=
[]
let
data
=
{
merchantId
:
this
.
merchantId
,
//商户id
type
:
1
,
//类型:1景区、2酒店、3餐饮
channelType
:
this
.
channelType
,
//渠道Id
}
this
.
$request
(
'scenic/user/product/findProductList'
,
data
).
then
((
res
)
=>
{
if
(
res
.
code
==
'00'
){
let
list
=
res
.
data
.
list
||
[]
list
.
forEach
((
item
,
index
)
=>
{
//营业时间重新组成
if
(
item
.
businessTime
){
item
.
businessTime
=
item
.
businessTime
.
split
(
';'
)
}
//等于7为特价
if
(
item
.
channelType
!=
7
){
this
.
ticketList
.
push
(
item
)
}
})
}
else
{
uni
.
showToast
({
title
:
res
.
message
,
icon
:
'none'
})
}
})
},
//---详情加载
initDetail
(){
let
data
=
{
userId
:
uni
.
getStorageSync
(
'userId'
)
||
''
,
openid
:
uni
.
getStorageSync
(
'openid'
)
||
''
,
id
:
this
.
merchantId
,
//商户id
isDetail
:
1
,
//商户详情
}
this
.
$request
(
'scenic/user/merchant/findDetailInfo'
,
data
).
then
((
res
)
=>
{
if
(
res
.
code
==
'00'
){
this
.
detailData
=
res
.
data
if
(
this
.
detailData
.
tag
){
this
.
tagArr
=
this
.
detailData
.
tag
.
split
(
','
)
}
let
start
=
''
let
end
=
''
if
(
this
.
detailData
.
businessStart
){
start
=
parseInt
(
this
.
$commonjs
.
changeTime
(
this
.
detailData
.
businessStart
.
substr
(
0
,
5
)))
}
if
(
this
.
detailData
.
businessEnd
){
end
=
parseInt
(
this
.
$commonjs
.
changeTime
(
this
.
detailData
.
businessEnd
.
substr
(
0
,
5
)))
}
if
(
start
<
this
.
nowTime
<
end
){
this
.
status
=
'开园中'
}
else
{
this
.
status
=
'闭园中'
}
}
else
{
uni
.
showToast
({
title
:
res
.
message
,
icon
:
'none'
})
}
})
},
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
.middle
{
position
:
relative
;
top
:
-40rpx
;
}
.middle-introduce
{
background
:
#FFFFFF
;
padding
:
30rpx
20rpx
0
20rpx
;
border-radius
:
24rpx
24rpx
0
0
;
}
.introduce-one
{
border-bottom
:
1px
solid
#e5e5e5
;
padding-bottom
:
20rpx
;
}
.merchantname
{
font-size
:
30rpx
;
font-weight
:
bold
;
}
.businesstime
{
display
:
flex
;
justify-content
:
space-between
;
margin-top
:
10rpx
;
}
.introduce-two
{
border-bottom
:
1px
solid
#e5e5e5
;
padding
:
20rpx
0
;
font-size
:
24rpx
;
}
.introduce-two
text
:first-child
{
color
:
$red
;
font-weight
:
bold
}
.introduce-two
text
:first-child::after
{
display
:
inline-block
;
width
:
2rpx
;
height
:
20rpx
;
background
:
#999999
;
content
:
''
;
margin
:
0
10rpx
;
}
.introduce-two
text
:last-child
{
color
:
#999999
;
}
.introduce-three
{
display
:
flex
;
justify-content
:
space-between
;
padding
:
20rpx
0
;
color
:
#666666
;
font-size
:
24rpx
;
align-items
:
center
;
}
.introduce-icon
{
display
:
flex
;
align-items
:
center
;
}
.introduce-icon
text
{
display
:
inline-block
;
margin
:
0
12rpx
;
width
:
1px
;
background
:
#e5e5e5
;
height
:
30rpx
;
}
.middle-list
{
background
:
#FFFFFF
;
margin-top
:
20rpx
;
}
</
style
>
\ No newline at end of file
pages/scenic/scenicProduct/scenicProduct-old.vue
0 → 100644
View file @
5b3a4de8
<
template
>
<view>
<web-view
:src=
"outUrl"
></web-view>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
enterUrl
:
''
,
//进入页面路由
outUrl
:
''
,
//跳出页面路由
}
},
onLoad
(
option
)
{
//#ifdef MP-WEIXIN
this
.
enterUrl
=
option
.
q
//#endif
//#ifdef MP-ALIPAY
this
.
enterUrl
=
uni
.
getStorageSync
(
'alipayQrCode'
)
//#endif
if
(
this
.
enterUrl
){
//普通二维码扫码进入
let
merchantId
=
this
.
getUrlKey
(
'merchantId'
)
let
companyId
=
this
.
getUrlKey
(
'companyId'
)
let
channelType
=
this
.
getUrlKey
(
'channelType'
)
let
pdOpenid
=
uni
.
getStorageSync
(
'openid'
)
//胖丁小程序openid,临时用,当公众号授权做好之后可以删除
let
pdToken
=
uni
.
getStorageSync
(
'token'
)
let
pdCreateUserId
=
uni
.
getStorageSync
(
'createUserId'
)
let
pdUserId
=
uni
.
getStorageSync
(
'userId'
)
let
baseUrl
=
this
.
$wxurl
+
'scenicProduct?pdOpenid='
+
pdOpenid
+
'&pdToken='
+
pdToken
+
'&pdCreateUserId='
+
pdCreateUserId
+
'&pdUserId='
+
pdUserId
let
url
=
'&merchantId='
+
merchantId
+
'&companyId='
+
companyId
+
'&channelType='
+
channelType
this
.
outUrl
=
baseUrl
+
url
}
else
{
//小程序页面跳转进入
let
merchantId
=
option
.
merchantId
||
''
let
companyId
=
option
.
companyId
||
''
let
channelType
=
option
.
channelType
||
0
let
ifyukuaiCode
=
option
.
ifyukuaiCode
||
''
//是否是渝快码跳入,渝快码跳入需要在H5端另外走流程
let
pdOpenid
=
uni
.
getStorageSync
(
'openid'
)
//胖丁小程序openid,临时用,当公众号授权做好之后可以删除
let
pdToken
=
uni
.
getStorageSync
(
'token'
)
let
pdCreateUserId
=
uni
.
getStorageSync
(
'createUserId'
)
let
pdUserId
=
uni
.
getStorageSync
(
'userId'
)
let
baseUrl
=
this
.
$wxurl
+
'scenicProduct?pdOpenid='
+
pdOpenid
+
'&pdToken='
+
pdToken
+
'&pdCreateUserId='
+
pdCreateUserId
+
'&pdUserId='
+
pdUserId
let
url
=
'&merchantId='
+
merchantId
+
'&companyId='
+
companyId
+
'&ifyukuaiCode='
+
ifyukuaiCode
+
'&channelType='
+
channelType
this
.
outUrl
=
baseUrl
+
url
}
},
methods
:
{
getUrlKey
(
name
){
//---------------------------------------------------------------获取url
return
(
new
RegExp
(
'[?|&]'
+
name
+
'='
+
'([^&;]+?)(&|#|;|$)'
).
exec
(
decodeURIComponent
(
this
.
enterUrl
))
||
[,
''
])[
1
].
replace
(
/
\+
/g
,
'%20'
)
||
''
},
}
}
</
script
>
<
style
>
</
style
>
\ No newline at end of file
pages/scenic/scenicProduct/scenicProduct.vue
View file @
5b3a4de8
<
template
>
<
template
>
<view>
<view>
<web-view
:src=
"outUrl"
></web-view>
<view
class=
"banner"
v-if=
"detailData"
>
<u-swiper
:list=
"detailData.imgList"
@
change=
"e => currentNum = e.current"
indicatorStyle=
"right: 20px;bottom:25px"
height=
"400"
circular
>
<view
slot=
"indicator"
class=
"indicator-num"
>
<text
class=
"indicator-num__text"
>
{{
currentNum
+
1
}}
/
{{
detailData
.
imgList
.
length
}}
</text>
</view>
</u-swiper>
</view>
<view
class=
"middle"
>
<view
class=
"middle-introduce"
>
<view
class=
"introduce-one"
@
click=
"showDetail()"
>
<view
class=
"merchantname"
>
{{
detailData
.
name
}}
</view>
<view
class=
"businesstime"
>
<view
style=
"font-size: 24rpx;"
>
<text
style=
"color: #3688ff;margin-right: 20rpx;"
>
{{
status
}}
</text>
<text
style=
"color: #999;"
>
{{
detailData
.
businessStart
?
detailData
.
businessStart
.
substr
(
0
,
5
):
""
}}
~
{{
detailData
.
businessStart
?
detailData
.
businessEnd
.
substr
(
0
,
5
):
""
}}
</text>
</view>
<view
style=
"display: flex;"
>
<text>
详情
</text>
<u-icon
name=
'arrow-right'
></u-icon>
</view>
</view>
</view>
<view
class=
'introduce-two'
>
<text>
{{
detailData
.
score
||
4.9
}}
分
</text>
<text>
{{
detailData
.
comments
.
length
>
0
?
detailData
.
comments
.
length
:
'100+'
}}
条好评
</text>
</view>
<view
class=
"introduce-three"
>
<view
style=
"flex: 1;margin-right: 20rpx;"
>
{{
detailData
.
address
}}
</view>
<view
class=
"introduce-icon"
>
<u-icon
name=
'map-fill'
color=
'#3688ff'
size=
'44'
@
click=
"navigation()"
></u-icon>
<text></text>
<u-icon
name=
'phone-fill'
color=
'#3688ff'
size=
'44'
@
click=
"makePhone()"
></u-icon>
</view>
</view>
</view>
<view
class=
"middle-product"
>
<view
class=
"product-title"
>
<view>
景区门票
</view>
<view
class=
"title-tag"
>
<text
v-for=
"(item,index) of tagArr"
:key=
'index'
>
{{
item
}}
<text
class=
"tag-line"
v-if=
"index != tagArr.length-1"
>
|
</text>
</text>
</view>
</view>
<view
class=
"product-list"
@
click=
"goOrder(item)"
v-for=
"(item,index) of ticketList"
:key=
"index"
>
<view
class=
"list-left"
>
<view>
{{
item
.
name
}}
</view>
<view
class=
"list-buyknow"
@
click
.
stop=
"showBuyKnow(item.id)"
>
购票须知
<u-icon
name=
"arrow-right"
size=
'26'
color=
'#B4B4B4'
></u-icon>
</view>
</view>
<view
class=
"list-right"
>
<view>
<text
class=
"small-price"
>
¥
{{
parseFloat
(
parseFloat
(
item
.
originalPrice
).
toFixed
(
2
))
}}
</text>
<text
class=
"big-price"
>
<text
style=
"font-size: 28rpx;"
>
¥
</text>
{{
parseFloat
(
parseFloat
(
item
.
sellingPrice
).
toFixed
(
2
))
}}
</text>
</view>
<view
style=
"margin-top: 15rpx;"
>
<text
class=
"btn"
>
购买
</text>
</view>
</view>
<view
v-if=
"item.status==2"
class=
"sellout"
>
已售罄
</view>
</view>
<view
class=
"nomore"
v-if=
"ticketList.length>0"
>
没有更多了
</view>
<view
style=
"padding: 30rpx;"
v-else
>
<u-empty
iconSize=
'180'
textSize=
'28'
>
</u-empty>
</view>
</view>
</view>
<!-- 购买须知 -->
<buyKnow
:buyKnowData=
"buyKnowData"
ref=
"buyKnow"
></buyKnow>
<!-- 商户详情 -->
<merchantDetail
:detailData=
'detailData'
ref=
'merchantDetail'
></merchantDetail>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
import
buyKnow
from
'@/components/buyKnow.vue'
//购买须知
import
merchantDetail
from
'@/components/merchantDetail'
//详情弹窗
export
default
{
export
default
{
components
:
{
buyKnow
,
merchantDetail
},
data
()
{
data
()
{
return
{
return
{
enterUrl
:
''
,
//进入页面路由
ticketList
:[],
//门票列表
outUrl
:
''
,
//跳出页面路由
detailData
:
''
,
//详情数据
currentNum
:
0
,
//轮播图下标
tagArr
:[],
//标签数组
status
:
''
,
//标签状态,开园或者闭园
buyKnowData
:
''
,
//购票须知数据
companyId
:
''
,
//公司Id
openid
:
uni
.
getStorageSync
(
'openid'
)
||
''
,
//openid
}
}
},
},
onLoad
(
option
)
{
onLoad
(
option
)
{
//#ifdef MP-WEIXIN
this
.
nowTime
=
parseInt
(
new
Date
().
Format
(
'hhmm'
))
this
.
enterUrl
=
option
.
q
this
.
companyId
=
this
.
$commonjs
.
getCompanyId
(
option
)
||
''
//#endif
this
.
merchantId
=
this
.
$commonjs
.
getKey
(
option
,
'merchantId'
)
||
''
this
.
channelType
=
this
.
$commonjs
.
getKey
(
option
,
'channelType'
)
||
0
//#ifdef MP-ALIPAY
this
.
initProduct
()
this
.
enterUrl
=
uni
.
getStorageSync
(
'alipayQrCode'
)
this
.
initDetail
()
//#endif
if
(
this
.
enterUrl
){
//普通二维码扫码进入
let
merchantId
=
this
.
getUrlKey
(
'merchantId'
)
let
companyId
=
this
.
getUrlKey
(
'companyId'
)
let
channelType
=
this
.
getUrlKey
(
'channelType'
)
let
pdOpenid
=
uni
.
getStorageSync
(
'openid'
)
//胖丁小程序openid,临时用,当公众号授权做好之后可以删除
let
pdToken
=
uni
.
getStorageSync
(
'token'
)
let
pdCreateUserId
=
uni
.
getStorageSync
(
'createUserId'
)
let
pdUserId
=
uni
.
getStorageSync
(
'userId'
)
let
baseUrl
=
this
.
$wxurl
+
'scenicProduct?pdOpenid='
+
pdOpenid
+
'&pdToken='
+
pdToken
+
'&pdCreateUserId='
+
pdCreateUserId
+
'&pdUserId='
+
pdUserId
let
url
=
'&merchantId='
+
merchantId
+
'&companyId='
+
companyId
+
'&channelType='
+
channelType
this
.
outUrl
=
baseUrl
+
url
}
else
{
//小程序页面跳转进入
let
merchantId
=
option
.
merchantId
||
''
let
companyId
=
option
.
companyId
||
''
let
channelType
=
option
.
channelType
||
0
let
ifyukuaiCode
=
option
.
ifyukuaiCode
||
''
//是否是渝快码跳入,渝快码跳入需要在H5端另外走流程
let
pdOpenid
=
uni
.
getStorageSync
(
'openid'
)
//胖丁小程序openid,临时用,当公众号授权做好之后可以删除
let
pdToken
=
uni
.
getStorageSync
(
'token'
)
let
pdCreateUserId
=
uni
.
getStorageSync
(
'createUserId'
)
let
pdUserId
=
uni
.
getStorageSync
(
'userId'
)
let
baseUrl
=
this
.
$wxurl
+
'scenicProduct?pdOpenid='
+
pdOpenid
+
'&pdToken='
+
pdToken
+
'&pdCreateUserId='
+
pdCreateUserId
+
'&pdUserId='
+
pdUserId
let
url
=
'&merchantId='
+
merchantId
+
'&companyId='
+
companyId
+
'&ifyukuaiCode='
+
ifyukuaiCode
+
'&channelType='
+
channelType
this
.
outUrl
=
baseUrl
+
url
}
},
},
methods
:
{
methods
:
{
getUrlKey
(
name
){
//---------------------------------------------------------------获取url
//---展示详情
return
(
new
RegExp
(
'[?|&]'
+
name
+
'='
+
'([^&;]+?)(&|#|;|$)'
).
exec
(
decodeURIComponent
(
this
.
enterUrl
))
||
[,
''
])[
1
].
replace
(
/
\+
/g
,
'%20'
)
||
''
showDetail
(){
this
.
$refs
.
merchantDetail
.
showPop
=
true
},
//---导航
navigation
(){
uni
.
openLocation
({
latitude
:
this
.
detailData
.
latitude
,
longitude
:
this
.
detailData
.
longitude
,
name
:
this
.
detailData
.
name
,
address
:
this
.
detailData
.
address
,
success
:
function
()
{
}
})
},
//---拨打电话
makePhone
()
{
uni
.
makePhoneCall
({
phoneNumber
:
this
.
detailData
.
phone
})
},
//---跳转订单页面
goOrder
(
item
){
if
(
item
.
status
!=
'2'
){
//未售罄
let
data
=
{
chooseGroupGoodList
:[{
productId
:
item
.
id
,
merchantCode
:
item
.
merchantCode
,
extendContent
:
'{"openid":'
+
'"'
+
this
.
openid
+
'"'
+
'}'
}],
companyId
:
this
.
companyId
,
}
this
.
$request
(
'scenic/groupGood/checkProductChangeList'
,
data
).
then
((
res
)
=>
{
if
(
res
.
code
==
'00'
){
let
jumpType
=
''
if
(
res
.
data
.
length
>
0
){
jumpType
=
res
.
data
[
0
].
jumpType
}
let
productId
=
''
if
(
jumpType
===
0
){
//变产品id
productId
=
res
.
data
[
0
].
afterProductId
||
item
.
id
}
else
{
//不变
productId
=
item
.
id
}
if
(
item
.
ticketType
==
2
){
//景区联票
let
query
=
`?merchantId=
${
this
.
merchantId
}
&productId=
${
productId
}
`
uni
.
navigateTo
({
url
:
'/pages/scenic/scenicJointOrder/scenicJointOrder'
+
query
})
}
if
(
item
.
ticketType
!=
2
){
//景区单票
let
query
=
`?merchantId=
${
this
.
merchantId
}
&productId=
${
productId
}
`
uni
.
navigateTo
({
url
:
'/pages/scenic/scenicSingleOrder/scenicSingleOrder'
+
query
})
}
}
else
{
uni
.
showToast
({
title
:
res
.
message
,
icon
:
'none'
})
}
})
}
},
//---展示购买须知
showBuyKnow
(
id
)
{
let
data
=
{
id
}
this
.
$request
(
'scenic/groupGood/loadProduct'
,
data
).
then
((
res
)
=>
{
if
(
res
.
code
==
'00'
){
this
.
buyKnowData
=
res
.
data
this
.
$refs
.
buyKnow
.
showPop
=
true
}
else
{
uni
.
showToast
({
title
:
res
.
message
,
icon
:
'none'
})
}
})
},
//---产品加载
initProduct
(){
this
.
ticketList
=
[]
let
data
=
{
merchantId
:
this
.
merchantId
,
//商户id
type
:
1
,
//类型:1景区、2酒店、3餐饮
channelType
:
this
.
channelType
,
//渠道Id
}
this
.
$request
(
'scenic/user/product/findProductList'
,
data
).
then
((
res
)
=>
{
if
(
res
.
code
==
'00'
){
let
list
=
res
.
data
.
list
||
[]
list
.
forEach
((
item
,
index
)
=>
{
//营业时间重新组成
if
(
item
.
businessTime
){
item
.
businessTime
=
item
.
businessTime
.
split
(
';'
)
}
//等于7为特价
if
(
item
.
channelType
!=
7
){
this
.
ticketList
.
push
(
item
)
}
})
}
else
{
uni
.
showToast
({
title
:
res
.
message
,
icon
:
'none'
})
}
})
},
//---详情加载
initDetail
(){
let
data
=
{
userId
:
uni
.
getStorageSync
(
'userId'
)
||
''
,
openid
:
this
.
openid
,
id
:
this
.
merchantId
,
//商户id
isDetail
:
1
,
//商户详情
}
this
.
$request
(
'scenic/user/merchant/findDetailInfo'
,
data
).
then
((
res
)
=>
{
if
(
res
.
code
==
'00'
){
this
.
detailData
=
res
.
data
if
(
this
.
detailData
.
tag
){
this
.
tagArr
=
this
.
detailData
.
tag
.
split
(
','
)
}
let
start
=
''
let
end
=
''
if
(
this
.
detailData
.
businessStart
){
start
=
parseInt
(
this
.
$commonjs
.
changeTime
(
this
.
detailData
.
businessStart
.
substr
(
0
,
5
)))
}
if
(
this
.
detailData
.
businessEnd
){
end
=
parseInt
(
this
.
$commonjs
.
changeTime
(
this
.
detailData
.
businessEnd
.
substr
(
0
,
5
)))
}
if
(
start
<
this
.
nowTime
<
end
){
this
.
status
=
'开园中'
}
else
{
this
.
status
=
'闭园中'
}
}
else
{
uni
.
showToast
({
title
:
res
.
message
,
icon
:
'none'
})
}
})
},
},
}
}
}
}
</
script
>
</
script
>
<
style
>
<
style
scoped
lang=
"scss"
>
.middle
{
position
:
relative
;
top
:
-40rpx
;
}
.middle-introduce
{
background
:
#FFFFFF
;
padding
:
30rpx
20rpx
0
20rpx
;
border-radius
:
24rpx
24rpx
0
0
;
}
.introduce-one
{
border-bottom
:
1px
solid
#e5e5e5
;
padding-bottom
:
20rpx
;
}
.merchantname
{
font-size
:
30rpx
;
font-weight
:
bold
;
}
.businesstime
{
display
:
flex
;
justify-content
:
space-between
;
margin-top
:
10rpx
;
}
.introduce-two
{
border-bottom
:
1px
solid
#e5e5e5
;
padding
:
20rpx
0
;
font-size
:
24rpx
;
}
.introduce-two
text
:first-child
{
color
:
$red
;
font-weight
:
bold
}
.introduce-two
text
:first-child::after
{
display
:
inline-block
;
width
:
2rpx
;
height
:
20rpx
;
background
:
#999999
;
content
:
''
;
margin
:
0
10rpx
;
}
.introduce-two
text
:last-child
{
color
:
#999999
;
}
.introduce-three
{
display
:
flex
;
justify-content
:
space-between
;
padding
:
20rpx
0
;
color
:
#666666
;
font-size
:
24rpx
;
align-items
:
center
;
}
.introduce-icon
{
display
:
flex
;
align-items
:
center
;
}
.introduce-icon
text
{
display
:
inline-block
;
margin
:
0
12rpx
;
width
:
1px
;
background
:
#e5e5e5
;
height
:
30rpx
;
}
.middle-list
{
background
:
#FFFFFF
;
margin-top
:
20rpx
;
}
.middle-product
{
background
:
#FFFFFF
;
margin-top
:
20rpx
;
}
.product-title
{
padding
:
24rpx
20rpx
;
font-size
:
30rpx
;
font-weight
:
bold
;
border-bottom
:
1rpx
solid
#e6e6e6
;
}
.title-tag
{
font-size
:
24rpx
;
color
:
#999
;
font-weight
:
400
;
margin-top
:
10rpx
;
}
.title-tag
>
text
:first-child
{
color
:
#f9690e
;
}
.tag-line
{
color
:
#e5e5e5
;
margin
:
0
10rpx
;
}
.product-list
{
display
:
flex
;
padding
:
30rpx
20rpx
;
border-bottom
:
1rpx
solid
#e6e6e6
;
align-items
:
center
;
position
:
relative
;
}
.sellout
{
position
:
absolute
;
left
:
0
;
top
:
0
;
right
:
0
;
bottom
:
0
;
z-index
:
1
;
background
:
rgba
(
0
,
0
,
0
,
0
.1
);
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
font-size
:
32rpx
;
color
:
$red
;
font-weight
:
bold
;
}
.list-left
{
flex
:
1
;
padding-right
:
20rpx
;
}
.list-buyknow
{
display
:
flex
;
margin-top
:
25rpx
;
align-items
:
center
;
width
:
160rpx
;
}
.list-right
{
text-align
:
right
;
}
.small-price
{
font-size
:
24rpx
;
color
:
$grey
;
text-decoration
:
line-through
;
}
.big-price
{
font-size
:
32rpx
;
color
:
$red
;
font-weight
:
bold
;
margin-left
:
10rpx
;
}
.btn
{
width
:
120rpx
;
height
:
60rpx
;
line-height
:
60rpx
;
}
.nomore
{
padding
:
30rpx
;
text-align
:
center
;
color
:
$red
;
}
</
style
>
</
style
>
\ No newline at end of file
pages/scenic/scenicSingleOrder/scenicSingleOrder.vue
View file @
5b3a4de8
...
@@ -18,15 +18,15 @@
...
@@ -18,15 +18,15 @@
<view>
<view>
<!-- 索道写死 -->
<!-- 索道写死 -->
<!--
<text
v-if=
"merchantId=='z0015605022691a5945bbe463141668c'"
>
<!--
<text
v-if=
"merchantId=='z0015605022691a5945bbe463141668c'"
>
条件退
有
条件退
</text>
</text>
<template
v-else
>
<template
v-else
>
<text
v-if=
"productIfo.backChangeRule == 0"
>
不可退
换
</text>
<text
v-if=
"productIfo.backChangeRule == 0"
>
不可退
</text>
<text
v-if=
"productIfo.backChangeRule == 1"
>
条件退
</text>
<text
v-if=
"productIfo.backChangeRule == 1"
>
有
条件退
</text>
<text
v-if=
"productIfo.backChangeRule == 2"
>
随时可退
</text>
<text
v-if=
"productIfo.backChangeRule == 2"
>
随时可退
</text>
</
template
>
-->
</
template
>
-->
<text
v-if=
"productIfo.backChangeRule == 0"
>
不可退
换
</text>
<text
v-if=
"productIfo.backChangeRule == 0"
>
不可退
</text>
<text
v-if=
"productIfo.backChangeRule == 1"
>
条件退
</text>
<text
v-if=
"productIfo.backChangeRule == 1"
>
有
条件退
</text>
<text
v-if=
"productIfo.backChangeRule == 2"
>
随时可退
</text>
<text
v-if=
"productIfo.backChangeRule == 2"
>
随时可退
</text>
<text
v-if=
"productIfo.isFetch == 1"
style=
"margin-left: 10rpx;"
>
无需取号
</text>
<text
v-if=
"productIfo.isFetch == 1"
style=
"margin-left: 10rpx;"
>
无需取号
</text>
</view>
</view>
...
...
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