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
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
3 deletions
+36
-3
src/components/blessingPreheat/ReserveCourse/index.scss
+5
-1
src/components/blessingPreheat/index.js
+31
-2
No files found.
src/components/blessingPreheat/ReserveCourse/index.scss
View file @
229ec75a
.reserve-course-module
{
.reserve-course-module
{
margin
:
20px
15px
0
20px
;
margin
:
20px
15px
0
20px
;
padding-bottom
:
5px
;
padding-bottom
:
5px
;
.course-list
{
.course-list
{
ul
{
ul
{
...
@@ -119,3 +119,7 @@
...
@@ -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 {
...
@@ -35,6 +35,12 @@ class BlessingPreheat extends Component {
this
.
prevY
=
0
this
.
prevY
=
0
this
.
state
=
{
this
.
state
=
{
userInfoList
:
[],
userInfoList
:
[],
// userInfoList: [{
// token:'fcfef221e60ab7a2-92a80d5d30196999',
// uid:'545292',
// uname:'xzhtest2',
// avatar_file:''
// }],
isRule
:
false
,
isRule
:
false
,
isCourse
:
false
,
isCourse
:
false
,
inviteUrl
:
''
,
inviteUrl
:
''
,
...
@@ -100,6 +106,10 @@ class BlessingPreheat extends Component {
...
@@ -100,6 +106,10 @@ class BlessingPreheat extends Component {
window
[
'getNewData'
]
=
result
=>
{
window
[
'getNewData'
]
=
result
=>
{
this
.
fetchUserBlessing
();
this
.
fetchUserBlessing
();
}
}
window
[
'QQWXWBshare'
]
=
result
=>
{
this
.
handleToAddBlessing
(
result
);
}
}
}
...
@@ -118,8 +128,7 @@ class BlessingPreheat extends Component {
...
@@ -118,8 +128,7 @@ class BlessingPreheat extends Component {
appLogin
=
()
=>
{
appLogin
=
()
=>
{
let
expires
=
addDays
(
new
Date
(),
90
)
let
expires
=
addDays
(
new
Date
(),
90
)
this
.
state
.
userInfoList
.
map
((
item
,
index
)
=>
{
this
.
state
.
userInfoList
.
map
((
item
,
index
)
=>
{
alert
(
this
.
props
.
user
.
hasError
)
Toast
.
info
(
item
.
uid
)
Toast
.
info
(
String
(
this
.
props
.
user
.
hasError
))
cookie
.
set
(
"token"
,
item
.
token
,
{
expires
,
path
:
'/'
,
domain
:
'julyedu.com'
});
cookie
.
set
(
"token"
,
item
.
token
,
{
expires
,
path
:
'/'
,
domain
:
'julyedu.com'
});
cookie
.
set
(
"plat"
,
item
.
plat
,
{
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'
});
cookie
.
set
(
"uid"
,
item
.
uid
,
{
expires
,
path
:
'/'
,
domain
:
'julyedu.com'
});
...
@@ -148,6 +157,8 @@ class BlessingPreheat extends Component {
...
@@ -148,6 +157,8 @@ class BlessingPreheat extends Component {
}
}
getActiveIndex
=
(
arr
,
n
)
=>
{
getActiveIndex
=
(
arr
,
n
)
=>
{
for
(
let
i
=
0
,
len
=
arr
.
length
;
i
<
len
;
i
++
)
{
for
(
let
i
=
0
,
len
=
arr
.
length
;
i
<
len
;
i
++
)
{
if
(
arr
[
i
]
>
n
)
{
if
(
arr
[
i
]
>
n
)
{
...
@@ -216,6 +227,20 @@ class BlessingPreheat extends Component {
...
@@ -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
=
()
=>
{
handleToSign
=
()
=>
{
http
.
post
(
`
${
API
.
home
}
/sys/add/blessing`
,
{
http
.
post
(
`
${
API
.
home
}
/sys/add/blessing`
,
{
type
:
1
// 1:签到;3:分享;4:浏览课程;
type
:
1
// 1:签到;3:分享;4:浏览课程;
...
@@ -405,6 +430,10 @@ class BlessingPreheat extends Component {
...
@@ -405,6 +430,10 @@ class BlessingPreheat extends Component {
{
/* 积福气 */
}
{
/* 积福气 */
}
<
ListHeader
id
=
{
'lucky-value'
}
text
=
"积福气,享受更多福利"
styles
=
{{
margin
:
'60px 0 15px'
}}
/
>
<
ListHeader
id
=
{
'lucky-value'
}
text
=
"积福气,享受更多福利"
styles
=
{{
margin
:
'60px 0 15px'
}}
/
>
<
Link
className
=
"luck-draw__button"
to
=
"/blessingRank"
>
福气排行榜
><
/Link
>
<
Link
className
=
"luck-draw__button"
to
=
"/blessingRank"
>
福气排行榜
><
/Link
>
<
div
className
=
'demo'
>
{
String
(
!
this
.
props
.
user
.
hasError
)}
<
/div
>
<
CollectBlessing
<
CollectBlessing
isSign
=
{
isSign
}
isSign
=
{
isSign
}
userInfo
=
{
userInfo
}
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