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
6a4aa882
Commit
6a4aa882
authored
Dec 19, 2023
by
潘永坪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
组合下单bug处理
parent
0a6553e9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
43 deletions
+30
-43
pages.json
pages.json
+9
-9
scenicCombiOrder.vue
pages/scenic/scenicCombiOrder/scenicCombiOrder.vue
+13
-15
scenicOrder.vue
pages/scenic/scenicOrder/scenicOrder.vue
+8
-19
No files found.
pages.json
View file @
6a4aa882
...
...
@@ -331,15 +331,15 @@
"navigationBarTextStyle"
:
"black"
}
},
//
{
//
"path"
:
"vlogface/vlogface"
,
//
"style"
:
{
//
"navigationBarTitleText"
:
"扫脸获取视频"
,
//
"enablePullDownRefresh"
:
false
,
//
"navigationBarBackgroundColor"
:
"#ffffff"
,
//
"navigationBarTextStyle"
:
"black"
//
}
//
},
{
"path"
:
"vlogface/vlogface"
,
"style"
:
{
"navigationBarTitleText"
:
"扫脸获取视频"
,
"enablePullDownRefresh"
:
false
,
"navigationBarBackgroundColor"
:
"#ffffff"
,
"navigationBarTextStyle"
:
"black"
}
},
{
"path"
:
"scenicList/scenicList"
,
"style"
:
{
...
...
pages/scenic/scenicCombiOrder/scenicCombiOrder.vue
View file @
6a4aa882
...
...
@@ -432,7 +432,6 @@ export default {
if
(
item
.
tripTemplateFlag
!=
2
){
this
.
showTelephone
=
true
}
item
.
dateActive
=
0
//默认选中第一个日期
item
.
buyNum
=
1
,
//默认为1
item
.
chooseContact
=
[]
//选中的游客信息列表
item
.
contactNum
=
1
//需要选择几位联系人数量
...
...
@@ -505,13 +504,6 @@ export default {
this
.
maxBookNum
=
0
return
}
//下面参数是默认选择每个产品第一个日期的值
item
.
chooseDate
=
item
.
priceStockList
[
0
].
startTime
.
substr
(
0
,
10
)
//日历选中的日期
item
.
startDate
=
item
.
priceStockList
[
0
].
startTime
//开始日期
item
.
endDate
=
item
.
priceStockList
[
0
].
endTime
//结束日期
item
.
originalPrice
=
item
.
priceStockList
[
0
].
originalPrice
//原价
item
.
sellingPrice
=
item
.
priceStockList
[
0
].
sellingPrice
//卖价
item
.
maxBookNum
=
Math
.
min
(
item
.
priceStockList
[
0
].
surplus
,
item
.
maxBookNum
)
//最大购买数量
item
.
priceStockList
.
forEach
(
item2
=>
{
//循环单个产品的价格列表
item2
.
week
=
'日一二三四五六'
.
charAt
(
new
Date
(
item2
.
startTime
.
substr
(
0
,
10
)).
getDay
())
if
(
item2
.
startTime
.
substr
(
0
,
10
)
==
today
){
...
...
@@ -524,17 +516,14 @@ export default {
item2
.
week
=
'后天'
}
})
//如果是班次票,并且班次票价格列表不为空
if
(
item
.
productType
==
3
&&
item
.
priceStockList
.
length
>
0
){
this
.
getTimeStock
(
item
)
}
//获取优惠券
this
.
initCoupon
(
item
)
//需要排号
if
(
item
.
isFetch
==
1
){
this
.
areaIndex
=
index
this
.
sortUpDown
(
item
.
merchantVo
.
code
)
}
//默认选择每个产品第一个日期的值
this
.
dateChoose
(
item
,
item
.
priceStockList
[
0
],
0
)
}
else
{
uni
.
showToast
({
title
:
'没有库存'
,
icon
:
'none'
})
this
.
maxBookNum
=
0
...
...
@@ -753,7 +742,16 @@ export default {
//---日期选择---已改
dateChoose
(
item
,
item2
,
index
)
{
item
.
dateActive
=
index
//修改选中样式
this
.
maxBookNum
=
999
//默认可以去支付
item
.
maxBookNum
=
Math
.
min
(
item2
.
maxBookNum
,
item2
.
surplus
)
//剩余量变化
for
(
let
i
=
0
;
i
<
this
.
productList
.
length
;
i
++
){
let
item
=
this
.
productList
[
i
]
//任何一个产品无库存时,无法进行支付
if
(
parseFloat
(
item
.
maxBookNum
)
<
1
){
this
.
maxBookNum
=
0
return
}
}
item
.
originalPrice
=
item2
.
originalPrice
//产品原价为当前选中日期的原价
item
.
sellingPrice
=
item2
.
sellingPrice
//产品卖价为当前选中日期的卖价
item
.
chooseDate
=
item2
.
startTime
.
substr
(
0
,
10
)
...
...
@@ -1032,7 +1030,7 @@ export default {
})
return
}
//
由于默认购买数量为1,没有判断产品的最大购买数量是否大于等于1,故下单的时候需要判断产品的
最大购买数量大于1,才可以下单
//最大购买数量大于1,才可以下单
if
(
parseFloat
(
item
.
maxBookNum
)
<
1
){
uni
.
showToast
({
title
:
item
.
merchantName
+
'没有库存'
,
...
...
pages/scenic/scenicOrder/scenicOrder.vue
View file @
6a4aa882
...
...
@@ -407,7 +407,6 @@ export default {
showErmai
:
true
,
//临时的,选择了南站不显示耳麦
showArea
:
false
,
//控制选择站点显示隐藏
areaUp
:
false
,
//排号是否上架
chooseDate
:
''
,
//选择的日期
active
:
10000
,
//日期下标
timeActive
:
10000
,
//时间下标,默认不选中
buyNum
:
1
,
//订单数量
...
...
@@ -593,27 +592,18 @@ export default {
this
.
maxBookNum
=
0
return
}
if
(
this
.
dateList
.
length
==
1
&&
this
.
beforeBookDays
==
0
)
{
//长度为1而且只能预订当天,默认选中
this
.
maxBookNum
=
Math
.
min
(
this
.
dateList
[
0
].
surplus
,
this
.
productIfo
.
maxBookNum
)
//剩余量
this
.
startDate
=
this
.
dateList
[
0
].
startTime
//开始日期
this
.
endDate
=
this
.
dateList
[
0
].
endTime
//结束日期
this
.
originalPrice
=
this
.
dateList
[
0
].
originalPrice
//原价
this
.
sellingPrice
=
this
.
dateList
[
0
].
sellingPrice
//卖价
this
.
active
=
0
if
(
this
.
productIfo
.
productType
==
3
)
{
//如果为班次票,请求班次票接口
this
.
getTimeStock
()
}
//获取优惠券
this
.
initCoupon
()
}
if
(
this
.
productIfo
.
isFetch
==
1
)
{
this
.
sortUpDown
()
}
if
(
this
.
productIfo
.
tripTemplateFlag
!=
2
)
{
//等于2时不需要填写联系人信息和手机号码
this
.
getContactList
()
}
if
(
this
.
dateList
.
length
==
1
&&
this
.
beforeBookDays
==
0
)
{
//长度为1而且只能预订当天,默认选中
this
.
$nextTick
(()
=>
{
this
.
dateChoose
(
0
)
})
}
}
else
{
uni
.
showToast
({
...
...
@@ -788,11 +778,10 @@ export default {
this
.
active
=
index
//修改选中样式
this
.
maxBookNum
=
Math
.
min
(
this
.
dateList
[
index
].
surplus
,
this
.
productIfo
.
maxBookNum
)
//剩余量变化
this
.
originalPrice
=
this
.
dateList
[
index
].
originalPrice
//原价变化
this
.
sellingPrice
=
this
.
dateList
[
index
].
sellingPrice
//卖家变化
this
.
chooseDate
=
this
.
dateList
[
index
].
startTime
.
substr
(
0
,
10
)
//日历组件选中日期
this
.
sellingPrice
=
this
.
dateList
[
index
].
sellingPrice
//卖价变化
this
.
endDate
=
this
.
dateList
[
index
].
endTime
//开始日期
this
.
startDate
=
this
.
dateList
[
index
].
startTime
//结束日期
this
.
$refs
.
calendar
.
defaultDate
=
this
.
chooseDate
this
.
$refs
.
calendar
.
defaultDate
=
this
.
dateList
[
index
].
startTime
.
substr
(
0
,
10
)
//日历组件选中日期
if
(
this
.
productIfo
.
productType
==
3
)
{
//如果为班次票,点击时,请求班次票接口
this
.
cruisePlanId
=
''
//清空班次id
...
...
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