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
7b9a43d6
Commit
7b9a43d6
authored
Oct 31, 2019
by
xuzhenghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
冲突
parent
b6d2ee03
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
133 deletions
+8
-133
src/components/activity/invite.js
+0
-17
src/components/blessingPreheat/index.js
+8
-116
No files found.
src/components/activity/invite.js
View file @
7b9a43d6
...
...
@@ -21,11 +21,6 @@ class Invite extends Component {
let
uid
=
jsCookie
.
get
(
'uid'
);
let
shareuid
=
getParam
(
'shareuid'
);
if
(
uid
===
shareuid
)
{
<<<<<<<
HEAD
=======
>>>>>>>
c7f5958a86fc21ab5be3a03fb9e7277cfb2be9ba
}
else
{
if
(
getParam
(
'new'
))
{
this
.
props
.
history
.
push
(
`/activity?shareuid=
${
shareuid
}
&code=
${
inviteCode
}
`
);
...
...
@@ -85,17 +80,10 @@ class Invite extends Component {
if
(
is_weixin
())
{
// TODO 这里需要运营确定文案
wxShare
({
<<<<<<<
HEAD
title
:
'AI充电节,积福气享1折秒课,超10万元奖品来就送!!'
,
desc
:
'把这门超5万人报名的【Python基础入门 升级版】课程送给你,附200元红包,请笑纳!--七月在线'
,
link
:
encodeURI
(
location
.
origin
+
`/invite?shareuid=
${
jsCookie
.
get
(
'uid'
)}
&new=1&code=
${
inviteCode
}
`
),
imgUrl
:
'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_1111/m/index-share-img.png'
,
=======
title
:
"哈哈哈哈哈哈哈"
,
desc
:
"你的老相好在七月在线学习呢你来不来"
,
link
:
encodeURI
(
location
.
origin
+
`/invite?shareuid=
${
jsCookie
.
get
(
'uid'
)}
&new=1&code=
${
inviteCode
}
`
),
imgUrl
:
'https://julyedu-img-public.oss-cn-beijing.aliyuncs.com/Public/Image/20a86c1353.jpg'
>>>>>>>
c7f5958a86fc21ab5be3a03fb9e7277cfb2be9ba
});
this
.
setState
({
showTip
:
true
,
...
...
@@ -150,11 +138,6 @@ class Invite extends Component {
<
/div
>
<
/div
>
<
/div
>
<<<<<<<
HEAD
=======
>>>>>>>
c7f5958a86fc21ab5be3a03fb9e7277cfb2be9ba
<
div
className
=
"but__con"
>
<
div
className
=
"button__content"
onClick
=
{
this
.
inviteFriends
}
>
...
...
src/components/blessingPreheat/index.js
View file @
7b9a43d6
<<<<<<<
HEAD
import
React
,
{
Component
}
from
'react'
;
import
QRCode
from
'qrcode'
;
import
{
http
,
SendMessageToApp
,
wxShare
,
is_weixin
}
from
'@/utils'
;
import
{
Link
}
from
'react-router-dom'
;
import
{
throttle
,
findIndex
}
from
'lodash'
;
=======
import
React
,
{
Component
}
from
'react'
import
QRCode
from
'qrcode'
import
{
http
,
SendMessageToApp
}
from
'@/utils'
import
{
http
,
SendMessageToApp
,
wxShare
,
is_weixin
,
getParam
}
from
'@/utils'
;
import
{
Link
}
from
'react-router-dom'
import
{
throttle
,
findIndex
,
debounce
}
from
'lodash'
>>>>>>>
c7f5958a86fc21ab5be3a03fb9e7277cfb2be9ba
import
RulePopup
from
'./rulePopup/index'
import
CoursePopup
from
'./coursePopup/index'
import
RecordPopup
from
'./recordPopup/index'
...
...
@@ -28,11 +20,7 @@ import { CopyToClipboard } from 'react-copy-to-clipboard'
import
{
Toast
}
from
"antd-mobile"
import
Live
from
'./live'
import
Banner
from
'./banner'
<<<<<<<
HEAD
import
{
getParam
}
from
'../../utils'
;
=======
import
{
getParam
}
from
'../../utils'
>>>>>>>
c7f5958a86fc21ab5be3a03fb9e7277cfb2be9ba
class
BlessingPreheat
extends
Component
{
...
...
@@ -86,8 +74,8 @@ class BlessingPreheat extends Component {
}
componentDidMount
()
{
<<<<<<<
HEAD
this
.
fetchUserBlessing
();
this
.
setInitialNavActiveStatus
()
window
.
addEventListener
(
'scroll'
,
throttle
(
this
.
calcNavActive
,
100
));
if
(
is_weixin
())
{
wxShare
({
...
...
@@ -97,11 +85,6 @@ class BlessingPreheat extends Component {
imgUrl
:
'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_1111/m/index-share-img.png'
,
})
}
=======
this
.
fetchUserBlessing
()
this
.
setInitialNavActiveStatus
()
window
.
addEventListener
(
'scroll'
,
throttle
(
this
.
calcNavActive
,
100
))
}
getActiveIndex
=
(
arr
,
n
)
=>
{
...
...
@@ -134,7 +117,6 @@ class BlessingPreheat extends Component {
}
},
30
))
observer
.
observe
(
document
.
querySelector
(
'#blessing-preheat'
),
{
childList
:
true
,
subtree
:
true
})
>>>>>>>
c7f5958a86fc21ab5be3a03fb9e7277cfb2be9ba
}
initNav
=
(
isFormal
)
=>
{
...
...
@@ -152,7 +134,6 @@ class BlessingPreheat extends Component {
}
fetchUserBlessing
()
{
<<<<<<<
HEAD
// 判断登录未登录 根据this.state.userInfo.isLogin
if
(
getParam
(
'version'
))
{
// app 平台
...
...
@@ -160,15 +141,7 @@ class BlessingPreheat extends Component {
// H5
}
const
{
userInfo
}
=
this
.
state
;
=======
// 判断登录未登录 根据this.state.userInfo.isLogin
if
(
getParam
(
'version'
))
{
// app 平台
}
else
{
// H5
}
const
{
userInfo
}
=
this
.
state
>>>>>>>
c7f5958a86fc21ab5be3a03fb9e7277cfb2be9ba
http
.
get
(
`
${
API
.
home
}
/sys/user/blessing`
).
then
(
res
=>
{
const
{
code
,
data
}
=
res
.
data
if
(
code
===
200
)
{
...
...
@@ -211,15 +184,6 @@ class BlessingPreheat extends Component {
}
handleToShow
=
(
key
,
isLogin
=
false
)
=>
{
<<<<<<<
HEAD
const
{
userInfo
}
=
this
.
state
;
// 需要用户登录 并且用户未登录
if
(
isLogin
&&
!
userInfo
.
isLogin
)
{
this
.
toLogin
();
}
else
{
let
obj
=
{};
obj
[
key
]
=
true
;
=======
const
{
userInfo
}
=
this
.
state
// 需要用户登录 并且用户未登录
if
(
isLogin
&&
!
userInfo
.
isLogin
)
{
...
...
@@ -227,7 +191,6 @@ class BlessingPreheat extends Component {
}
else
{
let
obj
=
{}
obj
[
key
]
=
true
>>>>>>>
c7f5958a86fc21ab5be3a03fb9e7277cfb2be9ba
this
.
setState
({
...
obj
})
...
...
@@ -236,32 +199,14 @@ class BlessingPreheat extends Component {
// 邀请好友注册
handleToShowInvite
=
()
=>
{
<<<<<<<
HEAD
const
{
userInfo
}
=
this
.
state
;
if
(
userInfo
.
isLogin
)
{
if
(
!
getParam
(
'version'
))
{
=======
const
{
userInfo
}
=
this
.
state
if
(
userInfo
.
isLogin
)
{
if
(
!
getParam
(
'version'
))
{
>>>>>>>
c7f5958a86fc21ab5be3a03fb9e7277cfb2be9ba
QRCode
.
toDataURL
(
'http://m.julyedu.com/invite'
,
{
width
:
120
,
height
:
120
,
margin
:
1
})
<<<<<<<
HEAD
.
then
(
url
=>
{
this
.
setState
({
inviteUrl
:
url
,
inviteVisible
:
true
});
})
.
catch
(
err
=>
{
console
.
error
(
err
)
});
}
else
{
=======
.
then
(
url
=>
{
this
.
setState
({
inviteUrl
:
url
,
...
...
@@ -272,7 +217,6 @@ class BlessingPreheat extends Component {
console
.
error
(
err
)
})
}
else
{
>>>>>>>
c7f5958a86fc21ab5be3a03fb9e7277cfb2be9ba
let
data
=
{
title
:
'11.11-11.13 AI充电节,预热来袭!重磅好课1折秒,超10万元奖品来就送-七月在线'
,
// 标题
desc
:
'11.11-11.13 AI充电节,预热来袭!重磅好课1折秒,超10万元奖品来就送-七月在线'
,
// 描述
...
...
@@ -282,11 +226,7 @@ class BlessingPreheat extends Component {
SendMessageToApp
(
"toShare"
,
data
)
}
}
else
{
<<<<<<<
HEAD
this
.
toLogin
();
=======
this
.
toLogin
()
>>>>>>>
c7f5958a86fc21ab5be3a03fb9e7277cfb2be9ba
}
}
...
...
@@ -298,21 +238,7 @@ class BlessingPreheat extends Component {
width
:
120
,
height
:
120
,
margin
:
1
})
<<<<<<<
HEAD
.
then
(
url
=>
{
this
.
setState
({
isServer
:
true
,
serverUrl
:
url
,
});
})
.
catch
(
err
=>
{
console
.
error
(
err
)
});
}
else
if
(
errno
===
4030
||
errno
===
4040
)
{
this
.
toLogin
();
=======
.
then
(
url
=>
{
}).
then
(
url
=>
{
this
.
setState
({
isServer
:
true
,
serverUrl
:
url
,
...
...
@@ -323,7 +249,6 @@ class BlessingPreheat extends Component {
})
}
else
if
(
errno
===
4030
||
errno
===
4040
)
{
this
.
toLogin
()
>>>>>>>
c7f5958a86fc21ab5be3a03fb9e7277cfb2be9ba
}
})
}
...
...
@@ -376,11 +301,8 @@ class BlessingPreheat extends Component {
}
let
el
=
document
.
querySelector
(
`#
${
navs
[
_index
].
id
}
`
)
let
nav
=
document
.
querySelector
(
'#main-nav'
)
<<<<<<<
HEAD
if
(
el
)
{
=======
if
(
el
)
{
>>>>>>>
c7f5958a86fc21ab5be3a03fb9e7277cfb2be9ba
let
top
=
el
.
offsetTop
if
(
y
<=
this
.
navTop
)
{
...
...
@@ -421,7 +343,6 @@ class BlessingPreheat extends Component {
showRecordList
,
shareMark
,
index
<<<<<<<
HEAD
}
=
this
.
state
;
const
{
history
}
=
this
.
props
;
return
(
...
...
@@ -432,18 +353,7 @@ class BlessingPreheat extends Component {
toSection
=
{
this
.
toSection
}
index
=
{
index
}
/
>
=======
}
=
this
.
state
const
{
history
}
=
this
.
props
return
(
<
div
id
=
{
'blessing-preheat'
}
>
<
Banner
isFormal
=
{
isFormal
}
navs
=
{
navs
}
toSection
=
{
this
.
toSection
}
index
=
{
index
}
/
>
>>>>>>>
c7f5958a86fc21ab5be3a03fb9e7277cfb2be9ba
{
/* 积福气 */
}
<
ListHeader
id
=
{
'lucky-value'
}
text
=
"积福气,享受更多福利"
styles
=
{{
margin
:
'60px 0 15px'
}}
/
>
<
Link
className
=
"luck-draw__button"
to
=
"/blessingRank"
>
福气排行榜
><
/Link
>
...
...
@@ -477,11 +387,7 @@ class BlessingPreheat extends Component {
}
{
/* 精品课程特惠专区 */
}
<<<<<<<
HEAD
<
ListHeader
id
=
{
'best-courses'
}
text
=
"精品课程特惠专区"
styles
=
{{
margin
:
'30px 0 15px'
}}
/
>
=======
<
ListHeader
id
=
{
'best-courses'
}
text
=
"精品课程特惠专区"
styles
=
{{
margin
:
'30px 0 15px'
}}
/
>
>>>>>>>
c7f5958a86fc21ab5be3a03fb9e7277cfb2be9ba
<
CourseList
isFormal
=
{
isFormal
}
isLogin
=
{
userInfo
.
isLogin
}
toLogin
=
{
this
.
toLogin
}
/
>
{
...
...
@@ -490,12 +396,7 @@ class BlessingPreheat extends Component {
}
{
isCourse
&&
<<<<<<<
HEAD
<
CoursePopup
toLogin
=
{
this
.
toLogin
}
history
=
{
history
}
isLogin
=
{
userInfo
.
isLogin
}
handleToHide
=
{()
=>
this
.
handleToHide
(
'isCourse'
)}
/
>
=======
<
CoursePopup
toLogin
=
{
this
.
toLogin
}
history
=
{
history
}
isLogin
=
{
userInfo
.
isLogin
}
handleToHide
=
{()
=>
this
.
handleToHide
(
'isCourse'
)}
/
>
>>>>>>>
c7f5958a86fc21ab5be3a03fb9e7277cfb2be9ba
}
{
showRecordList
&&
...
...
@@ -523,12 +424,6 @@ class BlessingPreheat extends Component {
<
img
src
=
{
serverUrl
}
alt
=
"barcode"
className
=
"qr-code"
/>
<
/Popup
>
<<<<<<<
HEAD
=======
>>>>>>>
c7f5958a86fc21ab5be3a03fb9e7277cfb2be9ba
<
Popup
visible
=
{
this
.
state
.
joinLotteryVisible
}
title
=
{
'你已成功参与本时段抽奖'
}
className
=
{
'join-lottery'
}
...
...
@@ -555,11 +450,8 @@ class BlessingPreheat extends Component {
<
/Popup
>
<<<<<<<
HEAD
<
ListHeader
id
=
{
'ai-test'
}
text
=
"全国AI工程师水平测试"
styles
=
{{
margin
:
'30px 0 15px'
}}
/
>
=======
<
ListHeader
id
=
{
'ai-test'
}
text
=
"全国AI工程师水平测试"
styles
=
{{
margin
:
'30px 0 15px'
}}
/
>
>>>>>>>
c7f5958a86fc21ab5be3a03fb9e7277cfb2be9ba
<
div
className
=
"test__record"
onClick
=
{()
=>
this
.
handleToShow
(
'showRecordList'
,
true
)}
>
测试记录
>
<
/div
>
...
...
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