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
7b8ee3af
Commit
7b8ee3af
authored
Jan 03, 2020
by
xuzhenghua
Browse files
Options
Browse Files
Download
Plain Diff
PULL
parents
7354fb6f
e29a45cd
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
52 additions
and
73 deletions
+52
-73
src/App.js
+37
-6
src/assets/css/index.scss
+0
-16
src/components/Index/index.scss
+3
-1
src/components/activity/newyear-2019/landing/index.js
+0
-41
src/components/detail/btnstatus/index.js
+12
-9
No files found.
src/App.js
View file @
7b8ee3af
...
@@ -37,6 +37,7 @@ class App extends Component {
...
@@ -37,6 +37,7 @@ class App extends Component {
componentDidMount
()
{
componentDidMount
()
{
this
.
umengStatistic
()
this
.
umengStatistic
()
this
.
QimoClient
()
//平台信息
//平台信息
...
@@ -276,13 +277,43 @@ class App extends Component {
...
@@ -276,13 +277,43 @@ class App extends Component {
}
}
}
}
// 七陌客服代码 start
QimoClient
=
()
=>
{
let
utm_source
=
getParam
(
'utm_source'
)
let
utm_medium
=
getParam
(
'utm_medium'
)
let
utm_campaign
=
getParam
(
'utm_campaign'
)
let
utm_content
=
getParam
(
'utm_content'
)
let
utm_term
=
getParam
(
'utm_term'
)
var
src
=
''
// 知乎投放
if
(
utm_term
&&
utm_source
&&
utm_medium
&&
utm_campaign
&&
utm_content
)
{
src
=
'https://webchat.7moor.com/javascripts/7moorInit.js?accessId=e2ca4f90-2d04-11ea-84c3-43908ae47640&autoShow=true&language=ZHCN'
}
else
{
// m端
src
=
'https://webchat.7moor.com/javascripts/7moorInit.js?accessId=fbcf9aa0-2d03-11ea-84c3-43908ae47640&autoShow=true&language=ZHCN'
}
var
script
=
document
.
createElement
(
'script'
)
script
.
type
=
'text/javascript'
script
.
src
=
src
script
.
async
=
'async'
var
qimoClientId
=
''
// 自定义用户的唯一id,由英文字母,数字,下划线组成
http
.
get
(
`
${
API
[
'home'
]}
/qiMoUserId`
)
.
then
(
res
=>
{
qimoClientId
=
res
.
data
.
userId
document
.
body
.
appendChild
(
script
)
})
}
// 七陌客服代码 end
render
()
{
render
()
{
return
<>
return
<
Routes
/>
<
Routes
/>
<
Link
className
=
{
'year19-index'
}
to
=
"/year/yearindex"
>
<
img
src
=
"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/gift-package.png"
alt
=
""
/>
<
/Link
>
<
/
>
}
}
}
}
...
...
src/assets/css/index.scss
View file @
7b8ee3af
...
@@ -512,18 +512,3 @@ input[type="radio"]:checked:before {
...
@@ -512,18 +512,3 @@ input[type="radio"]:checked:before {
color
:
#333
;
color
:
#333
;
font-size
:
15px
;
font-size
:
15px
;
}
}
.year19-index
{
display
:
block
;
width
:
58px
;
height
:
70px
;
position
:
fixed
;
top
:
50%
;
right
:
0
;
margin-top
:
-35px
;
z-index
:
9
;
img
{
width
:
100%
;
height
:
100%
;
}
}
\ No newline at end of file
src/components/Index/index.scss
View file @
7b8ee3af
#chatBtn
{
bottom
:
60px
!
important
;
}
.index-box
{
.index-box
{
overflow
:
hidden
;
overflow
:
hidden
;
background-color
:
$bg_fff
;
background-color
:
$bg_fff
;
...
...
src/components/activity/newyear-2019/landing/index.js
View file @
7b8ee3af
...
@@ -38,7 +38,6 @@ class Landing extends Component {
...
@@ -38,7 +38,6 @@ class Landing extends Component {
}
}
componentDidMount
()
{
componentDidMount
()
{
this
.
getStage
();
this
.
fetchPageData
()
this
.
fetchPageData
()
window
.
showFollowAlert
=
this
.
remind
.
bind
(
this
,
'create'
)
window
.
showFollowAlert
=
this
.
remind
.
bind
(
this
,
'create'
)
document
.
title
=
'七月在线年终大回馈,幸运宝箱随你开,100%有奖!'
document
.
title
=
'七月在线年终大回馈,幸运宝箱随你开,100%有奖!'
...
@@ -48,7 +47,6 @@ class Landing extends Component {
...
@@ -48,7 +47,6 @@ class Landing extends Component {
landing
.
style
.
minHeight
=
`
${
window
.
innerHeight
}
px`
landing
.
style
.
minHeight
=
`
${
window
.
innerHeight
}
px`
boxContainer
.
style
.
minHeight
=
`
${
window
.
innerHeight
}
px`
boxContainer
.
style
.
minHeight
=
`
${
window
.
innerHeight
}
px`
}
}
this
.
createMeta
();
}
}
componentDidUpdate
(
prevProps
)
{
componentDidUpdate
(
prevProps
)
{
...
@@ -66,45 +64,6 @@ class Landing extends Component {
...
@@ -66,45 +64,6 @@ class Landing extends Component {
this
.
shareTipPopup
&&
this
.
shareTipPopup
.
remove
()
this
.
shareTipPopup
&&
this
.
shareTipPopup
.
remove
()
}
}
// 获取活动以及宝箱的阶段
getStage
=
()
=>
{
http
.
get
(
`
${
API
.
home
}
/activity/stage`
).
then
(
res
=>
{
const
{
code
,
data
,
msg
}
=
res
.
data
if
(
code
===
200
)
{
if
(
Number
(
data
.
activity_stage
)
===
0
)
{
this
.
props
.
history
.
push
(
'/'
);
return
;
}
}
else
{
Toast
.
info
(
msg
,
2
)
}
})
}
createMeta
=
(
title
,
dec
,
imgname
)
=>
{
let
meta
=
document
.
createElement
(
'meta'
);
meta
.
setAttribute
(
'name'
,
'description'
)
meta
.
setAttribute
(
'itemprop'
,
'description'
)
meta
.
setAttribute
(
'content'
,
'这里是自定义分享的描述'
)
let
meta2
=
document
.
createElement
(
'meta'
);
meta2
.
setAttribute
(
'itemprop'
,
'name'
)
meta2
.
setAttribute
(
'content'
,
'这里是标题'
)
let
meta3
=
document
.
createElement
(
'meta'
);
meta3
.
setAttribute
(
'itemprop'
,
'image'
)
meta3
.
setAttribute
(
'content'
,
'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/wx-share-icon.png'
)
let
head
=
document
.
getElementsByTagName
(
'head'
)[
0
];
head
.
appendChild
(
meta
);
head
.
appendChild
(
meta2
);
head
.
appendChild
(
meta3
);
}
componentWillUnmount
()
{
this
.
shareTipPopup
&&
this
.
shareTipPopup
.
remove
()
}
createMeta
=
(
title
,
dec
,
imgname
)
=>
{
createMeta
=
(
title
,
dec
,
imgname
)
=>
{
let
meta
=
document
.
createElement
(
'meta'
)
let
meta
=
document
.
createElement
(
'meta'
)
meta
.
setAttribute
(
'name'
,
'description'
)
meta
.
setAttribute
(
'name'
,
'description'
)
...
...
src/components/detail/btnstatus/index.js
View file @
7b8ee3af
...
@@ -314,6 +314,9 @@ class BtnStatus extends Component {
...
@@ -314,6 +314,9 @@ class BtnStatus extends Component {
});
});
}
}
qimoChatClick
=
()
=>
{
qimoChatClick
()
}
render
()
{
render
()
{
// data 课程信息;barInfo 砍价信息
// data 课程信息;barInfo 砍价信息
const
{
user
=
{},
toCart
,
country
}
=
this
.
props
;
const
{
user
=
{},
toCart
,
country
}
=
this
.
props
;
...
@@ -352,7 +355,7 @@ class BtnStatus extends Component {
...
@@ -352,7 +355,7 @@ class BtnStatus extends Component {
{
{
info
.
is_baoming
===
0
&&
info
.
group_status
!==
3
&&
info
.
is_baoming
===
0
&&
info
.
group_status
!==
3
&&
<
div
className
=
'btns-box'
>
<
div
className
=
'btns-box'
>
<
a
className
=
'consult consult-s'
href
=
"https://q.url.cn/AB8aue?_type=wpa&qidian=true"
>
<
a
className
=
'consult consult-s'
onClick
=
{()
=>
this
.
qimoChatClick
()}
>
<
i
className
=
'iconfont iconerji'
><
/i
>
<
i
className
=
'iconfont iconerji'
><
/i
>
<
span
>
课程咨询
<
/span
>
<
span
>
课程咨询
<
/span
>
<
/a
>
<
/a
>
...
@@ -373,7 +376,7 @@ class BtnStatus extends Component {
...
@@ -373,7 +376,7 @@ class BtnStatus extends Component {
{
{
info
.
is_baoming
===
0
&&
info
.
is_deposit
!=
0
&&
info
.
is_baoming
===
0
&&
info
.
is_deposit
!=
0
&&
<
div
className
=
'btns-box'
>
<
div
className
=
'btns-box'
>
<
a
className
=
'consult consult-m'
href
=
"https://q.url.cn/AB8aue?_type=wpa&qidian=true"
>
<
a
className
=
'consult consult-m'
onClick
=
{()
=>
this
.
qimoChatClick
()}
>
<
i
className
=
'iconfont iconerji'
/>
<
i
className
=
'iconfont iconerji'
/>
<
span
>
课程咨询
<
/span
>
<
span
>
课程咨询
<
/span
>
<
/a
>
<
/a
>
...
@@ -387,7 +390,7 @@ class BtnStatus extends Component {
...
@@ -387,7 +390,7 @@ class BtnStatus extends Component {
{
{
info
.
is_baoming
===
1
&&
info
.
is_baoming
===
1
&&
<
div
className
=
'btns-box'
>
<
div
className
=
'btns-box'
>
<
a
className
=
'consult consult-m'
href
=
"https://q.url.cn/AB8aue?_type=wpa&qidian=true"
>
<
a
className
=
'consult consult-m'
onClick
=
{()
=>
this
.
qimoChatClick
()}
>
<
i
className
=
'iconfont iconerji'
/>
<
i
className
=
'iconfont iconerji'
/>
<
span
>
课程咨询
<
/span
>
<
span
>
课程咨询
<
/span
>
<
/a
>
<
/a
>
...
@@ -400,7 +403,7 @@ class BtnStatus extends Component {
...
@@ -400,7 +403,7 @@ class BtnStatus extends Component {
{
{
info
.
is_baoming
===
0
&&
info
.
group_status
===
3
&&
info
.
is_baoming
===
0
&&
info
.
group_status
===
3
&&
<
div
className
=
'btns-box'
>
<
div
className
=
'btns-box'
>
<
a
className
=
'consult consult-s'
href
=
"https://q.url.cn/AB8aue?_type=wpa&qidian=true"
>
<
a
className
=
'consult consult-s'
onClick
=
{()
=>
this
.
qimoChatClick
()}
>
<
i
className
=
'iconfont iconerji'
><
/i
>
<
i
className
=
'iconfont iconerji'
><
/i
>
<
span
>
课程咨询
<
/span
>
<
span
>
课程咨询
<
/span
>
<
/a
>
<
/a
>
...
@@ -421,7 +424,7 @@ class BtnStatus extends Component {
...
@@ -421,7 +424,7 @@ class BtnStatus extends Component {
{
{
info
.
is_baoming
===
0
&&
info
.
group_status
===
4
&&
info
.
is_baoming
===
0
&&
info
.
group_status
===
4
&&
<
div
className
=
'btns-box'
>
<
div
className
=
'btns-box'
>
<
a
className
=
'consult consult-s'
href
=
"https://q.url.cn/AB8aue?_type=wpa&qidian=true"
>
<
a
className
=
'consult consult-s'
onClick
=
{()
=>
this
.
qimoChatClick
()}
>
<
i
className
=
'iconfont iconerji'
><
/i
>
<
i
className
=
'iconfont iconerji'
><
/i
>
<
span
>
课程咨询
<
/span
>
<
span
>
课程咨询
<
/span
>
<
/a
>
<
/a
>
...
@@ -435,7 +438,7 @@ class BtnStatus extends Component {
...
@@ -435,7 +438,7 @@ class BtnStatus extends Component {
{
{
info
.
is_baoming
===
0
&&
this
.
props
.
data
&&
this
.
props
.
data
.
is_bargain
&&
info
.
is_baoming
===
0
&&
this
.
props
.
data
&&
this
.
props
.
data
.
is_bargain
&&
<
div
className
=
'btns-box'
>
<
div
className
=
'btns-box'
>
<
a
className
=
'consult consult-s'
href
=
"https://q.url.cn/AB8aue?_type=wpa&qidian=true"
>
<
a
className
=
'consult consult-s'
onClick
=
{()
=>
this
.
qimoChatClick
()}
>
<
i
className
=
'iconfont iconerji'
><
/i
>
<
i
className
=
'iconfont iconerji'
><
/i
>
<
span
>
课程咨询
<
/span
>
<
span
>
课程咨询
<
/span
>
<
/a
>
<
/a
>
...
@@ -463,7 +466,7 @@ class BtnStatus extends Component {
...
@@ -463,7 +466,7 @@ class BtnStatus extends Component {
{
{
this
.
state
.
isbuy
===
20
&&
this
.
state
.
isbuy
===
20
&&
<
div
className
=
'btns-box'
>
<
div
className
=
'btns-box'
>
<
a
className
=
'consult-l'
href
=
"https://q.url.cn/AB8aue?_type=wpa&qidian=true"
>
<
a
className
=
'consult-l'
onClick
=
{()
=>
this
.
qimoChatClick
()}
>
<
i
className
=
'iconfont iconerji'
><
/i
>
<
i
className
=
'iconfont iconerji'
><
/i
>
<
span
>
课程咨询
<
/span
>
<
span
>
课程咨询
<
/span
>
<
/a
>
<
/a
>
...
@@ -474,7 +477,7 @@ class BtnStatus extends Component {
...
@@ -474,7 +477,7 @@ class BtnStatus extends Component {
{
{
(
info
.
is_aist
&&
(
this
.
props
.
user
.
hasError
||
info
.
is_baoming
===
0
))
&&
(
info
.
is_aist
&&
(
this
.
props
.
user
.
hasError
||
info
.
is_baoming
===
0
))
&&
<
div
className
=
'btns-box'
>
<
div
className
=
'btns-box'
>
<
a
className
=
'consult consult-m'
href
=
"https://q.url.cn/AB8aue?_type=wpa&qidian=true"
>
<
a
className
=
'consult consult-m'
onClick
=
{()
=>
this
.
qimoChatClick
()}
>
<
i
className
=
'iconfont iconerji'
><
/i
>
<
i
className
=
'iconfont iconerji'
><
/i
>
<
span
>
课程咨询
<
/span
>
<
span
>
课程咨询
<
/span
>
<
/a
>
<
/a
>
...
@@ -488,7 +491,7 @@ class BtnStatus extends Component {
...
@@ -488,7 +491,7 @@ class BtnStatus extends Component {
{
{
info
.
is_aist
&&
!
this
.
props
.
user
.
hasError
&&
info
.
is_baoming
===
1
&&
info
.
is_aist
&&
!
this
.
props
.
user
.
hasError
&&
info
.
is_baoming
===
1
&&
<
div
className
=
'btns-box'
>
<
div
className
=
'btns-box'
>
<
a
className
=
'consult consult-m'
href
=
"https://q.url.cn/AB8aue?_type=wpa&qidian=true"
>
<
a
className
=
'consult consult-m'
onClick
=
{()
=>
this
.
qimoChatClick
()}
>
<
i
className
=
'iconfont iconerji'
><
/i
>
<
i
className
=
'iconfont iconerji'
><
/i
>
<
span
>
课程咨询
<
/span
>
<
span
>
课程咨询
<
/span
>
<
/a
>
<
/a
>
...
...
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