Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
yanghanwen
/
wanda-vr
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
577e305b
authored
Sep 11, 2020
by
白宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
html2 canvas text
parent
237a9597
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
11 deletions
+18
-11
route.html
+6
-4
show.html
+6
-3
travel.html
+6
-4
No files found.
route.html
View file @
577e305b
...
...
@@ -592,7 +592,7 @@
<img
class=
"poster-content__qrcode"
:src=
"userInfo.qrcode"
></img>
<div
class=
"poster-content__userinfo"
>
<img
class=
"headimg"
:src=
"userInfo.head"
/>
<div
class=
"tip"
>
快跟着
{{userInfo.nickname}}
<br/>
一起分享丹寨
</div>
<div
class=
"tip"
>
快跟着
我
<br/>
一起分享丹寨
</div>
</div>
</div>
</div>
...
...
@@ -775,8 +775,9 @@ var vueInstance = new Vue({
var
userInfo
=
await
getUserInfo
();
// console.log(userInfo);
var
shareName
=
`快跟着
${
userInfo
.
nickname
.
length
>
4
?
userInfo
.
nickname
.
substr
(
0
,
4
)
:
userInfo
.
nickname
}
一起分享丹寨`
// var shareName = `快跟着${userInfo.nickname.length > 4 ? userInfo.nickname.substr(0, 4) : userInfo.nickname} 一起分享丹寨`
var
shareUserName
=
`一起分享丹寨`
var
shareUserName1
=
`快跟着我`
var
canvas
=
document
.
getElementById
(
"canvasEle"
);
var
ctx
=
canvas
.
getContext
(
"2d"
);
...
...
@@ -800,7 +801,8 @@ var vueInstance = new Vue({
// console.log(head_image)
ctx
.
drawImage
(
head_image
,
dpr
*
395
,
dpr
*
980
,
dpr
*
55
,
dpr
*
55
);
canvasTextAutoLine
(
shareName
,
ctx
,
dpr
*
170
,
dpr
*
465
,
dpr
*
1005
,
32
,
24
,
dpr
)
canvasTextAutoLine
(
shareUserName
,
ctx
,
dpr
*
170
,
dpr
*
465
,
dpr
*
1035
,
32
,
24
,
dpr
)
canvasTextAutoLine
(
shareUserName1
,
ctx
,
dpr
*
170
,
dpr
*
465
,
dpr
*
1005
,
32
,
24
,
dpr
)
canvasTextAutoLine
(
currentInfo
.
content
,
ctx
,
dpr
*
410
,
dpr
*
45
,
dpr
*
220
,
45
,
30
,
dpr
,
true
)
...
...
show.html
View file @
577e305b
...
...
@@ -394,7 +394,7 @@
<img
class=
"poster-content__qrcode"
:src=
"userInfo.qrcode"
></img>
<div
class=
"poster-content__userinfo"
>
<img
class=
"headimg"
:src=
"userInfo.head"
/>
<div
class=
"tip"
>
快跟着
{{userInfo.nickname}}
<br/>
一起分享丹寨
</div>
<div
class=
"tip"
>
快跟着
我
<br/>
一起分享丹寨
</div>
</div>
</div>
</div>
...
...
@@ -540,7 +540,9 @@ var vueInstance = new Vue({
var
userInfo
=
await
getUserInfo
();
console
.
log
(
userInfo
);
var
shareUserName
=
`快跟着
${
userInfo
.
nickname
.
length
>
4
?
userInfo
.
nickname
.
substr
(
0
,
4
)
:
userInfo
.
nickname
}
一起分享丹寨`
// var shareUserName = `快跟着${userInfo.nickname.length > 4 ? userInfo.nickname.substr(0, 4) : userInfo.nickname} 一起分享丹寨`
var
shareUserName
=
`一起分享丹寨`
var
shareUserName1
=
`快跟着我`
var
canvas
=
document
.
getElementById
(
"canvasEle"
);
...
...
@@ -566,7 +568,8 @@ var vueInstance = new Vue({
console
.
log
(
head_image
)
ctx
.
drawImage
(
head_image
,
dpr
*
395
,
dpr
*
980
,
dpr
*
55
,
dpr
*
55
);
canvasTextAutoLine
(
shareUserName
,
ctx
,
dpr
*
170
,
dpr
*
465
,
dpr
*
1005
,
32
,
24
,
dpr
)
canvasTextAutoLine
(
shareUserName
,
ctx
,
dpr
*
170
,
dpr
*
465
,
dpr
*
1035
,
32
,
24
,
dpr
)
canvasTextAutoLine
(
shareUserName1
,
ctx
,
dpr
*
170
,
dpr
*
465
,
dpr
*
1005
,
32
,
24
,
dpr
)
canvasTextAutoLine
(
this
.
shareDesc
,
ctx
,
dpr
*
410
,
dpr
*
45
,
dpr
*
290
,
45
,
30
,
dpr
,
true
)
...
...
travel.html
View file @
577e305b
...
...
@@ -430,7 +430,7 @@
<img
class=
"poster-content__qrcode"
:src=
"userInfo.qrcode"
></img>
<div
class=
"poster-content__userinfo"
>
<img
class=
"headimg"
:src=
"userInfo.head"
/>
<div
class=
"tip"
>
快跟着
{{userInfo.nickname}}
<br/>
一起分享丹寨
</div>
<div
class=
"tip"
>
快跟着
我
<br/>
一起分享丹寨
</div>
</div>
</div>
</div>
...
...
@@ -597,8 +597,9 @@ var vueInstance = new Vue({
var
userInfo
=
await
getUserInfo
();
// console.log(userInfo);
var
shareName
=
`快跟着
${
userInfo
.
nickname
.
length
>
4
?
userInfo
.
nickname
.
substr
(
0
,
4
)
:
userInfo
.
nickname
}
一起分享丹寨`
// var shareName = `快跟着${userInfo.nickname.length > 4 ? userInfo.nickname.substr(0, 4) : userInfo.nickname} 一起分享丹寨`
var
shareUserName
=
`一起分享丹寨`
var
shareUserName1
=
`快跟着我`
var
canvas
=
document
.
getElementById
(
"canvasEle"
);
var
ctx
=
canvas
.
getContext
(
"2d"
);
...
...
@@ -622,7 +623,8 @@ var vueInstance = new Vue({
// console.log(head_image)
ctx
.
drawImage
(
head_image
,
dpr
*
395
,
dpr
*
980
,
dpr
*
55
,
dpr
*
55
);
canvasTextAutoLine
(
shareName
,
ctx
,
dpr
*
170
,
dpr
*
465
,
dpr
*
1005
,
32
,
24
,
dpr
)
canvasTextAutoLine
(
shareUserName
,
ctx
,
dpr
*
170
,
dpr
*
465
,
dpr
*
1035
,
32
,
24
,
dpr
)
canvasTextAutoLine
(
shareUserName1
,
ctx
,
dpr
*
170
,
dpr
*
465
,
dpr
*
1005
,
32
,
24
,
dpr
)
canvasTextAutoLine
(
currentInfo
.
content
,
ctx
,
dpr
*
410
,
dpr
*
45
,
dpr
*
220
,
45
,
30
,
dpr
,
true
)
...
...
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