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
16e735cb
Commit
16e735cb
authored
Nov 04, 2019
by
zhanghaozhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
大咖直播二维码
parent
1ef670f9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
61 additions
and
25 deletions
+61
-25
src/common/closable-popup/index.scss
+1
-1
src/components/blessingPreheat/live/index.js
+41
-22
src/components/blessingPreheat/live/index.scss
+16
-1
src/utils/index.js
+3
-1
No files found.
src/common/closable-popup/index.scss
View file @
16e735cb
...
...
@@ -25,7 +25,7 @@
.close
{
position
:
absolute
;
bottom
:
-
88
px
;
bottom
:
-
74
px
;
left
:
50%
;
transform
:
translateX
(
-50%
);
font-size
:
36px
;
...
...
src/components/blessingPreheat/live/index.js
View file @
16e735cb
...
...
@@ -69,22 +69,32 @@ class Live extends Component {
}
toLiveRoom
=
id
=>
{
const
{
history
,
isLogin
}
=
this
.
props
;
const
{
history
,
isLogin
}
=
this
.
props
if
(
this
.
state
.
isApp
)
{
if
(
isLogin
)
{
if
(
isLogin
)
{
SendMessageToApp
(
'toLiveRoom'
,
id
)
}
else
{
}
else
{
SendMessageToApp
(
"toLogin"
)
}
}
else
{
if
(
isLogin
)
{
if
(
isLogin
)
{
window
.
location
.
href
=
`
${
window
.
location
.
protocol
}
//www.julyedu.com/live/m_room/
${
id
}
`
}
else
{
}
else
{
history
.
push
(
'/passport'
)
}
}
}
saveImage
=
()
=>
{
let
version
=
getParam
(
'version'
)
version
=
typeof
version
===
'string'
?
version
.
replace
(
'.'
,
''
).
slice
(
0
,
3
)
:
''
if
(
version
&&
parseInt
(
version
)
<
451
)
{
}
else
{
// Toast.info('当前不支持此功能,升级到最新版本app可以点击保存二维码!', 2, null, false)
}
}
makeSubscribe
=
id
=>
{
const
{
user
,
history
}
=
this
.
props
if
(
user
.
hasError
)
{
...
...
@@ -97,7 +107,12 @@ class Live extends Component {
QRCode
.
toDataURL
(
data
.
data
.
url
,
(
err
,
url
)
=>
{
Popup
({
title
:
'扫码关注“七月在线”服务号即可预约'
,
content
:
<
img
id
=
{
'live-qr-code'
}
src
=
{
url
}
alt
=
""
/>
content
:
(
<>
<
img
id
=
{
'live-qr-code'
}
src
=
{
url
}
alt
=
""
/>
<
button
className
=
{
'save-image'
}
onClick
=
{
this
.
saveImage
}
>
保存二维码
<
/button
>
<
/
>
)
})
})
}
else
{
...
...
@@ -136,27 +151,29 @@ class Live extends Component {
{
todayLives
.
map
((
item
,
index
)
=>
{
return
(
<
LiveContent
item
=
{
item
}
key
=
{
index
}
makeSubscribe
=
{
this
.
makeSubscribe
}
toLiveRoom
=
{
this
.
toLiveRoom
}
/
>
<
LiveContent
item
=
{
item
}
key
=
{
index
}
makeSubscribe
=
{
this
.
makeSubscribe
}
toLiveRoom
=
{
this
.
toLiveRoom
}
/
>
)
})
}
<
/div
>
)
})
:
tabs
.
map
((
item
,
index
)
=>
{
const
todayLives
=
preheatLives
[
item
.
title
]
return
(
<
div
key
=
{
index
}
>
{
todayLives
.
map
((
item
,
index
)
=>
{
return
(
<
LiveContent
item
=
{
item
}
key
=
{
index
}
makeSubscribe
=
{
this
.
makeSubscribe
}
toLiveRoom
=
{
this
.
toLiveRoom
}
/
>
)
})
}
<
/div
>
)
})
:
tabs
.
map
((
item
,
index
)
=>
{
const
todayLives
=
preheatLives
[
item
.
title
]
return
(
<
div
key
=
{
index
}
>
{
todayLives
.
map
((
item
,
index
)
=>
{
return
(
<
LiveContent
item
=
{
item
}
key
=
{
index
}
makeSubscribe
=
{
this
.
makeSubscribe
}
toLiveRoom
=
{
this
.
toLiveRoom
}
/
>
)
})
}
<
/div
>
)
})
}
<
/Tabs
>
...
...
@@ -201,7 +218,9 @@ function LiveContent({item, makeSubscribe, toLiveRoom}) {
<
/div
>
{
item
[
'on_live'
]
?
<
button
className
=
{
'on-living'
}
onClick
=
{()
=>
{
toLiveRoom
(
item
[
'room_url'
])}}
>
正在直播
<
/button
>
?
<
button
className
=
{
'on-living'
}
onClick
=
{()
=>
{
toLiveRoom
(
item
[
'room_url'
])
}}
>
正在直播
<
/button
>
:
item
[
'is_end'
]
?
<
button
className
=
{
'subscribed'
}
>
已结束
<
/button
>
...
...
src/components/blessingPreheat/live/index.scss
View file @
16e735cb
...
...
@@ -227,12 +227,27 @@
.content
{
display
:
flex
;
justify-content
:
center
;
flex-direction
:
column
;
align-items
:
center
;
img
{
width
:
120px
;
height
:
120px
;
margin-top
:
10px
;
}
}
.save-image
{
width
:
133px
;
height
:
30px
;
margin-top
:
16px
;
background
:
rgba
(
83
,
39
,
250
,
1
);
border-radius
:
15px
;
font-size
:
14px
;
color
:
#fff
;
-webkit-appearance
:
none
;
outline
:
0
;
border
:
none
;
}
}
src/utils/index.js
View file @
16e735cb
...
...
@@ -83,7 +83,9 @@ const browser = (function () {
isWeixin
:
/MicroMessenger/i
.
test
(
ua
),
isAndroid
:
/Android/i
.
test
(
ua
),
isIOS
:
/
\(
i
[^
;
]
+;
(
U;
)?
CPU.+Mac OS X/i
.
test
(
ua
),
isIPad
:
/iPad/i
.
test
(
ua
)
isIPad
:
/iPad/i
.
test
(
ua
),
isAndroidApp
:
/Android/i
.
test
(
ua
)
&&
getParam
(
'version'
),
isIOSApp
:
/iPhone/i
.
test
(
ua
)
&&
getParam
(
'version'
)
}
})()
...
...
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