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
b7b3bbfc
Commit
b7b3bbfc
authored
Apr 02, 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
f37e5ef7
8dfb68ac
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
669 additions
and
161 deletions
+669
-161
App.vue
App.vue
+0
-2
merchantDetail.vue
components/merchantDetail.vue
+19
-6
distributionCombiChoose.vue
...ation/distributionCombiChoose/distributionCombiChoose.vue
+20
-14
center.vue
pages/indexs/center/center.vue
+12
-0
hghgIndex.vue
pages/indexs/hghgIndex/hghgIndex.vue
+1
-1
scenicCombiOrder.vue
pages/scenic/scenicCombiOrder/scenicCombiOrder.vue
+11
-22
contactList.vue
pages/scenic/scenicComponents/contactList.vue
+2
-2
editContacts -new.vue
pages/scenic/scenicComponents/editContacts -new.vue
+286
-0
scenicProduct-new.vue
pages/scenic/scenicProduct/scenicProduct-new.vue
+221
-0
scenicSingleOrder.vue
pages/scenic/scenicSingleOrder/scenicSingleOrder.vue
+97
-114
No files found.
App.vue
View file @
b7b3bbfc
...
...
@@ -70,10 +70,8 @@ export default {
})
},
onShow
:
function
()
{
},
onHide
:
function
()
{
}
}
</
script
>
...
...
components/merchantDetail.vue
View file @
b7b3bbfc
...
...
@@ -70,15 +70,15 @@
</view>
</view>
<!-- 出行贴士 -->
<view
class=
"travelTips"
v-if=
"travelTips"
>
<view
class=
"travelTips"
v-if=
"travelTips"
@
click=
"navigation()"
>
<view
class=
"middle-title"
style=
"padding-bottom: 4rpx;"
>
{{
travelTips
.
title
}}
<text
style=
"margin-right: 10rpx;"
>
{{
travelTips
.
title
}}
</text>
<u-icon
name=
'map-fill'
></u-icon>
</view>
<view
class=
"travel-content"
v-for=
"(item,a) of travelTips.merchantChildTitleData"
:key=
"a"
>
<text
class=
"travel-left"
>
{{
item
.
childTitle
}}
</text>
<view
class=
"travel-right"
>
<text
v-for=
"(items,b) of item.contentList"
:key=
"b"
>
{{
items
.
content
}}
...
...
@@ -87,8 +87,7 @@
</view>
</view>
</view>
</view>
</view>
</view>
</u-popup>
</
template
>
...
...
@@ -151,7 +150,20 @@ export default {
immediate
:
true
}
},
methods
:
{}
methods
:
{
//---导航
navigation
(){
uni
.
openLocation
({
latitude
:
this
.
detailData
.
latitude
,
longitude
:
this
.
detailData
.
longitude
,
name
:
this
.
detailData
.
name
,
address
:
this
.
detailData
.
address
,
success
:
function
()
{
}
})
}
}
}
</
script
>
...
...
@@ -188,6 +200,7 @@ export default {
font-size
:
30rpx
;
font-weight
:
bold
;
padding-bottom
:
24rpx
;
display
:
flex
;
}
.opentime
{
padding
:
30rpx
16rpx
;
...
...
pages/combination/distributionCombiChoose/distributionCombiChoose.vue
View file @
b7b3bbfc
...
...
@@ -171,7 +171,7 @@
<!-- 商户详情 -->
<merchantDetail
:detailData=
'detailData'
ref=
'merchantDetail'
></merchantDetail>
<!-- 模态框 -->
<u-modal
:show=
"showModal"
@
confirm=
"chooseConfirm"
@
cancel=
"chooseCancel"
title=
"提示"
content=
"
该产品不支持多选
"
show-cancel-button=
"true"
>
<u-modal
:show=
"showModal"
@
confirm=
"chooseConfirm"
@
cancel=
"chooseCancel"
title=
"提示"
content=
"
是否更改产品
"
show-cancel-button=
"true"
>
</u-modal>
</scroll-view>
<image
class=
"suodaoImg"
v-if=
"showSuodaoImg"
src=
"https://lx.pangdly.com/img/cjsdFirst.50a2e63.jpg"
></image>
...
...
@@ -340,6 +340,10 @@ export default {
//清空之前选中的数据以及状态
this
.
detailData
=
''
this
.
chooseProduct
=
[]
if
(
this
.
$refs
.
merchantDetail
){
//解决支付宝小程序报错问题
this
.
$refs
.
merchantDetail
.
showPop
=
false
}
if
(
this
.
$refs
.
detail
){
//解决支付宝小程序报错问题
this
.
$refs
.
detail
.
showPop
=
false
...
...
@@ -548,7 +552,9 @@ export default {
this
.
$nextTick
(()
=>
{
const
query
=
uni
.
createSelectorQuery
().
in
(
this
)
query
.
select
(
`.
${
labels
}
`
).
boundingClientRect
(
data
=>
{
this
.
swiperHeight
=
data
.
height
+
20
if
(
data
){
this
.
swiperHeight
=
data
.
height
+
20
}
}).
exec
()
})
},
...
...
@@ -664,19 +670,19 @@ export default {
return
item
.
id
})
let
query
=
'?productIdList='
+
JSON
.
stringify
(
productIdList
)
+
'&groupId='
+
this
.
groupId
+
'&groupChannelId='
+
this
.
groupChannelId
+
'&orderSource=3'
uni
.
navigateTo
({
url
:
'/pages/combination/combiOrder/combiOrder'
+
query
})
//
uni.navigateTo({
//
url: '/pages/combination/combiOrder/combiOrder' + query
//
})
// //如果有联票
//
if(this.chooseProduct.find(item=>item.ticketType==2)){
//
uni.navigateTo({
//
url: '/pages/combination/combiOrder/combiOrder' + query
//
})
//
}else{
//
uni.navigateTo({
//
url: '/pages/scenic/scenicCombiOrder/scenicCombiOrder' + query
//
})
//
}
if
(
this
.
chooseProduct
.
find
(
item
=>
item
.
ticketType
==
2
)){
uni
.
navigateTo
({
url
:
'/pages/combination/combiOrder/combiOrder'
+
query
})
}
else
{
uni
.
navigateTo
({
url
:
'/pages/scenic/scenicCombiOrder/scenicCombiOrder'
+
query
})
}
}
},
//---跳转影集页面
...
...
pages/indexs/center/center.vue
View file @
b7b3bbfc
...
...
@@ -158,6 +158,9 @@
我的行记
</view>
</view>
<!--
<view
class=
"middle3-list"
>
<button
@
click=
"xxx()"
>
客服
</button>
</view>
-->
</view>
</view>
</view>
...
...
@@ -172,6 +175,15 @@ export default {
}
},
methods
:
{
xxx
(){
wx
.
openCustomerServiceChat
({
extInfo
:
{
url
:
'https://work.weixin.qq.com/kfid/kfcbaf30d15641d16b0'
},
corpId
:
'ww2e9053ddd733ff39'
,
success
(
res
)
{
console
.
log
(
222
)
}
})
},
//---跳转到订单列表
goOrderlist
(
orderStatus
){
uni
.
navigateTo
({
...
...
pages/indexs/hghgIndex/hghgIndex.vue
View file @
b7b3bbfc
...
...
@@ -40,7 +40,7 @@
<text>
退票须知:
</text>
游客所购门票在选定游玩日期当天19:00前如未使用,可在电子门票‘我的订单’中申请退票,逾期不可
退。
随时可退,过期未核销自动
退。
</view>
<view
style=
"margin-top: 48rpx;display: flex;justify-content: center;"
>
<text
class=
"button"
@
click
.
stop=
"goBuy()"
>
立即购票
</text>
...
...
pages/scenic/scenicCombiOrder/scenicCombiOrder.vue
View file @
b7b3bbfc
...
...
@@ -252,7 +252,7 @@
</view>
</view>
<view
class=
"telephone"
v-if=
"showTelephone"
>
<view
class=
"telephone"
>
<text>
联系电话:
</text>
<input
type=
"number"
maxlength=
"11"
placeholder=
"请输入联系电话"
v-model
.
trim=
"ticketPhone"
/>
</view>
...
...
@@ -376,7 +376,6 @@ export default {
orderStatus
:
''
,
//上下架状态,任何一个产品状态为下架,该状态为下架
chooseTimeList
:[],
//选中产品时间列表
chooseDateList
:[],
//点击更多日期时对应的日期列表
showTelephone
:
true
,
//用于判断是否显示输入联系人电话号码
areaIndex
:
0
,
//选择站点时对应的产品下标
originalTotal
:
0
,
//原价总价
sellTotal
:
0
,
//卖价总价
...
...
@@ -424,10 +423,6 @@ export default {
})
for
(
let
i
=
0
;
i
<
this
.
productList
.
length
;
i
++
){
let
item
=
this
.
productList
[
i
]
//任何一个产品需要填写游客信息,下面的联系电话必须填写
if
(
item
.
tripTemplateFlag
!=
2
){
this
.
showTelephone
=
true
}
item
.
buyNum
=
1
,
//默认为1
item
.
chooseContact
=
[]
//选中的游客信息列表
item
.
contactNum
=
1
//需要选择几位联系人数量
...
...
@@ -519,17 +514,14 @@ export default {
this
.
sortUpDown
(
item
)
}
//默认选择每个产品第一个日期的值
this
.
dateChoose
(
item
,
item
.
priceStockList
[
0
],
0
)
//
this.dateChoose(item,item.priceStockList[0],0)
}
else
{
uni
.
showToast
({
title
:
'没有库存'
,
icon
:
'none'
})
this
.
maxBookNum
=
0
return
}
}
if
(
this
.
showTelephone
)
{
//需要填写联系人信息和手机号码
this
.
getContactList
()
}
this
.
getContactList
()
this
.
computedPrice
()
//计算价格
//解决初始化日期不显示的情况
this
.
$forceUpdate
()
...
...
@@ -1093,7 +1085,7 @@ export default {
return
}
}
if
(
item
.
chooseContact
.
length
!=
item
.
contactNum
){
if
(
item
.
tripTemplateFlag
!=
2
&&
item
.
chooseContact
.
length
!=
item
.
contactNum
){
uni
.
showToast
({
title
:
item
.
merchantName
+
'需要添加'
+
item
.
contactNum
+
'位出行人'
,
icon
:
'none'
...
...
@@ -1101,16 +1093,13 @@ export default {
return
}
}
if
(
this
.
showTelephone
)
{
//需要填写电话号码
if
(
!
this
.
$commonjs
.
phoneReg
().
test
(
this
.
ticketPhone
))
{
//未填写正确手机号码
uni
.
showToast
({
title
:
'请填写正确的手机号码'
,
icon
:
'none'
})
return
}
if
(
!
this
.
$commonjs
.
phoneReg
().
test
(
this
.
ticketPhone
))
{
//未填写正确手机号码
uni
.
showToast
({
title
:
'请填写正确的手机号码'
,
icon
:
'none'
})
return
}
this
.
preOrder
()
},
...
...
pages/scenic/scenicComponents/contactList.vue
View file @
b7b3bbfc
...
...
@@ -28,9 +28,9 @@
</view>
<view>
<text>
身份证
证件号
</text>
{{
item
.
credentialNumber
?
item
.
credentialNumber
.
substr
(
0
,
3
)
+
"****"
+
item
.
credentialNumber
.
substr
(
1
4
,
4
):
"无"
}}
{{
item
.
credentialNumber
?
item
.
credentialNumber
.
substr
(
0
,
3
)
+
"****"
+
item
.
credentialNumber
.
substr
(
item
.
credentialNumber
.
length
-
4
,
4
):
"无"
}}
</view>
<view>
<text>
...
...
pages/scenic/scenicComponents/editContacts -new.vue
0 → 100644
View file @
b7b3bbfc
<
template
>
<view
class=
"edit-bg"
v-show=
"showPop"
>
<view
class=
"edit-wrap"
>
<view
class=
"return"
@
click=
"showPop = false"
>
<view>
新增/编辑联系人
</view>
<view
class=
"return-icon"
>
<u-icon
name=
"close"
bold
></u-icon>
</view>
</view>
<view
class=
"editTop"
>
</view>
<view
class=
"editBottom"
>
<view
class=
"bottomContent"
>
<view>
<text
class=
"bottom-title"
>
姓名
</text>
<input
v-model
.
trim=
"name"
placeholder=
"请输入姓名,必填"
/>
</view>
<view
@
click=
"showIdType=true"
v-if=
"credentialList.length>1"
>
<text
class=
"bottom-title"
>
证件类型
</text>
<text
style=
"flex: 1;"
v-if=
"credentialType==0"
>
身份证
</text>
<text
style=
"flex: 1;"
v-if=
"credentialType==1"
>
护照
</text>
<text
style=
"flex: 1;"
v-if=
"credentialType==2"
>
港澳通行证
</text>
<text
style=
"flex: 1;"
v-if=
"credentialType==3"
>
台胞通行证
</text>
<text
style=
"flex: 1;"
v-if=
"credentialType==4"
>
台胞证
</text>
<text
style=
"flex: 1;"
v-if=
"credentialType==5"
>
回乡证
</text>
<text
style=
"flex: 1;"
v-if=
"credentialType==6"
>
外国人永久居留证
</text>
<text
style=
"flex: 1;"
v-if=
"credentialType==7"
>
学生证
</text>
<text
style=
"flex: 1;"
v-if=
"credentialType==8"
>
军官证
</text>
<text
style=
"flex: 1;"
v-if=
"credentialType==9"
>
残疾军人证
</text>
<u-icon
name=
"arrow-right"
size=
'26'
color=
'#B4B4B4'
></u-icon>
</view>
<view>
<text
class=
"bottom-title"
>
证件号
</text>
<input
v-model
.
trim=
"credentialNumber"
placeholder=
"请输入证件号码,必填"
/>
</view>
<view>
<text
class=
"bottom-title"
>
联系电话
</text>
<input
type=
"number"
v-model
.
trim=
"phone"
maxlength=
"11"
placeholder=
"用于接收行程信息"
/>
</view>
<view>
<text
class=
"complete"
@
click=
"keepSave()"
>
完成
</text>
</view>
</view>
</view>
</view>
<!-- 证件类型弹窗 -->
<u-popup
:show=
"showIdType"
:round=
"20"
@
close=
"showIdType = false"
closeable
>
<view
style=
"padding: 24rpx;"
>
<view
style=
"text-align: center;padding-bottom:20rpx;"
>
证件类型
</view>
<view
v-for=
"(item,index) in credentialList"
:key=
'index'
class=
"idList"
@
click=
"chooseCredential(item)"
>
<text
v-if=
"item==0"
>
身份证
</text>
<text
v-if=
"item==1"
>
护照
</text>
<text
v-if=
"item==2"
>
港澳通行证
</text>
<text
v-if=
"item==3"
>
台胞通行证
</text>
<text
v-if=
"item==4"
>
台胞证
</text>
<text
v-if=
"item==5"
>
回乡证
</text>
<text
v-if=
"item==6"
>
外国人永久居留证
</text>
<text
v-if=
"item==7"
>
学生证
</text>
<text
v-if=
"item==8"
>
军官证
</text>
<text
v-if=
"item==9"
>
残疾军人证
</text>
<u-icon
name=
'checkmark'
size=
'48'
color=
'#3688FF'
v-if=
"credentialType==item"
></u-icon>
</view>
</view>
</u-popup>
</view>
</
template
>
<
script
>
export
default
{
props
:
[
'editContactData'
,
'credential'
],
data
()
{
return
{
showPop
:
false
,
//控制组件显示隐藏
name
:
''
,
//姓名
credentialNumber
:
''
,
//身份证号
phone
:
''
,
//手机号码
reviseContactId
:
''
,
//被修改人id
showIdType
:
false
,
//证件类型弹窗显示隐藏
credentialList
:[],
//证件类型列表
credentialType
:
0
,
//选中的证件类型,默认身份证
}
},
watch
:
{
editContactData
:
{
handler
(
newValue
,
oldValue
)
{
this
.
name
=
newValue
.
name
||
''
this
.
credentialNumber
=
newValue
.
credentialNumber
||
''
this
.
reviseContactId
=
newValue
.
id
||
''
this
.
phone
=
newValue
.
phone
||
''
this
.
credentialType
=
newValue
.
credentialType
||
0
},
deep
:
true
,
immediate
:
true
},
credential
:
{
handler
(
newValue
,
oldValue
)
{
if
(
newValue
){
this
.
credentialList
=
newValue
.
split
(
','
)
}
},
deep
:
true
,
immediate
:
true
}
},
methods
:
{
//---选择证件类型
chooseCredential
(
item
){
this
.
credentialType
=
item
this
.
showIdType
=
false
},
//---保存
keepSave
()
{
if
(
!
this
.
name
){
uni
.
showToast
({
title
:
'请输入姓名'
,
icon
:
'none'
})
return
}
if
(
!
this
.
credentialNumber
){
uni
.
showToast
({
title
:
'请输入证件号码'
,
icon
:
'none'
})
return
}
if
(
this
.
phone
&&!
this
.
$commonjs
.
phoneReg
().
test
(
this
.
phone
))
{
uni
.
showToast
({
title
:
'请输入正确电话号码'
,
icon
:
'none'
})
return
}
let
data
=
{
name
:
this
.
name
,
//保存姓名
phone
:
this
.
phone
,
//电话号码
credentialNumber
:
this
.
credentialNumber
,
//身份证号
openid
:
uni
.
getStorageSync
(
'openid'
),
//用户Id
merchantType
:
1
,
//商户类型,1.景区,2.酒店,3.餐饮
id
:
this
.
reviseContactId
,
//被修改人id
category
:
''
,
//成人或者儿童
credentialType
:
this
.
credentialType
,
//证件类型
}
let
queryUrl
=
''
if
(
this
.
reviseContactId
){
queryUrl
=
'wechatUser/contact/updateContact'
}
else
{
queryUrl
=
'wechatUser/contact/saveContact'
}
this
.
$request
(
queryUrl
,
data
).
then
((
res
)
=>
{
if
(
res
.
code
==
'00'
)
{
uni
.
showToast
({
title
:
'保存成功'
,
icon
:
'none'
})
if
(
!
this
.
reviseContactId
){
//新增的时候
this
.
$parent
.
addChoose
()
//显示联系人列表弹窗
this
.
$parent
.
$refs
.
contactList
.
showPop
=
true
//成功之后清空数据,防止下次新增的时候出现之前的数据
this
.
name
=
''
this
.
credentialNumber
=
''
this
.
phone
=
''
this
.
credentialType
=
0
}
else
{
this
.
$parent
.
getContactList
()
}
//关闭当前弹窗
this
.
showPop
=
false
}
else
{
uni
.
showToast
({
title
:
res
.
message
,
icon
:
'none'
})
}
})
}
}
}
</
script
>
<
style
scoped=
"scoped"
lang=
"scss"
>
.edit-bg
{
background
:rgba
(
0
,
0
,
0
,
0
.4
)
;
position
:
fixed
;
top
:
0
;
left
:
0
;
right
:
0
;
bottom
:
0
;
z-index
:
1000
;
padding-top
:
100rpx
;
}
.edit-wrap
{
height
:
100%
;
display
:
flex
;
flex-direction
:
column
;
background
:
#ffffff
;
border-radius
:
20rpx
;
}
.return
{
height
:
100rpx
;
display
:
flex
;
align-items
:
center
;
background
:
#FFF1E8
;
color
:
#FC771D
;
justify-content
:
center
;
font-weight
:
bold
;
font-size
:
32rpx
;
position
:
relative
;
border-radius
:
20rpx
20rpx
0
0
;
}
.return-icon
{
position
:
absolute
;
right
:
24rpx
;
}
.editTop
{
height
:
200rpx
;
background
:
linear-gradient
(
to
bottom
,
#2984ef
,
#d8eaf6
);
}
.editBottom
{
position
:
relative
;
top
:
-80rpx
;
padding
:
0
20rpx
;
}
.bottomContent
{
border-radius
:
20rpx
;
background
:
#FFFFFF
;
padding
:
20rpx
20rpx
60rpx
20rpx
;
}
.bottomContent
view
{
height
:
100rpx
;
align-items
:
center
;
display
:
flex
;
border-bottom
:
1px
solid
#f0f0f0
;
}
.bottom-title
{
display
:
inline-block
;
width
:
140rpx
;
text-align-last
:
justify
;
margin-right
:
20rpx
;
}
.bottomContent
view
input
{
flex
:
1
;
}
.bottomContent
view
:last-child
{
margin-top
:
60rpx
;
border
:
none
;
}
.complete
{
width
:
100%
;
height
:
70rpx
;
border-radius
:
16rpx
;
color
:
#FFFFFF
;
text-align
:
center
;
line-height
:
70rpx
;
background
:
$theme
;
display
:
inline-block
;
}
.idList
{
display
:
flex
;
justify-content
:
space-between
;
height
:
100rpx
;
align-items
:
center
;
border-bottom
:
1px
solid
#f3f3f3
;
}
</
style
>
pages/scenic/scenicProduct/scenicProduct-new.vue
0 → 100644
View file @
b7b3bbfc
<
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/scenicSingleOrder/scenicSingleOrder.vue
View file @
b7b3bbfc
...
...
@@ -228,8 +228,8 @@
</view>
<!-- ---------------------------------------------游客信息-------------------------------------------- -->
<view
class=
"middle-bottom"
v-if=
"productIfo.tripTemplateFlag != 2"
>
<view
class=
"middle-visitor"
>
<view
class=
"middle-bottom"
>
<view
class=
"middle-visitor"
v-if=
"productIfo.tripTemplateFlag != 2"
>
<view
class=
"visitorTitle"
>
<text
class=
"title-text"
>
用户信息
</text>
<text>
...
...
@@ -273,7 +273,7 @@
</view>
<view>
{{
item
.
credentialNumber
?
item
.
credentialNumber
.
substr
(
0
,
3
)
+
'****'
+
item
.
credentialNumber
.
substr
(
1
4
,
4
)
:
''
}}
{{
item
.
credentialNumber
?
item
.
credentialNumber
.
substr
(
0
,
3
)
+
'****'
+
item
.
credentialNumber
.
substr
(
item
.
credentialNumber
.
length
-
4
,
4
)
:
''
}}
</view>
<view
@
click=
"showEdit(item)"
>
...
...
@@ -283,7 +283,7 @@
</view>
</view>
<view
class=
"middle-phone"
v-if=
"productIfo.tripTemplateFlag != 2"
>
<view
class=
"middle-phone"
>
<text>
联系电话:
</text>
<input
type=
"number"
maxlength=
"11"
placeholder=
"请输入联系电话"
v-model
.
trim=
"ticketPhone"
/>
</view>
...
...
@@ -344,7 +344,7 @@
:defaultAreaCode=
"defaultAreaCode"
></chooseArea>
<times
ref=
"times"
:chooseTimeList=
"timeList"
@
timeConfig=
"timeConfig"
:timeActive=
"timeActive"
></times>
<editContacts
ref=
"editContacts"
:editContactData=
"editContactData"
></editContacts>
<editContacts
ref=
"editContacts"
:editContactData=
"editContactData"
:credential=
'productIfo.credential'
></editContacts>
<contactList
ref=
"contactList"
:contactTotal=
"contactTotal"
...
...
@@ -597,7 +597,7 @@ export default {
this
.
sortUpDown
()
}
if
(
this
.
productIfo
.
tripTemplateFlag
!=
2
)
{
//等于2时不需要填写联系人信息
和手机号码
//等于2时不需要填写联系人信息
this
.
getContactList
()
}
if
(
this
.
dateList
.
length
==
1
&&
this
.
beforeBookDays
==
0
)
{
...
...
@@ -851,6 +851,24 @@ export default {
this
.
contactTotal
.
sort
(
function
(
a
,
b
)
{
return
b
.
ifChoose
-
a
.
ifChoose
})
//先组成一个新的数组,把选中的联系人重新排序,用于找到选中联系人的第一个
let
newArr
=
[]
this
.
contactTotal
.
forEach
(
item2
=>
{
this
.
chooseContact
.
forEach
(
item3
=>
{
if
(
item2
.
id
==
item3
.
id
){
newArr
.
push
(
item2
)
}
})
})
//找到选中联系人的第一个有号码的联系人,取电话号码
let
phoneObj
=
newArr
.
find
(
item2
=>
{
return
item2
.
phone
})
if
(
phoneObj
){
this
.
ticketPhone
=
phoneObj
.
phone
}
else
{
this
.
ticketPhone
=
''
}
},
//---游客选择
visitorChoose
(
i
)
{
...
...
@@ -874,6 +892,24 @@ export default {
})
this
.
chooseContact
.
splice
(
index
,
1
)
//删除数组
}
//先组成一个新的数组,把选中的联系人重新排序,用于找到选中联系人的第一个
let
newArr
=
[]
this
.
contactTotal
.
forEach
(
item2
=>
{
this
.
chooseContact
.
forEach
(
item3
=>
{
if
(
item2
.
id
==
item3
.
id
){
newArr
.
push
(
item2
)
}
})
})
//找到选中联系人的第一个有号码的联系人,取电话号码
let
phoneObj
=
newArr
.
find
(
item2
=>
{
return
item2
.
phone
})
if
(
phoneObj
){
this
.
ticketPhone
=
phoneObj
.
phone
}
else
{
this
.
ticketPhone
=
''
}
},
//---订单数量变化
buyNumChange
(
e
)
{
...
...
@@ -1086,6 +1122,59 @@ export default {
},
//---点击去支付
goPay
()
{
if
(
this
.
dateList
.
length
==
0
)
{
//价格库存为空时,点击无效
return
}
if
(
this
.
productIfo
.
status
==
1
)
{
//下架状态,点击无效
return
}
if
(
this
.
productIfo
.
isFetch
==
1
&&
this
.
areaUp
)
{
//需要选择站点的票种,必须选择站点
if
(
!
this
.
areaObj
.
areaCode
)
{
uni
.
showToast
({
title
:
'请选择站点'
,
icon
:
'none'
})
return
}
}
if
(
!
this
.
startDate
||
!
this
.
endDate
)
{
uni
.
showToast
({
title
:
'请选择游玩日期'
,
icon
:
'none'
})
return
}
if
(
this
.
productIfo
.
productType
==
3
)
{
//如果为班次票,需要选择班次
if
(
this
.
cruisePlanId
==
''
)
{
uni
.
showToast
({
title
:
'该票为班次票,请选择游玩时间'
,
icon
:
'none'
})
return
}
}
if
(
this
.
productIfo
.
tripTemplateFlag
!=
2
)
{
//等于2不需要填写联系人
if
(
this
.
chooseContact
.
length
!=
this
.
contactNum
)
{
uni
.
showToast
({
title
:
'需要添加'
+
this
.
contactNum
+
'位出行人'
,
icon
:
'none'
})
return
}
}
if
(
!
this
.
$commonjs
.
phoneReg
().
test
(
this
.
ticketPhone
))
{
//未填写正确手机号码
uni
.
showToast
({
title
:
'请填写正确的手机号码'
,
icon
:
'none'
})
return
}
if
(
this
.
serviceList
.
length
==
0
)
{
//没有额外服务,直接支付
this
.
placeOrder
()
...
...
@@ -1097,56 +1186,6 @@ export default {
}
}
if
(
this
.
serviceList
.
length
>
0
)
{
//有额外服务,没有选中额外服务的,弹出提示框
if
(
this
.
productIfo
.
tripTemplateFlag
!=
2
)
{
if
(
!
this
.
$commonjs
.
phoneReg
().
test
(
this
.
ticketPhone
))
{
//未填写正确手机号码
uni
.
showToast
({
title
:
'请填写正确的手机号码'
,
icon
:
'none'
})
return
}
}
if
(
this
.
productIfo
.
tripTemplateFlag
==
1
)
{
//实名制
if
(
this
.
chooseContact
.
length
!=
this
.
buyNum
)
{
uni
.
showToast
({
title
:
'需要添加'
+
this
.
buyNum
+
'位出行人'
,
icon
:
'none'
})
return
}
}
else
if
(
this
.
productIfo
.
tripTemplateFlag
==
0
)
{
//非实名制
if
(
this
.
chooseContact
.
length
<
1
)
{
uni
.
showToast
({
title
:
'需要添加一位出行人'
,
icon
:
'none'
})
return
}
}
if
(
this
.
productIfo
.
productType
==
3
)
{
//如果为班次票,需要选择班次
if
(
this
.
cruisePlanId
==
''
)
{
uni
.
showToast
({
title
:
'该票为班次票,请选择游玩时间'
,
icon
:
'none'
})
return
}
}
if
(
this
.
productIfo
.
isFetch
==
1
&&
this
.
areaUp
)
{
//需要选择站点的票种,必须选择站点
if
(
!
this
.
areaObj
.
areaCode
)
{
uni
.
showToast
({
title
:
'请选择站点'
,
icon
:
'none'
})
return
}
}
if
(
this
.
chooseService
.
length
==
0
&&
this
.
showErmai
)
{
//没有购买额外服务,并且选择的北站,跳出弹窗
this
.
showExtraPop
=
true
...
...
@@ -1159,69 +1198,13 @@ export default {
},
//---下单
placeOrder
()
{
if
(
this
.
dateList
.
length
==
0
)
{
//价格库存为空时,点击无效
return
}
if
(
this
.
productIfo
.
status
==
1
)
{
//下架状态,点击无效
return
}
if
(
this
.
productIfo
.
isFetch
==
1
&&
this
.
areaUp
)
{
//需要选择站点的票种,必须选择站点
if
(
!
this
.
areaObj
.
areaCode
)
{
uni
.
showToast
({
title
:
'请选择站点'
,
icon
:
'none'
})
return
}
}
if
(
!
this
.
startDate
||
!
this
.
endDate
)
{
uni
.
showToast
({
title
:
'请选择游玩日期'
,
icon
:
'none'
})
return
}
if
(
this
.
productIfo
.
productType
==
3
)
{
//如果为班次票,需要选择班次
if
(
this
.
cruisePlanId
==
''
)
{
uni
.
showToast
({
title
:
'该票为班次票,请选择游玩时间'
,
icon
:
'none'
})
return
}
}
if
(
this
.
chooseContact
.
length
!=
this
.
contactNum
)
{
uni
.
showToast
({
title
:
'需要添加'
+
this
.
contactNum
+
'位出行人'
,
icon
:
'none'
})
return
}
if
(
this
.
productIfo
.
tripTemplateFlag
!=
2
)
{
//需要填写电话号码
if
(
!
this
.
$commonjs
.
phoneReg
().
test
(
this
.
ticketPhone
)
&&
this
.
productIfo
.
tripTemplateFlag
!=
2
)
{
//未填写正确手机号码
uni
.
showToast
({
title
:
'请填写正确的手机号码'
,
icon
:
'none'
})
return
}
}
this
.
preOrder
()
},
//---预下单
preOrder
()
{
//参数游客信息组装
let
orderTouristList
=
this
.
chooseContact
.
map
((
item
)
=>
{
return
{
category
:
0
,
name
:
item
.
name
,
credentialNumber
:
item
.
credentialNumber
credentialNumber
:
item
.
credentialNumber
,
// credentialType:item.credentialType||0,//证件类型
}
})
...
...
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