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
9468ff19
Commit
9468ff19
authored
Jan 12, 2024
by
zhangzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
细节优化
parent
c69f70df
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
6 deletions
+13
-6
couponCheck.vue
pages/couponCheck/couponCheck.vue
+1
-1
order.vue
pages/order/order.vue
+12
-4
index.vue
pages/useCoupon/index.vue
+0
-1
No files found.
pages/couponCheck/couponCheck.vue
View file @
9468ff19
...
@@ -106,7 +106,7 @@
...
@@ -106,7 +106,7 @@
title
:
"券码核验中"
title
:
"券码核验中"
})
})
couponChecked
({
couponChecked
({
code
:
this
.
code
,
code
:
this
.
code
.
split
(
" "
).
join
(
""
)
,
openShopUuid
:
this
.
openShopUuid
openShopUuid
:
this
.
openShopUuid
}).
then
(
res
=>
{
}).
then
(
res
=>
{
console
.
log
(
res
,
909090
)
console
.
log
(
res
,
909090
)
...
...
pages/order/order.vue
View file @
9468ff19
...
@@ -188,7 +188,7 @@
...
@@ -188,7 +188,7 @@
<text
class=
"text-black text-left"
>
{{
useCouponList
[
selectCouponIndex
].
couponType
==
2
?
'团购券'
:
'优惠券'
}}
</text>
<text
class=
"text-black text-left"
>
{{
useCouponList
[
selectCouponIndex
].
couponType
==
2
?
'团购券'
:
'优惠券'
}}
</text>
<view
class=
"flex-row"
@
tap=
"onNavToSelectCoupon"
>
<view
class=
"flex-row"
@
tap=
"onNavToSelectCoupon"
>
<text
class=
""
:class=
"useCouponList.length?'text-pink':'text-gray'"
>
<text
class=
""
:class=
"useCouponList.length?'text-pink':'text-gray'"
>
{{
selectCouponIndex
===
-
1
?
'请选择'
:
useCouponList
.
length
&&
selectCouponIndex
>=
0
?
useCouponList
[
selectCouponIndex
].
name
:
'暂无可用'
}}
</text>
{{
useCouponList
.
length
&&
selectCouponIndex
>=
0
?
useCouponList
[
selectCouponIndex
].
name
:
useCouponList
.
length
?
'请选择'
:
'暂无可用'
}}
</text>
<text
class=
"cuIcon-right "
:class=
"useCouponList.length?'text-pink':'text-gray'"
></text>
<text
class=
"cuIcon-right "
:class=
"useCouponList.length?'text-pink':'text-gray'"
></text>
</view>
</view>
</view>
</view>
...
@@ -196,7 +196,7 @@
...
@@ -196,7 +196,7 @@
<text
class=
"text-black text-left"
>
预约优惠
</text>
<text
class=
"text-black text-left"
>
预约优惠
</text>
<view
class=
"flex-row"
>
<view
class=
"flex-row"
>
<!--
<text
class=
"text-pink text-sm text-bold"
style=
"margin-bottom: 3upx;"
>
{{
computePriceInfo
.
couponFee
>
0
?
'-'
:
''
}}
¥
</text>
-->
<!--
<text
class=
"text-pink text-sm text-bold"
style=
"margin-bottom: 3upx;"
>
{{
computePriceInfo
.
couponFee
>
0
?
'-'
:
''
}}
¥
</text>
-->
<text
class=
"text-pink text-lg text-bold"
>
{{
computePriceInfo
.
couponFee
}}
</text>
<text
class=
"text-pink text-lg text-bold"
>
{{
computePriceInfo
.
couponFee
||
0
}}
</text>
<text>
元
</text>
<text>
元
</text>
</view>
</view>
</view>
</view>
...
@@ -435,7 +435,7 @@
...
@@ -435,7 +435,7 @@
editDuration
:
[],
editDuration
:
[],
checkedCouponInfo
:
''
,
checkedCouponInfo
:
''
,
useDateStatus
:
true
,
useDateStatus
:
true
,
selectCouponIndex
:
0
,
selectCouponIndex
:
-
1
,
useCouponList
:
[],
//可使用的优惠券
useCouponList
:
[],
//可使用的优惠券
computePriceInfo
:
{
computePriceInfo
:
{
couponFee
:
''
,
couponFee
:
''
,
...
@@ -840,11 +840,13 @@
...
@@ -840,11 +840,13 @@
orderType
:
this
.
orderType
,
orderType
:
this
.
orderType
,
packageId
:
this
.
packageMode
[
this
.
modeIndex
].
id
packageId
:
this
.
packageMode
[
this
.
modeIndex
].
id
}).
then
(
res
=>
{
}).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
&&
res
.
data
.
data
.
length
)
{
if
(
res
.
data
&&
res
.
data
.
data
.
length
)
{
this
.
useCouponList
=
res
.
data
.
data
.
filter
(
item
=>
item
.
isAvailable
===
0
).
sort
((
a
,
this
.
useCouponList
=
res
.
data
.
data
.
filter
(
item
=>
item
.
isAvailable
===
0
).
sort
((
a
,
b
)
=>
b
.
subPrice
-
a
.
subPrice
);
b
)
=>
b
.
subPrice
-
a
.
subPrice
);
if
(
this
.
useCouponList
.
length
){
this
.
selectCouponIndex
=
0
;
}
}
}
}
else
if
(
res
.
data
.
code
==
401
)
{
}
else
if
(
res
.
data
.
code
==
401
)
{
this
.
$refs
.
loginPop
.
open
();
this
.
$refs
.
loginPop
.
open
();
...
@@ -873,6 +875,8 @@
...
@@ -873,6 +875,8 @@
roomId
:
that
.
roomInfo
.
id
,
roomId
:
that
.
roomInfo
.
id
,
orderMode
:
that
.
orderTypeList
[
that
.
index
].
type
,
orderMode
:
that
.
orderTypeList
[
that
.
index
].
type
,
preStartDate
:
that
.
dateObj
.
startDate
,
preStartDate
:
that
.
dateObj
.
startDate
,
orderType
:
that
.
orderType
,
packageId
:
that
.
packageMode
[
that
.
modeIndex
].
id
,
preEndDate
:
that
.
dateObj
.
endDate
,
preEndDate
:
that
.
dateObj
.
endDate
,
selectId
:
that
.
selectCouponIndex
>=
0
?
that
.
useCouponList
[
that
.
selectCouponIndex
].
id
:
''
selectId
:
that
.
selectCouponIndex
>=
0
?
that
.
useCouponList
[
that
.
selectCouponIndex
].
id
:
''
})
})
...
@@ -939,6 +943,7 @@
...
@@ -939,6 +943,7 @@
onChangeMode
(
i
)
{
onChangeMode
(
i
)
{
if
(
this
.
modeIndex
===
i
)
return
;
if
(
this
.
modeIndex
===
i
)
return
;
this
.
modeIndex
=
i
;
this
.
modeIndex
=
i
;
this
.
selectCouponIndex
=
-
1
;
this
.
duration
=
Number
(
this
.
packageMode
[
this
.
modeIndex
].
duration
);
this
.
duration
=
Number
(
this
.
packageMode
[
this
.
modeIndex
].
duration
);
let
val
=
this
.
intervalList
.
findIndex
(
item
=>
item
.
status
===
2
)
let
val
=
this
.
intervalList
.
findIndex
(
item
=>
item
.
status
===
2
)
let
len
=
this
.
intervalList
.
filter
(
item
=>
item
.
status
===
2
).
length
;
let
len
=
this
.
intervalList
.
filter
(
item
=>
item
.
status
===
2
).
length
;
...
@@ -996,11 +1001,13 @@
...
@@ -996,11 +1001,13 @@
}
}
if
(
this
.
distanceIndex
===
i
)
return
;
if
(
this
.
distanceIndex
===
i
)
return
;
this
.
distanceIndex
=
i
this
.
distanceIndex
=
i
this
.
selectCouponIndex
=
-
1
this
.
onSetEndTime
()
this
.
onSetEndTime
()
},
},
onDurationChange2
(
i
)
{
onDurationChange2
(
i
)
{
if
(
this
.
distanceIndex
===
i
)
return
;
if
(
this
.
distanceIndex
===
i
)
return
;
this
.
distanceIndex
=
i
this
.
distanceIndex
=
i
this
.
selectCouponIndex
=
-
1
this
.
onSetEndTime
()
this
.
onSetEndTime
()
},
},
onDateChange
(
k
)
{
onDateChange
(
k
)
{
...
@@ -1039,6 +1046,7 @@
...
@@ -1039,6 +1046,7 @@
}
}
this
.
dateIndex
=
k
this
.
dateIndex
=
k
this
.
selectCouponIndex
=
-
1
this
.
setStartTime
=
{
this
.
setStartTime
=
{
status
:
false
,
status
:
false
,
startTime
:
''
,
startTime
:
''
,
...
...
pages/useCoupon/index.vue
View file @
9468ff19
...
@@ -102,7 +102,6 @@
...
@@ -102,7 +102,6 @@
this
.
eventChannel
.
on
(
'sendData'
,
(
data
)
=>
{
this
.
eventChannel
.
on
(
'sendData'
,
(
data
)
=>
{
this
.
selectId
=
data
.
selectId
||
''
this
.
selectId
=
data
.
selectId
||
''
console
.
log
(
this
.
selectId
,
909090
)
this
.
onLoading
(
data
);
this
.
onLoading
(
data
);
})
})
},
},
...
...
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