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
229ec75a
Commit
229ec75a
authored
Nov 02, 2019
by
xuzhenghua
Browse files
Options
Browse Files
Download
Plain Diff
联调
parents
ee9acf4b
a265b317
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
2 deletions
+35
-2
src/components/blessingPreheat/ReserveCourse/index.scss
+4
-0
src/components/blessingPreheat/index.js
+31
-2
No files found.
src/components/blessingPreheat/ReserveCourse/index.scss
View file @
229ec75a
...
...
@@ -119,3 +119,7 @@
}
}
.demo
{
font-size
:
30px
;
color
:
red
;
}
src/components/blessingPreheat/index.js
View file @
229ec75a
...
...
@@ -35,6 +35,12 @@ class BlessingPreheat extends Component {
this
.
prevY
=
0
this
.
state
=
{
userInfoList
:
[],
// userInfoList: [{
// token:'fcfef221e60ab7a2-92a80d5d30196999',
// uid:'545292',
// uname:'xzhtest2',
// avatar_file:''
// }],
isRule
:
false
,
isCourse
:
false
,
inviteUrl
:
''
,
...
...
@@ -100,6 +106,10 @@ class BlessingPreheat extends Component {
window
[
'getNewData'
]
=
result
=>
{
this
.
fetchUserBlessing
();
}
window
[
'QQWXWBshare'
]
=
result
=>
{
this
.
handleToAddBlessing
(
result
);
}
}
...
...
@@ -118,8 +128,7 @@ class BlessingPreheat extends Component {
appLogin
=
()
=>
{
let
expires
=
addDays
(
new
Date
(),
90
)
this
.
state
.
userInfoList
.
map
((
item
,
index
)
=>
{
alert
(
this
.
props
.
user
.
hasError
)
Toast
.
info
(
String
(
this
.
props
.
user
.
hasError
))
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'
});
...
...
@@ -148,6 +157,8 @@ class BlessingPreheat extends Component {
}
getActiveIndex
=
(
arr
,
n
)
=>
{
for
(
let
i
=
0
,
len
=
arr
.
length
;
i
<
len
;
i
++
)
{
if
(
arr
[
i
]
>
n
)
{
...
...
@@ -216,6 +227,20 @@ class BlessingPreheat extends Component {
})
}
handleToAddBlessing
=
(
key
)
=>
{
http
.
post
(
`
${
API
.
home
}
/sys/add/blessing`
,
{
share_platform
:
key
,
// 1 朋友圈 2 微博 3 qq
type
:
3
// 1:签到;3:分享;4:浏览课程;
}).
then
(
res
=>
{
const
{
code
}
=
res
.
data
;
if
(
code
===
200
)
{
Toast
.
info
(
'+2点福气值~'
,
2
,
null
,
false
);
}
});
}
handleToSign
=
()
=>
{
http
.
post
(
`
${
API
.
home
}
/sys/add/blessing`
,
{
type
:
1
// 1:签到;3:分享;4:浏览课程;
...
...
@@ -405,6 +430,10 @@ class BlessingPreheat extends Component {
{
/* 积福气 */
}
<
ListHeader
id
=
{
'lucky-value'
}
text
=
"积福气,享受更多福利"
styles
=
{{
margin
:
'60px 0 15px'
}}
/
>
<
Link
className
=
"luck-draw__button"
to
=
"/blessingRank"
>
福气排行榜
><
/Link
>
<
div
className
=
'demo'
>
{
String
(
!
this
.
props
.
user
.
hasError
)}
<
/div
>
<
CollectBlessing
isSign
=
{
isSign
}
userInfo
=
{
userInfo
}
...
...
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