Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mr-julyedu
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
baiguangyao
mr-julyedu
Commits
00b6ad6b
Commit
00b6ad6b
authored
Oct 24, 2019
by
wangshuo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
满减
parent
d7d2610c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
2 deletions
+50
-2
src/components/order/index.js
+28
-1
src/components/order/order.scss
+22
-1
No files found.
src/components/order/index.js
View file @
00b6ad6b
...
...
@@ -120,6 +120,8 @@ class Order extends Component {
orderList
:
[],
info
:
false
,
offset
:
0
,
full_amount
:
0
,
// 满金额
cut_amount
:
0
,
// 减金额
};
}
// 提交订单
...
...
@@ -267,6 +269,12 @@ class Order extends Component {
discount
,
});
};
fullRules
=
(
data
)
=>
{
this
.
setState
({
full_amount
:
data
.
full_amount
,
cut_amount
:
data
.
cut_amount
,
});
};
// 公共方法 本地存储
publicLocalStorage
=
()
=>
{
if
(
this
.
props
.
history
.
action
===
'PUSH'
)
{
...
...
@@ -300,8 +308,11 @@ class Order extends Component {
// 普通课程立即报名 不带 type = 1
http
.
get
(
`
${
API
[
'base-api'
]}
/m/order/preorder`
).
then
(
res
=>
{
if
(
res
.
data
.
errno
===
200
)
{
console
.
log
(
res
.
data
.
data
);
this
.
publicGetData
(
res
.
data
.
data
);
this
.
publicLocalStorage
();
this
.
fullRules
(
res
.
data
.
data
);
}
else
{
Toast
.
info
(
res
.
data
.
msg
,
2
);
}
...
...
@@ -407,7 +418,9 @@ class Order extends Component {
useBalance
,
info
,
offset
,
groupPrice
groupPrice
,
full_amount
,
cut_amount
,
}
=
this
.
state
;
return
(
...
...
@@ -495,6 +508,20 @@ class Order extends Component {
<
/Item
>
<
/List
>
<
/div
>
{
(
full_amount
>
0
&&
cut_amount
>
0
)
?
(
<>
<
div
className
=
"full__rules"
>
<
WingBlank
>
<
div
className
=
"money__off"
>
<
span
>
满
{
full_amount
}
减
{
cut_amount
}
:
<
/span
>
<
span
className
=
'money'
>
{
`-¥
${
cut_amount
}
`
}
<
/span
>
<
/div
>
<
/WingBlank
>
<
/div
>
<
/
>
)
:
(
null
)
}
<
div
className
=
"order-bar"
>
<
div
className
=
"order-course"
>
<
span
className
=
"order-course-text"
>
{
`
${
orderList
.
length
}
门课程`
}
<
/span
>
...
...
src/components/order/order.scss
View file @
00b6ad6b
...
...
@@ -265,7 +265,8 @@
.order-balance
{
height
:
44px
;
line-height
:
44px
;
margin
:
8px
0
50px
0
;
margin
:
8px
0
8px
0
;
display
:
flow-root
;
.am-list-item
{
padding-left
:
0
!
important
;
...
...
@@ -282,4 +283,23 @@
}
}
}
.full__rules
{
width
:
100%
;
height
:
50px
;
margin-top
:
16px
;
background
:
#FFF
;
font-size
:
14px
;
background
:
#fff
;
color
:
#999
;
.money__off
{
height
:
50px
;
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
}
.money
{
color
:
#FF3131
;
}
}
}
\ No newline at end of file
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