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
264a3d9a
Commit
264a3d9a
authored
Nov 01, 2019
by
xuzhenghua
Browse files
Options
Browse Files
Download
Plain Diff
pull
parents
c7210be4
7c092772
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
62 additions
and
39 deletions
+62
-39
src/components/blessingPreheat/collectBlessing/index.js
+16
-6
src/components/blessingPreheat/live/index.js
+1
-0
src/components/coupons/Coupon/index.js
+17
-6
src/components/coupons/myCoupons/index.js
+23
-24
src/components/detail/index.scss
+1
-0
src/components/expand/share.js
+1
-2
src/components/expand/share.scss
+2
-0
src/components/myOrders/index.js
+1
-1
No files found.
src/components/blessingPreheat/collectBlessing/index.js
View file @
264a3d9a
...
...
@@ -231,16 +231,22 @@ class CollectBlessing extends Component {
<
i
className
=
"collect-blessing__num"
>
{
index
+
1
}
<
/i
>
<
p
className
=
"collect-blessing__title"
>
{
item
}
<
/p
>
{
index
===
0
&&
(
isLogin
&&
isSign
)
&&
index
===
0
&&
<>
{
(
isLogin
&&
isSign
)
?
(
<
a
className
=
"collect-blessing__content"
data
-
status
=
"done"
>
+
5
点
<
br
/>
福气值
<
/a
>
}
{
index
===
0
&&
(
!
isLogin
||
!
isSign
)
&&
)
:
(
<
span
onClick
=
{
toLogin
}
className
=
"collect-blessing__content"
>
点击
<
br
/>
签到
<
/span
>
)
}
<
/
>
}
{
index
===
1
&&
...
...
@@ -281,7 +287,9 @@ class CollectBlessing extends Component {
index
===
4
&&
<
a
className
=
"collect-blessing__content"
onClick
=
{
handleToShowInvite
}
>
<
span
>
邀请链接
<
/span
>
<
i
>
已加
{
inviteBlessing
}
点
<
/i
>
{
inviteBlessing
>
0
&&
<
i
>
已加
{
inviteBlessing
}
点
<
/i
>
}
<
/a
>
}
{
...
...
@@ -290,7 +298,9 @@ class CollectBlessing extends Component {
className
=
"collect-blessing__content"
onClick
=
{
toSection
}
>
<
span
>
去选课
<
/span
>
<
i
>
已加
{
buyBlessing
}
点
<
/i
>
{
buyBlessing
>
0
&&
<
i
>
已加
{
buyBlessing
}
点
<
/i
>
}
<
/a
>
}
<
/div
>
...
...
src/components/blessingPreheat/live/index.js
View file @
264a3d9a
...
...
@@ -115,6 +115,7 @@ class Live extends Component {
tabBarInactiveTextColor
=
{
'#FFF604'
}
tabBarUnderlineStyle
=
{{
display
:
'none'
}}
initialPage
=
{
today
}
swipeable
=
{
false
}
>
{
this
.
props
.
isFormal
...
...
src/components/coupons/Coupon/index.js
View file @
264a3d9a
...
...
@@ -3,7 +3,9 @@ import './coupon.scss'
import
classnames
from
'classnames'
import
{
http
}
from
"@/utils"
import
showAlert
from
'@common/deposit/end-expansion-alert'
import
{
Toast
}
from
'antd-mobile'
import
{
Toast
}
from
'antd-mobile'
import
{
withRouter
}
from
"react-router-dom"
class
Coupon
extends
PureComponent
{
...
...
@@ -12,9 +14,18 @@ class Coupon extends PureComponent {
EXPAND
=
4
//膨胀全
pick
=
()
=>
{
let
{
useCoupon
,
invalid
}
=
this
.
props
pick
=
(
e
)
=>
{
let
{
useCoupon
,
invalid
,
start_amount
,
id
,
location
,
history
,
code
}
=
this
.
props
const
{
state
}
=
location
if
(
state
&&
state
.
from
&&
state
.
from
===
'/my'
){
history
.
push
(
`/expand/index?deposit_code=
${
code
}
`
)
return
}
if
(
start_amount
)
{
this
.
stopExpanding
(
id
,
e
)
}
else
{
!
invalid
&&
useCoupon
&&
useCoupon
(
this
.
props
.
id
)
}
}
...
...
@@ -38,8 +49,8 @@ class Coupon extends PureComponent {
.
then
(
res
=>
{
const
{
data
}
=
res
if
(
data
.
code
==
200
)
{
this
.
props
.
endExpansion
(
id
)
}
else
{
this
.
props
.
endExpansion
(
id
,
data
.
data
.
coupon_
id
)
}
else
{
Toast
.
info
(
data
.
msg
)
}
})
...
...
@@ -209,4 +220,4 @@ function BaseCoupon(
)
}
export
default
Coupon
export
default
withRouter
(
Coupon
)
src/components/coupons/myCoupons/index.js
View file @
264a3d9a
...
...
@@ -6,7 +6,6 @@ import Coupon from '../Coupon'
import
{
http
,
getParam
}
from
'@/utils'
import
{
WithFullSize
}
from
'@/HOCs'
import
{
Toast
}
from
'antd-mobile'
import
{
isEmpty
}
from
'lodash'
import
{
connect
}
from
'react-redux'
@
connect
()
...
...
@@ -110,19 +109,13 @@ class UseCoupon extends PureComponent {
getMyCoupons
=
()
=>
{
Promise
.
all
([
http
.
get
(
`
${
API
.
home
}
/m/coupon/all
`
),
http
.
get
(
`
${
API
.
home
}
/m/coupon/expansion
`
)
http
.
get
(
`
${
API
.
home
}
/m/coupon/expansion
`
),
http
.
get
(
`
${
API
.
home
}
/m/coupon/all
`
)
]).
then
((
coupons
)
=>
{
let
myCoupons
=
[]
const
[
allCoupons
,
expansion
Coupons
]
=
coupons
const
[
expansionCoupons
,
all
Coupons
]
=
coupons
const
{
data
:
all
}
=
allCoupons
const
{
data
:
expansion
}
=
expansionCoupons
if
(
all
.
code
==
200
)
{
Array
.
isArray
(
all
.
data
)
&&
(
myCoupons
=
myCoupons
.
concat
(
all
.
data
))
}
else
{
Toast
.
info
(
all
.
msg
)
}
if
(
expansion
.
code
==
200
)
{
Array
.
isArray
(
expansion
.
data
)
&&
(
expansion
.
data
=
expansion
.
data
.
map
(
item
=>
(
item
.
ctype
=
4
,
item
)))
...
...
@@ -130,6 +123,11 @@ class UseCoupon extends PureComponent {
}
else
{
Toast
.
info
(
expansion
.
msg
)
}
if
(
all
.
code
==
200
)
{
Array
.
isArray
(
all
.
data
)
&&
(
myCoupons
=
myCoupons
.
concat
(
all
.
data
))
}
else
{
Toast
.
info
(
all
.
msg
)
}
this
.
setState
({
couponList
:
myCoupons
...
...
@@ -139,12 +137,21 @@ class UseCoupon extends PureComponent {
getAllCoupons
=
()
=>
{
Promise
.
all
([
http
.
post
(
`
${
API
.
home
}
/m/coupon/select`
,
{
course_id
:
this
.
state
.
courseId
}
),
http
.
get
(
`
${
API
.
home
}
/m/coupon/expansion`
)
http
.
get
(
`
${
API
.
home
}
/m/coupon/expansion`
),
http
.
post
(
`
${
API
.
home
}
/m/coupon/select`
,
{
course_id
:
this
.
state
.
courseId
}
)
]).
then
((
coupons
)
=>
{
const
[
selectCoupons
,
expansion
Coupons
]
=
coupons
const
[
expansionCoupons
,
select
Coupons
]
=
coupons
const
{
data
:
select
}
=
selectCoupons
const
{
data
:
expansion
}
=
expansionCoupons
if
(
expansion
.
code
==
200
)
{
Array
.
isArray
(
expansion
.
data
)
&&
(
expansion
.
data
=
expansion
.
data
.
map
(
item
=>
(
item
.
ctype
=
4
,
item
)))
&&
(
this
.
setState
({
valid_coupons
:
this
.
state
.
valid_coupons
.
concat
(
expansion
.
data
)
}))
}
else
{
Toast
.
info
(
expansion
.
msg
)
}
if
(
select
.
code
===
200
)
{
const
inuse_coupon
=
select
.
data
[
'inuse_coupon'
]
this
.
setState
({
...
...
@@ -158,15 +165,6 @@ class UseCoupon extends PureComponent {
}
else
{
Toast
.
info
(
data
.
msg
)
}
if
(
expansion
.
code
==
200
)
{
Array
.
isArray
(
expansion
.
data
)
&&
(
expansion
.
data
=
expansion
.
data
.
map
(
item
=>
(
item
.
ctype
=
4
,
item
)))
&&
(
this
.
setState
({
valid_coupons
:
this
.
state
.
valid_coupons
.
concat
(
expansion
.
data
)
}))
}
else
{
Toast
.
info
(
expansion
.
msg
)
}
})
...
...
@@ -278,11 +276,12 @@ class UseCoupon extends PureComponent {
})
}
endExpansion
=
id
=>
{
endExpansion
=
(
id
,
validId
)
=>
{
this
.
setState
({
couponList
:
this
.
state
.
couponList
.
map
(
item
=>
{
valid_coupons
:
this
.
state
.
valid_coupons
.
map
(
item
=>
{
if
(
item
.
id
===
id
)
{
delete
item
.
start_amount
item
.
id
=
validId
}
return
item
})
...
...
src/components/detail/index.scss
View file @
264a3d9a
...
...
@@ -60,6 +60,7 @@
font-size
:
14px
;
color
:
$color_666
;
margin-top
:
10px
;
line-height
:
16px
;
}
.des
{
...
...
src/components/expand/share.js
View file @
264a3d9a
...
...
@@ -164,8 +164,7 @@ class ExpandShare extends Component {
step
:
2
,
helpData
:
data
})
console
.
log
(
data
)
this
.
getListorData
()
}
else
if
(
errno
===
17018
||
errno
===
17020
)
{
this
.
setState
({
isShow
:
true
,
...
...
src/components/expand/share.scss
View file @
264a3d9a
...
...
@@ -569,6 +569,7 @@
color
:
#fff
;
font-size
:
15px
;
margin-top
:
20px
;
border
:
none
;
}
}
...
...
@@ -596,6 +597,7 @@
border-radius
:
17px
;
color
:
#fff
;
font-size
:
15px
;
border
:
none
;
}
}
...
...
src/components/myOrders/index.js
View file @
264a3d9a
...
...
@@ -193,7 +193,7 @@ function PayInfo(props) {
<
/p
>
<
p
>
<
span
className
=
'payable'
>
已优惠:
<
/span
>
<
span
className
=
'price'
>
¥
{
props
.
item
.
d
eposit_cu
t
}
<
/span
>
<
span
className
=
'price'
>
¥
{
props
.
item
.
d
iscoun
t
}
<
/span
>
<
/p
>
<
/div
>
...
...
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