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
c42b6144
Commit
c42b6144
authored
Oct 05, 2021
by
薛智杰
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feat/sharePic' into 'feat/group-buy'
修复ios15生成海报问题 See merge request
!2
parents
f1ed13a1
c9ade2d6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
8 deletions
+15
-8
sharePic.vue
src/components/sharePic.vue
+15
-8
No files found.
src/components/sharePic.vue
View file @
c42b6144
...
...
@@ -201,10 +201,14 @@ export default {
useCORS
:
true
,
scale
:
1
,
allowTaint
:
false
}).
then
(
canvas
=>
{
canvas
.
name
=
`
${
this
.
randomString
()}
.jpeg`
;
canvas
.
toBlob
(
blob
=>
this
.
uploadPic
(
blob
),
'
image/jpeg
'
,
0.85
);
});
})
.
then
(
canvas
=>
{
canvas
.
name
=
`
${
this
.
randomString
()}
.jpeg`
;
canvas
.
toBlob
(
blob
=>
this
.
uploadPic
(
blob
),
'
image/jpeg
'
,
0.85
);
})
.
catch
(
error
=>
{
this
.
errorHandler
(
error
);
});
});
},
// 上传海报到七牛,成功后触发outputPicUr事件,参数是七牛文件地址
...
...
@@ -213,13 +217,13 @@ export default {
const
[
res
]
=
await
qiNiuApi
.
getQiniuToken
();
const
token
=
(
res
&&
res
.
token
)
||
''
;
if
(
!
token
)
{
this
.
uploadE
rrorHandler
(
new
Error
(
'
七牛token无效
'
));
this
.
e
rrorHandler
(
new
Error
(
'
七牛token无效
'
));
return
;
}
upload
(
blob
,
null
,
token
).
subscribe
({
complete
:
this
.
uploadSuccess
,
error
:
this
.
uploadErro
r
error
:
this
.
errorHandle
r
});
},
uploadSuccess
({
hash
})
{
...
...
@@ -228,8 +232,8 @@ export default {
this
.
$store
.
dispatch
(
'
change_loading_pic
'
,
false
);
this
.
$emit
(
'
outputPicUrl
'
,
fileLink
);
},
uploadErro
r
(
err
)
{
console
.
error
(
'
海报
上传
失败
'
,
err
);
errorHandle
r
(
err
)
{
console
.
error
(
'
海报
创建
失败
'
,
err
);
this
.
$store
.
dispatch
(
'
change_loading_pic
'
,
false
);
}
}
...
...
@@ -258,6 +262,9 @@ body {
top: -9999px;
left: -9999px;
color: #333;
// ios15字体有bug,需要在根元素覆盖下
font-family: Helvetica, Tahoma, Arial, 'PingFang SC', 'Hiragino Sans GB', 'Heiti SC', STXihei,
'Microsoft YaHei', SimHei;
}
.groupInfo {
background: #fff;
...
...
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