Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
user
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
hooloo
mp
user
Commits
e8779c14
Commit
e8779c14
authored
Jun 09, 2022
by
宋冰琦
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复订单详情售罄单价展示问题
parent
3572496b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletions
+9
-1
menuSubPackage/pages/goodsDetail/goodsDetail.vue
+9
-1
No files found.
menuSubPackage/pages/goodsDetail/goodsDetail.vue
View file @
e8779c14
...
@@ -87,6 +87,7 @@ export default {
...
@@ -87,6 +87,7 @@ export default {
available
:
[],
available
:
[],
goods
:
{},
goods
:
{},
skusDefault
:
[],
skusDefault
:
[],
skusSellout
:
[],
pirce
:
0
,
pirce
:
0
,
size
:
0
,
size
:
0
,
}
}
...
@@ -102,6 +103,10 @@ export default {
...
@@ -102,6 +103,10 @@ export default {
if
(
skus
)
{
if
(
skus
)
{
const
sku
=
skus
.
find
(
v
=>
v
.
isDefault
==
1
&&
v
.
state
==
1
)
||
skus
.
find
(
v
=>
v
.
isDefault
==
0
&&
v
.
state
==
1
);
const
sku
=
skus
.
find
(
v
=>
v
.
isDefault
==
1
&&
v
.
state
==
1
)
||
skus
.
find
(
v
=>
v
.
isDefault
==
0
&&
v
.
state
==
1
);
this
.
skusDefault
=
skus
.
find
(
v
=>
v
.
isDefault
==
1
);
this
.
skusDefault
=
skus
.
find
(
v
=>
v
.
isDefault
==
1
);
this
.
skusSellout
=
skus
.
find
(
v
=>
v
.
isDefault
==
1
&&
v
.
state
==
1
)
||
skus
.
find
(
v
=>
v
.
state
==
1
)
||
skus
.
find
(
v
=>
v
.
isDefault
==
1
)
||
skus
[
0
]
if
(
!
sku
)
return
;
if
(
!
sku
)
return
;
this
.
selected
.
push
(...
sku
.
rules
)
this
.
selected
.
push
(...
sku
.
rules
)
skus
.
forEach
(
item
=>
{
skus
.
forEach
(
item
=>
{
...
@@ -233,10 +238,13 @@ export default {
...
@@ -233,10 +238,13 @@ export default {
priceTotal
()
{
priceTotal
()
{
let
discount
=
0
;
let
discount
=
0
;
let
price
=
0
;
let
price
=
0
;
const
{
goods
}
=
this
;
const
{
goods
,
skusSellout
}
=
this
;
if
(
goods
.
sku
)
{
if
(
goods
.
sku
)
{
discount
=
goods
.
sku
.
discount
*
this
.
size
discount
=
goods
.
sku
.
discount
*
this
.
size
price
=
goods
.
sku
.
price
*
this
.
size
price
=
goods
.
sku
.
price
*
this
.
size
}
else
if
(
skusSellout
){
discount
=
Number
(
skusSellout
.
discount
)
price
=
Number
(
skusSellout
.
price
)
}
}
return
{
discount
:
discount
.
toFixed
(
2
),
price
:
price
.
toFixed
(
2
)
}
return
{
discount
:
discount
.
toFixed
(
2
),
price
:
price
.
toFixed
(
2
)
}
}
}
...
...
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