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
7c40d20a
Commit
7c40d20a
authored
May 17, 2024
by
zhangzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
fafe41f3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
19 deletions
+5
-19
order.vue
pages/order/order.vue
+5
-19
No files found.
pages/order/order.vue
View file @
7c40d20a
...
...
@@ -1085,25 +1085,11 @@
}).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
&&
res
.
data
.
data
.
length
)
{
this
.
couponList
=
res
.
data
.
data
;
let
list
=
res
.
data
.
data
.
filter
(
item
=>
item
.
isAvailable
===
0
)
if
(
list
.
length
)
{
list
=
list
.
map
(
item
=>
{
return
{
...
item
,
subPrice
:
item
.
subPrice
||
0
}
})
list
.
sort
((
a
,
b
)
=>
b
.
subPrice
-
a
.
subPrice
)
this
.
useCouponList
=
list
;
let
i
=
this
.
useCouponList
.
findIndex
(
item
=>
item
.
duration
==
this
.
duration
)
this
.
selectCouponIndex
=
i
>=
0
?
i
:
0
}
else
{
this
.
useCouponList
=
list
;
this
.
selectCouponIndex
=
-
1
}
this
.
useCouponList
=
res
.
data
.
data
;
let
i
=
this
.
useCouponList
.
findIndex
(
item
=>
item
.
isAvailable
===
0
)
this
.
selectCouponIndex
=
i
>=
0
?
i
:
-
1
;
}
else
{
this
.
selectCouponIndex
=
-
1
;
}
this
.
onComputePrice
();
}
else
if
(
res
.
data
.
code
==
401
)
{
...
...
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