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
0396f0b8
Commit
0396f0b8
authored
Mar 05, 2024
by
潘永坪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
单产品代码优化
parent
66533f99
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
57 deletions
+53
-57
scenicSingleOrder.vue
pages/scenic/scenicSingleOrder/scenicSingleOrder.vue
+53
-57
No files found.
pages/scenic/scenicSingleOrder/scenicSingleOrder.vue
View file @
0396f0b8
...
...
@@ -1122,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
()
...
...
@@ -1145,63 +1198,6 @@ 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
.
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
}
this
.
preOrder
()
},
//---预下单
preOrder
()
{
//参数游客信息组装
let
orderTouristList
=
this
.
chooseContact
.
map
((
item
)
=>
{
return
{
...
...
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