Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
ydLife
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
Sweet Zhang
ydLife
Commits
8e90446d
Commit
8e90446d
authored
Mar 06, 2020
by
Chao Sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
默认二维码不显示&弹框样式调整
parent
1446374f
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
5 deletions
+14
-5
src/app/common/alert/alert.component.html
+1
-2
src/app/my/mk-material-detail/mk-material-detail.component.ts
+5
-3
src/styles.scss
+8
-0
No files found.
src/app/common/alert/alert.component.html
View file @
8e90446d
...
...
@@ -7,9 +7,8 @@
class=
"weui-dialog__title"
>
{{dialogInfo.title}}
</strong></div>
<div
class=
"weui-dialog__bd"
[
ngStyle
]="{'
text-align
'
:dialogInfo
.
content
.
align
}"
>
{{dialogInfo.content.value}}
</div>
<div
class=
"weui-dialog__ft"
style=
"line-height: normal;min-height: auto;
width: 30%;
margin: 0 auto 10px auto;"
>
<div
class=
"weui-dialog__ft"
style=
"line-height: normal;min-height: auto;margin: 0 auto 10px auto;"
>
<a
href=
"javascript:;"
class=
"weui-dialog__btn"
[
ngClass
]="
footer
.
className
"
style=
"width: 75%;background: red;color: #fff;border-radius: 10px;padding:5px 10px;font-weight: normal;"
*
ngFor=
"let footer of dialogInfo.footer"
(
click
)="
sendInfo
()"
>
{{footer.value}}
</a>
</div>
</div>
...
...
src/app/my/mk-material-detail/mk-material-detail.component.ts
View file @
8e90446d
...
...
@@ -60,14 +60,14 @@ export class MkMaterialDetailComponent implements OnInit {
// 画圆形头像
const
avatarurlWidth
=
50
*
ratio
;
// 绘制的头像宽度
const
avatarurlHeigth
=
50
*
ratio
;
// 绘制的头像高度
const
avatarurlX
=
1
0
*
ratio
;
// 绘制的头像在画布上的位置
const
avatarurlX
=
2
0
*
ratio
;
// 绘制的头像在画布上的位置
const
avatarurlY
=
this
.
canvas
.
nativeElement
.
height
-
(
this
.
contentHeight
+
50
)
/
2
*
ratio
;
// 绘制的头像在画布上的位置
const
avatarImg
=
new
Image
();
avatarImg
.
setAttribute
(
'crossOrigin'
,
'anonymous'
);
if
(
this
.
lifeCustomerInfo
.
practitionerBasicInfo
.
headImagePath
)
{
avatarImg
.
src
=
this
.
lifeCustomerInfo
.
practitionerBasicInfo
.
headImagePath
+
'?v='
+
new
Date
().
getTime
();
}
else
{
avatarImg
.
src
=
`
assets/images
/meng.png?v=
${
new
Date
().
getTime
()}
`
;
avatarImg
.
src
=
`
${
environment
.
ORIGINNAME
}
/assets/img
/meng.png?v=
${
new
Date
().
getTime
()}
`
;
}
// 这里的第一张图片就是可以是你们的海报 这里注意绘制的顺序 我们要手动控制
img
.
src
=
this
.
productPosterPath
;
...
...
@@ -94,8 +94,10 @@ export class MkMaterialDetailComponent implements OnInit {
shareQr
.
src
=
qrcodeUrl
;
}
shareQr
.
onload
=
()
=>
{
const
qrcodeBgX
=
document
.
body
.
clientWidth
-
(
this
.
rightWidth
+
this
.
qrcodeBgWidth
);
//二维码位置
const
qrcodeBgX
=
document
.
body
.
clientWidth
-
(
this
.
rightWidth
+
this
.
qrcodeBgWidth
+
20
);
const
qrcodeBgY
=
document
.
body
.
clientHeight
-
(
this
.
bottomHeight
+
this
.
qrcodeBgWidth
);
//二维码底边padding
const
qrcodeX
=
qrcodeBgX
+
this
.
qrcodePadding
;
const
qrcodeY
=
qrcodeBgY
+
this
.
qrcodePadding
;
ctx
.
fillStyle
=
'#fff'
;
...
...
src/styles.scss
View file @
8e90446d
...
...
@@ -56,3 +56,11 @@ input::placeholder {
margin-right
:
0
;
}
.weui-dialog__btn
{
background
:
red
;
color
:
#fff
;
border-radius
:
10px
;
padding
:
5px
12px
;
font-weight
:
normal
;
}
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