Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xiaomai-cloud-class-web
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xiaomai-cloud-class
xiaomai-cloud-class-web
Commits
00d38a54
Commit
00d38a54
authored
Jun 10, 2021
by
zhangleyuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:修改图片模糊的问题
parent
81d33c35
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
160 additions
and
64 deletions
+160
-64
src/modules/course-manage/modal/ShareLiveModal.jsx
+24
-1
src/modules/course-manage/modal/ShareLiveModal.less
+136
-63
No files found.
src/modules/course-manage/modal/ShareLiveModal.jsx
View file @
00d38a54
...
...
@@ -74,7 +74,7 @@ class ShareLiveModal extends React.Component {
()
=>
{
this
.
setState
({
time
:
new
Date
().
valueOf
()
},
()
=>
{
setTimeout
(()
=>
{
let
node
=
document
.
getElementById
(
'poster'
)
let
node
=
document
.
getElementById
(
'poster
2
'
)
domtoimage
.
toPng
(
node
).
then
((
imgData
)
=>
{
console
.
log
(
imgData
)
const
download
=
document
.
createElement
(
'a'
)
...
...
@@ -156,6 +156,29 @@ class ShareLiveModal extends React.Component {
<
div
className=
'qrcode-wrap__right'
id=
'qrcodeWrap'
></
div
>
</
div
>
</
div
>
<
div
id=
'poster2'
>
<
div
className=
'store-name'
>
<
span
className=
'text'
>
{
User
.
getStoreName
()
}
</
span
>
</
div
>
<
div
className=
'course-name-title'
>
{
type
===
'videoClass'
?
`${courseName}开课啦`
:
`邀请你观看直播:`
}
</
div
>
{
type
===
'liveClass'
&&
<
div
class=
'live-couse-name'
>
{
courseName
}
</
div
>
}
<
Choose
>
<
When
condition=
{
showImg
}
>
<
img
crossOrigin=
'*'
src=
{
coverImgSrc
+
`?=${time}`
}
className=
'course-cover'
alt=
''
/>
</
When
>
<
Otherwise
>
<
img
src=
{
coverImgSrc
+
`?=${time}`
}
className=
'course-cover'
alt=
''
/>
</
Otherwise
>
</
Choose
>
<
div
className=
'qrcode-wrap'
>
<
div
className=
'qrcode-wrap__left'
>
<
div
className=
'text'
>
长按识别二维码进入观看
</
div
>
<
img
className=
'finger'
src=
'https://image.xiaomaiketang.com/xm/thpkWDwJsC.png'
alt=
''
/>
</
div
>
<
div
className=
'qrcode-wrap__right'
id=
'qrcodeWrap'
></
div
>
</
div
>
</
div
>
</
div
>
<
div
className=
'right'
>
<
div
className=
'share-poster right__item'
>
...
...
src/modules/course-manage/modal/ShareLiveModal.less
View file @
00d38a54
.share-live-modal {
.ant-modal-body {
display: flex;
#poster{
background: #FFF;
margin:0;
padding: 20px;
}
.left {
width: 303px;
margin: 0 32px 0 16px;
box-shadow:0px 2px 10px 0px rgba(0,0,0,0.05);
border-radius: 12px;
.course-name-title {
font-size: 14px;
color: #333;
line-height: 20px;
margin-bottom: 4px;
}
.live-couse-name{
font-size:16px;
color:#333333;
font-weight: 600;
}
.course-name {
#poster{
background: #FFF;
margin:0;
padding: 20px;
.course-name-title {
font-size: 14px;
color: #333;
font-size: 16px;
font-weight: 600;
line-height: 20px;
}
.course-cover {
width: 263px;
height: 143px;
border-radius: 6px;
margin-top: 8px;
}
margin-bottom: 4px;
}
.live-couse-name{
font-size:16px;
color:#333333;
font-weight: 600;
}
.course-name {
color: #333;
font-size: 16px;
font-weight: 600;
line-height: 20px;
}
.course-cover {
width: 263px;
height: 143px;
border-radius: 6px;
margin-top: 8px;
}
.qrcode-wrap {
padding: 0 16px;
display: flex;
align-items: center;
margin: 24px 0 16px 0;
.qrcode-wrap {
padding: 0 16px;
display: flex;
align-items: center;
margin: 24px 0 16px 0;
&__left {
width: 98px;
text-align: center;
margin-right: 22px;
.text {
line-height: 20px;
&__left {
width: 98px;
text-align: center;
margin-right: 22px;
.text {
line-height: 20px;
}
.finger {
width: 40px;
height: 40px;
margin-top: 8px;
}
}
.finger
{
width:
4
0px;
height:
4
0px;
margin-top: 8px;
&__right
{
width:
11
0px;
height:
11
0px;
padding: 6px
}
}
&__right {
width: 110px;
height: 110px;
padding: 6px
.store-name {
// padding: 8px 16px;
display: flex;
align-items: center;
margin-bottom: 8px;
.text {
font-size: 12px;
color: #999;
font-size: 14px;
line-height: 20px;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
width: 100%;
}
}
}
.store-name {
// padding: 8px 16px;
display: flex;
align-items: center;
margin-bottom: 8px;
.text {
font-size: 12px;
color: #999;
font-size: 14px;
#poster2{
background: #FFF;
margin:0;
padding: 20px;
.course-name-title {
font-size: 14px;
color: #333;
line-height: 20px;
margin-bottom: 4px;
}
.live-couse-name{
font-size:16px;
color:#333333;
font-weight: 600;
}
.course-name {
color: #333;
font-size: 16px;
font-weight: 600;
line-height: 20px;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
width: 100%;
}
.course-cover {
width: 526px;
height: 286px;
border-radius: 6px;
margin-top: 8px;
}
.qrcode-wrap {
padding: 0 16px;
display: flex;
align-items: center;
margin: 24px 0 16px 0;
&__left {
width: 98px;
text-align: center;
margin-right: 22px;
.text {
line-height: 20px;
}
.finger {
width: 40px;
height: 40px;
margin-top: 8px;
}
}
&__right {
width: 110px;
height: 110px;
padding: 6px
}
}
.store-name {
// padding: 8px 16px;
display: flex;
align-items: center;
margin-bottom: 8px;
.text {
font-size: 12px;
color: #999;
font-size: 14px;
line-height: 20px;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
width: 100%;
}
}
}
}
.right {
.title {
color: #333;
...
...
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