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
28e0169b
Commit
28e0169b
authored
Nov 02, 2019
by
xuzhenghua
Browse files
Options
Browse Files
Download
Plain Diff
app
parents
d20de9a8
dd856fcf
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
8 deletions
+15
-8
src/components/blessingPreheat/courseList/index.js
+2
-2
src/components/blessingPreheat/index.js
+7
-0
src/components/blessingPreheat/levelTest/index.js
+6
-6
No files found.
src/components/blessingPreheat/courseList/index.js
View file @
28e0169b
...
@@ -221,8 +221,8 @@ class CourseList extends Component {
...
@@ -221,8 +221,8 @@ class CourseList extends Component {
}
}
toReceiveCoupon
(
id
,
key
=
''
)
{
toReceiveCoupon
(
id
,
key
=
''
)
{
const
{
isLogin
,
toLogin
}
=
this
.
props
;
const
{
isLogin
,
toLogin
,
uid
}
=
this
.
props
;
alert
(
isLogin
)
alert
(
uid
)
if
(
isLogin
)
{
if
(
isLogin
)
{
http
.
post
(
`
${
API
.
home
}
/sys/activity/coupon/receive`
,
{
http
.
post
(
`
${
API
.
home
}
/sys/activity/coupon/receive`
,
{
course_id
:
id
course_id
:
id
...
...
src/components/blessingPreheat/index.js
View file @
28e0169b
...
@@ -135,6 +135,11 @@ class BlessingPreheat extends Component {
...
@@ -135,6 +135,11 @@ class BlessingPreheat extends Component {
cookie
.
set
(
"uname"
,
item
.
uname
,
{
expires
,
path
:
'/'
,
domain
:
'julyedu.com'
});
cookie
.
set
(
"uname"
,
item
.
uname
,
{
expires
,
path
:
'/'
,
domain
:
'julyedu.com'
});
cookie
.
set
(
"avatar_file"
,
item
.
avatar_file
,
{
expires
,
path
:
'/'
,
domain
:
'julyedu.com'
});
cookie
.
set
(
"avatar_file"
,
item
.
avatar_file
,
{
expires
,
path
:
'/'
,
domain
:
'julyedu.com'
});
});
});
if
(
cookie
.
get
(
"token"
)
&&
cookie
.
get
(
"uid"
))
{
window
.
location
.
reload
()
}
this
.
props
.
setCurrentUser
(
this
.
transformUser
(
this
.
state
.
userInfoList
))
this
.
props
.
setCurrentUser
(
this
.
transformUser
(
this
.
state
.
userInfoList
))
}
}
transformUser
=
res
=>
{
transformUser
=
res
=>
{
...
@@ -418,6 +423,7 @@ class BlessingPreheat extends Component {
...
@@ -418,6 +423,7 @@ class BlessingPreheat extends Component {
}
=
this
.
state
;
}
=
this
.
state
;
const
{
history
}
=
this
.
props
;
const
{
history
}
=
this
.
props
;
const
isLogin
=
!
this
.
props
.
user
.
hasError
const
isLogin
=
!
this
.
props
.
user
.
hasError
const
uid
=
this
.
props
.
user
.
data
.
uid
return
(
return
(
<
div
id
=
{
'blessing-preheat'
}
>
<
div
id
=
{
'blessing-preheat'
}
>
<
Banner
<
Banner
...
@@ -469,6 +475,7 @@ class BlessingPreheat extends Component {
...
@@ -469,6 +475,7 @@ class BlessingPreheat extends Component {
<
CourseList
<
CourseList
isFormal
=
{
isFormal
}
isFormal
=
{
isFormal
}
isLogin
=
{
isLogin
}
isLogin
=
{
isLogin
}
uid
=
{
uid
}
history
=
{
this
.
props
.
history
}
history
=
{
this
.
props
.
history
}
toLogin
=
{
this
.
toLogin
}
toLogin
=
{
this
.
toLogin
}
/
>
/
>
...
...
src/components/blessingPreheat/levelTest/index.js
View file @
28e0169b
...
@@ -52,7 +52,12 @@ class LevelTest extends Component {
...
@@ -52,7 +52,12 @@ class LevelTest extends Component {
startTest
=
()
=>
{
startTest
=
()
=>
{
const
{
history
,
isLogin
,
toLogin
}
=
this
.
props
;
const
{
history
,
isLogin
,
toLogin
}
=
this
.
props
;
if
(
isLogin
)
{
if
(
isLogin
)
{
history
.
push
(
'/levelTest/test'
);
// history.push('/levelTest/test');
// if(getParam('version')) {
window
.
location
.
href
=
`
${
API
.
m
}
/levelTest/test`
;
// }else{
// history.push('/levelTest/test');
// }
}
else
{
}
else
{
toLogin
();
toLogin
();
}
}
...
@@ -73,11 +78,6 @@ class LevelTest extends Component {
...
@@ -73,11 +78,6 @@ class LevelTest extends Component {
<
img
src
=
"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_1111/m/test_icon.png"
/>
<
img
src
=
"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_1111/m/test_icon.png"
/>
<
div
className
=
"button__text"
>
<
div
className
=
"button__text"
>
<
p
>
点击测试
<
/p
>
<
p
>
点击测试
<
/p
>
{
isLogin
&&
(
<
span
>
(剩余
{
number
}
次)
<
/span
>
)
}
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
div
className
=
'test__number'
>
<
div
className
=
'test__number'
>
...
...
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