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
9d0a6545
Commit
9d0a6545
authored
Nov 08, 2019
by
zhanghaozhe
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '11-11-formal' into dev
parents
9dd8b683
c0553215
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
10 deletions
+13
-10
src/components/blessingPreheat/index.js
+13
-10
No files found.
src/components/blessingPreheat/index.js
View file @
9d0a6545
...
@@ -97,7 +97,7 @@ class BlessingPreheat extends Component {
...
@@ -97,7 +97,7 @@ class BlessingPreheat extends Component {
}
}
componentDidMount
()
{
componentDidMount
()
{
document
.
title
=
`11.11-11.13 AI充电节,预热来袭!积福气享1折秒课,海量奖品来就送-七月在线`
;
document
.
title
=
`11.11-11.13 AI充电节,预热来袭!积福气享1折秒课,海量奖品来就送-七月在线`
this
.
fetchUserBlessing
()
this
.
fetchUserBlessing
()
this
.
setInitialNavActiveStatus
()
this
.
setInitialNavActiveStatus
()
window
.
addEventListener
(
'scroll'
,
throttle
(
this
.
calcNavActive
,
100
))
window
.
addEventListener
(
'scroll'
,
throttle
(
this
.
calcNavActive
,
100
))
...
@@ -277,7 +277,7 @@ class BlessingPreheat extends Component {
...
@@ -277,7 +277,7 @@ class BlessingPreheat extends Component {
handleToSign
=
()
=>
{
handleToSign
=
()
=>
{
const
{
userInfo
}
=
this
.
state
;
const
{
userInfo
}
=
this
.
state
http
.
post
(
`
${
API
.
home
}
/sys/add/blessing`
,
{
http
.
post
(
`
${
API
.
home
}
/sys/add/blessing`
,
{
type
:
1
// 1:签到;3:分享;4:浏览课程;
type
:
1
// 1:签到;3:分享;4:浏览课程;
}).
then
(
res
=>
{
}).
then
(
res
=>
{
...
@@ -310,15 +310,15 @@ class BlessingPreheat extends Component {
...
@@ -310,15 +310,15 @@ class BlessingPreheat extends Component {
if
(
isLogin
&&
!
isLoginnew
)
{
if
(
isLogin
&&
!
isLoginnew
)
{
this
.
toLogin
()
this
.
toLogin
()
}
else
{
}
else
{
if
(
key
===
'shareMark'
)
{
if
(
key
===
'shareMark'
)
{
this
.
setState
({
this
.
setState
({
isClose
:
false
isClose
:
false
})
;
})
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
setState
({
this
.
setState
({
isClose
:
true
isClose
:
true
})
;
})
},
5000
)
;
},
5000
)
}
}
let
obj
=
{}
let
obj
=
{}
obj
[
key
]
=
true
obj
[
key
]
=
true
...
@@ -330,7 +330,7 @@ class BlessingPreheat extends Component {
...
@@ -330,7 +330,7 @@ class BlessingPreheat extends Component {
handleToShowNotice
=
()
=>
{
handleToShowNotice
=
()
=>
{
http
.
get
(
`
${
API
[
'base-api'
]}
/sys/activity/create_blessing_qrcode`
).
then
(
res
=>
{
http
.
get
(
`
${
API
[
'base-api'
]}
/sys/activity/create_blessing_qrcode`
).
then
(
res
=>
{
const
{
errno
,
data
,
msg
}
=
res
.
data
;
const
{
errno
,
data
,
msg
}
=
res
.
data
if
(
errno
===
200
)
{
if
(
errno
===
200
)
{
QRCode
.
toDataURL
(
data
.
url
,
{
QRCode
.
toDataURL
(
data
.
url
,
{
width
:
120
,
width
:
120
,
...
@@ -436,14 +436,17 @@ class BlessingPreheat extends Component {
...
@@ -436,14 +436,17 @@ class BlessingPreheat extends Component {
<
/div
>
<
/div
>
<
ul
>
<
ul
>
{
{
data
.
map
((
item
,
index
)
=>
{
Array
.
isArray
(
data
)
?
data
.
map
((
item
,
index
)
=>
{
return
(
return
(
<
li
key
=
{
index
}
>
<
li
key
=
{
index
}
>
<
div
className
=
"time"
>
{
item
.
time
}
<
/div
>
<
div
className
=
"time"
>
{
item
.
time
}
<
/div
>
<
div
className
=
"name"
onClick
=
{
this
.
showAddressPopup
.
bind
(
this
,
item
[
'is_virtual'
],
item
.
prize
)}
>
{
item
.
prize
}
<
/div
>
<
div
className
=
"name"
onClick
=
{
this
.
showAddressPopup
.
bind
(
this
,
item
[
'is_virtual'
],
item
.
prize
)}
>
{
item
.
prize
}
<
/div
>
<
/li
>
<
/li
>
)
)
})
})
:
<
li
style
=
{{
justifyContent
:
'center'
}}
>
暂无中奖纪录
<
/li
>
}
}
<
/ul
>
<
/ul
>
<
/div
>
<
/div
>
...
@@ -486,7 +489,7 @@ class BlessingPreheat extends Component {
...
@@ -486,7 +489,7 @@ class BlessingPreheat extends Component {
}
}
showAddressPopup
=
(
isVirtual
,
prize
)
=>
{
showAddressPopup
=
(
isVirtual
,
prize
)
=>
{
if
(
isVirtual
)
{
if
(
isVirtual
)
{
Toast
.
info
(
`恭喜你抽中
${
prize
}
,奖品已存放到你的账户`
,
2
,
null
,
false
)
Toast
.
info
(
`恭喜你抽中
${
prize
}
,奖品已存放到你的账户`
,
2
,
null
,
false
)
return
return
}
}
...
...
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