Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gxpt_wechat
Overview
Overview
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
pseer
gxpt_wechat
Commits
b36dbad3
Commit
b36dbad3
authored
Jan 02, 2024
by
zhangzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
细节优化
parent
21e2f630
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
63 additions
and
24 deletions
+63
-24
order.vue
pages/order/order.vue
+59
-24
orderResult.vue
pages/orderResult/orderResult.vue
+4
-0
No files found.
pages/order/order.vue
View file @
b36dbad3
...
@@ -130,7 +130,7 @@
...
@@ -130,7 +130,7 @@
<view
class=
"part-1"
>
<view
class=
"part-1"
>
<button
class=
"cu-btn round"
:class=
"orderType===1?'line-black':'line-gray'"
<button
class=
"cu-btn round"
:class=
"orderType===1?'line-black':'line-gray'"
@
tap=
"onSelectDate"
>
@
tap=
"onSelectDate"
>
<text>
{{
startTime
}}
</text>
<text>
{{
startTime
|
resetStartTime
}}
</text>
<text
class=
"cuIcon-edit"
></text>
<text
class=
"cuIcon-edit"
></text>
</button>
</button>
</view>
</view>
...
@@ -422,21 +422,7 @@
...
@@ -422,21 +422,7 @@
],
],
// 套餐
// 套餐
modeIndex
:
0
,
modeIndex
:
0
,
packageMode
:
[{
packageMode
:
[],
id
:
''
,
label
:
"优惠套餐1"
,
duration
:
4
,
originalPrice
:
100
,
realPrice
:
78
},
{
id
:
''
,
label
:
"优惠套餐2"
,
duration
:
8
,
originalPrice
:
200
,
realPrice
:
138
}
],
// 原数据
// 原数据
dateIntervalList
:
[],
dateIntervalList
:
[],
intervalList
:
[],
intervalList
:
[],
...
@@ -477,6 +463,18 @@
...
@@ -477,6 +463,18 @@
}
}
};
};
},
},
filters
:{
resetStartTime
(
val
){
let
time
=
null
;
let
hour
=
val
.
split
(
':'
)
if
(
hour
>=
24
){
time
=
`
${
hour
-
24
}
:00`
}
else
{
time
=
val
}
return
time
;
}
},
onLoad
(
option
)
{
onLoad
(
option
)
{
uni
.
showLoading
({
uni
.
showLoading
({
title
:
"加载中"
title
:
"加载中"
...
@@ -562,6 +560,8 @@
...
@@ -562,6 +560,8 @@
}).
then
(
res
=>
{
}).
then
(
res
=>
{
uni
.
hideLoading
()
uni
.
hideLoading
()
// orderType 订单类型
if
(
this
.
orderType
===
1
)
{
if
(
this
.
orderType
===
1
)
{
if
(
this
.
index
==
1
){
if
(
this
.
index
==
1
){
this
.
duration
=
Number
(
this
.
packageMode
[
this
.
modeIndex
].
duration
);
this
.
duration
=
Number
(
this
.
packageMode
[
this
.
modeIndex
].
duration
);
...
@@ -579,7 +579,7 @@
...
@@ -579,7 +579,7 @@
if
(
item
.
status
==
1
&&
this
.
setStartTime
.
duration
<
this
.
duration
&&
moment
(
item
.
endHoldTime
).
format
(
"mm"
)
<
59
){
if
(
item
.
status
==
1
&&
this
.
setStartTime
.
duration
<
this
.
duration
&&
moment
(
item
.
endHoldTime
).
format
(
"mm"
)
<
59
){
this
.
setStartTime
.
startTime
=
moment
(
item
.
endHoldTime
).
format
(
"HH:mm"
);
this
.
setStartTime
.
startTime
=
moment
(
item
.
endHoldTime
).
format
(
"HH:mm"
);
if
(
index
>=
24
){
if
(
index
>=
24
){
this
.
setStartTime
.
days
=
2
this
.
setStartTime
.
days
=
2
;
}
}
this
.
setStartTime
.
duration
=
0
;
this
.
setStartTime
.
duration
=
0
;
this
.
setStartTime
.
status
=
true
;
this
.
setStartTime
.
status
=
true
;
...
@@ -602,9 +602,6 @@
...
@@ -602,9 +602,6 @@
}
else
if
(
item
.
status
===
0
&&
this
.
setStartTime
.
duration
===
0
&&
!
this
.
setStartTime
.
status
){
}
else
if
(
item
.
status
===
0
&&
this
.
setStartTime
.
duration
===
0
&&
!
this
.
setStartTime
.
status
){
this
.
setStartTime
.
duration
+=
1
;
this
.
setStartTime
.
duration
+=
1
;
this
.
setStartTime
.
startTime
=
`
${
index
}
:00`
;
this
.
setStartTime
.
startTime
=
`
${
index
}
:00`
;
if
(
index
>=
24
){
this
.
setStartTime
.
days
=
2
}
this
.
setStartTime
.
status
=
true
;
this
.
setStartTime
.
status
=
true
;
}
else
if
(
item
.
status
===
0
&&
this
.
setStartTime
.
duration
>=
0
&&
this
.
setStartTime
.
duration
<
this
.
duration
&&
this
.
setStartTime
.
status
){
}
else
if
(
item
.
status
===
0
&&
this
.
setStartTime
.
duration
>=
0
&&
this
.
setStartTime
.
duration
<
this
.
duration
&&
this
.
setStartTime
.
status
){
this
.
setStartTime
.
duration
+=
1
;
this
.
setStartTime
.
duration
+=
1
;
...
@@ -725,7 +722,6 @@
...
@@ -725,7 +722,6 @@
}
}
}
}
this
.
$forceUpdate
();
this
.
$forceUpdate
();
setTimeout
(()
=>
{
setTimeout
(()
=>
{
if
(
!
this
.
useDateStatus
)
{
if
(
!
this
.
useDateStatus
)
{
uni
.
showToast
({
uni
.
showToast
({
...
@@ -830,8 +826,48 @@
...
@@ -830,8 +826,48 @@
},
},
onChangeMode
(
i
)
{
onChangeMode
(
i
)
{
if
(
this
.
modeIndex
===
i
)
return
;
if
(
this
.
modeIndex
===
i
)
return
;
this
.
modeIndex
=
i
this
.
modeIndex
=
i
;
this
.
onSetEndTime
()
let
val
=
this
.
intervalList
.
findIndex
(
item
=>
item
.
status
===
2
)
let
len
=
this
.
intervalList
.
filter
(
item
=>
item
.
status
===
2
).
length
;
let
duration
=
Number
(
this
.
packageMode
[
this
.
modeIndex
].
duration
);
let
start
=
Number
(
this
.
startTime
.
split
(
":"
)[
0
])
let
startM
=
Number
(
this
.
startTime
.
split
(
":"
)[
1
])
let
h
=
val
;
if
(
val
+
duration
>=
24
){
h
=
val
+
duration
-
24
}
else
{
h
=
val
+
duration
}
this
.
endTime
=
`
${
h
>=
10
?
h
:
'0'
+
h
}
:
${
startM
}
`
;
this
.
dateObj
=
this
.
onSetDateTime
(
this
.
startTime
,
this
.
endTime
);
let
showHourUse
=
false
;
this
.
intervalList
=
this
.
intervalList
.
map
((
item
,
index
)
=>
{
let
status
=
item
.
status
;
if
(
index
>=
val
&&
index
<=
val
+
duration
){
status
=
2
if
(
this
.
dateIntervalList
[
index
].
status
===
1
&&
index
!==
val
){
showHourUse
=
true
}
}
else
{
status
=
this
.
dateIntervalList
[
index
].
status
}
return
{
...
item
,
status
}
})
if
(
showHourUse
)
{
uni
.
showToast
({
icon
:
"none"
,
title
:
"选择时段有重复"
})
}
},
},
onDurationChange
(
i
)
{
onDurationChange
(
i
)
{
if
(
i
>=
this
.
distanceMode
.
length
-
1
)
{
if
(
i
>=
this
.
distanceMode
.
length
-
1
)
{
...
@@ -1066,7 +1102,6 @@
...
@@ -1066,7 +1102,6 @@
if
(
i
<
24
)
{
if
(
i
<
24
)
{
if
(
val
.
status
==
1
)
{
if
(
val
.
status
==
1
)
{
let
mTime
=
moment
(
val
.
endHoldTime
).
format
(
"mm"
)
let
mTime
=
moment
(
val
.
endHoldTime
).
format
(
"mm"
)
console
.
log
(
mTime
,
"分钟数据"
)
if
(
mTime
>=
'59'
)
{
if
(
mTime
>=
'59'
)
{
uni
.
showToast
({
uni
.
showToast
({
icon
:
'none'
,
icon
:
'none'
,
...
...
pages/orderResult/orderResult.vue
View file @
b36dbad3
...
@@ -64,6 +64,10 @@
...
@@ -64,6 +64,10 @@
<text
class=
"text-gray"
>
支付方式
</text>
<text
class=
"text-gray"
>
支付方式
</text>
<text
class=
"text-title"
>
{{
orderInfo
.
payType
==
1
?
'微信支付'
:
'其他支付'
}}
</text>
<text
class=
"text-title"
>
{{
orderInfo
.
payType
==
1
?
'微信支付'
:
'其他支付'
}}
</text>
</view>
</view>
<view
v-if=
"orderInfo.couponName && orderInfo.couponId"
class=
"flex-between"
>
<text
class=
"text-gray"
>
优惠券抵扣
</text>
<text
class=
"text-title"
>
{{
orderInfo
.
couponName
}}
</text>
</view>
<view
class=
"flex-between"
>
<view
class=
"flex-between"
>
<text
class=
"text-gray"
>
支付时间
</text>
<text
class=
"text-gray"
>
支付时间
</text>
<text
class=
"text-title"
>
{{
orderInfo
.
payTime
||
'-'
}}
</text>
<text
class=
"text-title"
>
{{
orderInfo
.
payTime
||
'-'
}}
</text>
...
...
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