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
38fd6e29
Commit
38fd6e29
authored
Nov 02, 2019
by
FE
Browse files
Options
Browse Files
Download
Plain Diff
pull and solve
parents
96c62e90
1213ac7e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
43 additions
and
25 deletions
+43
-25
src/common/closable-popup/index.js
+4
-0
src/components/blessingPreheat/courseList/index.js
+1
-3
src/components/blessingPreheat/index.js
+25
-15
src/components/blessingPreheat/live/index.js
+3
-3
src/components/blessingRank/index.js
+10
-4
No files found.
src/common/closable-popup/index.js
View file @
38fd6e29
...
...
@@ -45,6 +45,10 @@ function ClosablePopup({
ReactDOM
.
render
(
closablePopup
,
div
)
return
{
close
:
_close
}
}
export
default
ClosablePopup
src/components/blessingPreheat/courseList/index.js
View file @
38fd6e29
...
...
@@ -245,7 +245,6 @@ class CourseList extends Component {
toReceiveCoupon
(
id
,
key
=
''
)
{
const
{
isLogin
,
toLogin
}
=
this
.
props
;
alert
(
cookie
.
get
(
"uid"
))
if
(
isLogin
)
{
http
.
post
(
`
${
API
.
home
}
/sys/activity/coupon/receive`
,
{
...
...
@@ -734,4 +733,4 @@ class CourseList extends Component {
}
}
export
default
ListFrame
(
CourseList
);
\ No newline at end of file
export
default
ListFrame
(
CourseList
);
src/components/blessingPreheat/index.js
View file @
38fd6e29
...
...
@@ -112,15 +112,22 @@ class BlessingPreheat extends Component {
const
{
code
}
=
res
.
data
if
(
code
===
200
)
{
Toast
.
info
(
'+2点福气值~'
,
2
,
null
,
false
)
this
.
fetchUserBlessing
()
}
})
this
.
fetchUserBlessing
()
}
window
[
'QQWXWBshare'
]
=
result
=>
{
if
(
result
!=
0
)
{
this
.
handleToAddBlessing
(
result
)
}
this
.
fetchUserBlessing
()
// this.handleToAddBlessing(result)
http
.
post
(
`
${
API
.
home
}
/sys/add/blessing`
,
{
share_platform
:
result
,
// 1 朋友圈 2 微博 3 qq
type
:
3
// 1:签到;3:分享;4:浏览课程;
}).
then
(
res
=>
{
const
{
code
}
=
res
.
data
if
(
code
===
200
)
{
Toast
.
info
(
'+2点福气值~'
,
2
,
null
,
false
)
this
.
fetchUserBlessing
()
}
})
}
}
...
...
@@ -142,7 +149,6 @@ class BlessingPreheat extends Component {
appLogin
=
()
=>
{
let
expires
=
addDays
(
new
Date
(),
90
)
this
.
state
.
userInfoList
.
map
((
item
,
index
)
=>
{
Toast
.
info
(
item
.
uid
)
cookie
.
set
(
"token"
,
item
.
token
,
{
expires
,
path
:
'/'
,
domain
:
'.julyedu.com'
})
cookie
.
set
(
"plat"
,
item
.
plat
,
{
expires
,
path
:
'/'
,
domain
:
'.julyedu.com'
})
cookie
.
set
(
"uid"
,
item
.
uid
,
{
expires
,
path
:
'/'
,
domain
:
'.julyedu.com'
})
...
...
@@ -193,13 +199,13 @@ class BlessingPreheat extends Component {
}
}
}
}
fetchMoudleId
=
(
str
)
=>
{
const
{
navs
}
=
this
.
state
return
findIndex
(
navs
,
item
=>
item
.
id
===
str
)
}
}
fetchMoudleId
=
(
str
)
=>
{
const
{
navs
}
=
this
.
state
return
findIndex
(
navs
,
item
=>
item
.
id
===
str
)
}
setInitialNavActiveStatus
=
()
=>
{
...
...
@@ -240,13 +246,12 @@ class BlessingPreheat extends Component {
isSign
:
!!
data
.
today_signed
,
isFormal
:
data
.
is_activity
,
userInfo
:
Object
.
assign
({},
userInfo
,
{
isFollow
:
data
.
subscribed
,
isFollow
:
data
.
subscribed
,
blessingVal
:
data
.
user_blessing_value
,
buyBlessing
:
(
data
.
types_total_blessing_value
&&
data
.
types_total_blessing_value
.
buy_course
)
?
data
.
types_total_blessing_value
.
buy_course
:
0
,
inviteBlessing
:
(
data
.
types_total_blessing_value
&&
data
.
types_total_blessing_value
.
invite
)
?
data
.
types_total_blessing_value
.
invite
:
0
,
})
})
alert
(
cookie
.
get
(
'uid'
))
if
(
data
.
is_login
===
1
)
{
this
.
handleToSign
()
}
...
...
@@ -270,6 +275,7 @@ class BlessingPreheat extends Component {
handleToSign
=
()
=>
{
const
{
userInfo
}
=
this
.
state
;
http
.
post
(
`
${
API
.
home
}
/sys/add/blessing`
,
{
type
:
1
// 1:签到;3:分享;4:浏览课程;
}).
then
(
res
=>
{
...
...
@@ -277,7 +283,11 @@ class BlessingPreheat extends Component {
if
(
code
===
200
)
{
this
.
setState
({
isSign
:
true
,
})
userInfo
:
Object
.
assign
({},
userInfo
,
{
blessingVal
:
userInfo
.
blessingVal
+
5
})
});
Toast
.
info
(
'+5点福气值~'
,
2
,
null
,
false
)
}
})
...
...
src/components/blessingPreheat/live/index.js
View file @
38fd6e29
...
...
@@ -131,7 +131,7 @@ class Live extends Component {
<
div
key
=
{
index
}
>
{
preheatLives
.
map
((
item
,
index
)
=>
{
return
<
LiveContent
key
=
{
index
}
item
=
{
item
}
makeSubscribe
=
{
this
.
makeSubscribe
}
/
>
return
<
LiveContent
key
=
{
index
}
item
=
{
item
}
makeSubscribe
=
{
this
.
makeSubscribe
}
toLiveRoom
=
{
this
.
toLiveRoom
}
/
>
})
}
<
/div
>
...
...
@@ -147,7 +147,7 @@ class Live extends Component {
}
}
function
LiveContent
({
item
,
makeSubscribe
})
{
function
LiveContent
({
item
,
makeSubscribe
,
toLiveRoom
})
{
return
(
<
div
className
=
"content"
>
{
...
...
@@ -181,7 +181,7 @@ function LiveContent({item, makeSubscribe}) {
<
/div
>
{
item
[
'on_live'
]
?
<
button
className
=
{
'on-living'
}
onClick
=
{
this
.
toLiveRoom
.
bind
(
this
,
item
[
'live_id'
])
}
>
正在直播
<
/button
>
?
<
button
className
=
{
'on-living'
}
onClick
=
{
()
=>
{
toLiveRoom
(
item
[
'live_id'
])}
}
>
正在直播
<
/button
>
:
item
[
'is_end'
]
?
<
button
className
=
{
'subscribed'
}
>
已结束
<
/button
>
...
...
src/components/blessingRank/index.js
View file @
38fd6e29
...
...
@@ -11,6 +11,7 @@ import './index.scss'
}
))
class
BlessingRank
extends
Component
{
popupInstance
=
null
constructor
(
props
)
{
super
(
props
)
this
.
state
=
{
...
...
@@ -44,10 +45,15 @@ class BlessingRank extends Component {
if
(
bool
&&
!
uid
)
{
history
.
push
(
'/passport'
)
}
else
{
Popup
({
title
:
'收货信息'
,
content
:
<
AddressPopup
handleToHide
=
{()
=>
this
.
handleToSwitch
(
false
)}
/
>
})
if
(
bool
&&
!
this
.
popupInstance
)
{
this
.
popupInstance
=
Popup
({
title
:
'收货信息'
,
content
:
<
AddressPopup
handleToHide
=
{()
=>
this
.
handleToSwitch
(
false
)}
/
>
})
}
else
{
this
.
popupInstance
.
close
()
this
.
popupInstance
=
null
}
}
}
...
...
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