Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
group-buy-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
ui
group-buy-ui
Commits
b5ea4874
Commit
b5ea4874
authored
Sep 26, 2021
by
Xuguangxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 处理海报兼容问题
parent
8c84c6af
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
sharePic.vue
src/components/sharePic.vue
+12
-1
No files found.
src/components/sharePic.vue
View file @
b5ea4874
...
@@ -159,6 +159,16 @@ export default {
...
@@ -159,6 +159,16 @@ export default {
}
}
});
});
},
},
randomString
(
e
)
{
e
=
e
||
10
;
let
t
=
'
ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678
'
;
let
a
=
t
.
length
;
let
n
=
''
;
for
(
let
i
=
0
;
i
<
e
;
i
++
)
{
n
+=
t
.
charAt
(
Math
.
floor
(
Math
.
random
()
*
a
));
}
return
n
;
},
async
createAndUploadPic
(
sharePicData
)
{
async
createAndUploadPic
(
sharePicData
)
{
this
.
sharePicData
=
sharePicData
;
this
.
sharePicData
=
sharePicData
;
let
endTime
=
sharePicData
.
endTime
?
sharePicData
.
endTime
.
split
(
'
'
)[
0
]
:
''
;
let
endTime
=
sharePicData
.
endTime
?
sharePicData
.
endTime
.
split
(
'
'
)[
0
]
:
''
;
...
@@ -176,9 +186,10 @@ export default {
...
@@ -176,9 +186,10 @@ export default {
width
:
1080
,
width
:
1080
,
height
:
1920
,
height
:
1920
,
useCORS
:
true
,
useCORS
:
true
,
scale
:
3
,
scale
:
1
,
allowTaint
:
false
allowTaint
:
false
}).
then
(
function
(
canvas
)
{
}).
then
(
function
(
canvas
)
{
canvas
.
name
=
`
${
_this
.
randomString
}
`
.
jpeg
;
canvas
.
toBlob
(
canvas
.
toBlob
(
blob
=>
{
blob
=>
{
const
observable
=
upload
(
blob
,
null
,
token
);
const
observable
=
upload
(
blob
,
null
,
token
);
...
...
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