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
75121f0a
Commit
75121f0a
authored
Sep 23, 2021
by
Xuguangxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 生成pic组件
parent
ff0abda8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
13 deletions
+8
-13
sharePic.vue
src/components/sharePic.vue
+0
-3
payResult.vue
src/views/pay/payResult.vue
+8
-10
No files found.
src/components/sharePic.vue
View file @
75121f0a
...
...
@@ -86,14 +86,11 @@ export default {
},
methods
:
{
async
createAndUploadPic
()
{
console
.
log
(
999
);
const
_this
=
this
;
const
[
qrcodeUrl
]
=
await
groupBuyApi
.
getQrcodeUrl
(
this
.
sharePicData
);
console
.
log
(
888
);
this
.
qrcodeUrl
=
qrcodeUrl
;
const
[
res
]
=
await
qiNiuApi
.
getQiniuToken
();
const
token
=
res
.
token
;
console
.
log
(
777
);
this
.
$nextTick
(()
=>
{
html2canvas
(
this
.
$refs
.
sharePic
,
{
width
:
1080
,
...
...
src/views/pay/payResult.vue
View file @
75121f0a
...
...
@@ -19,7 +19,12 @@
</p>
<div
class=
"actions"
>
<cr-button
shape=
"circle"
type=
"default"
@
click=
"goPage(1)"
>
我的拼团
</cr-button>
<cr-button
shape=
"circle"
class=
"actions__back"
:plain=
"true"
type=
"primary"
@
click=
"share"
<cr-button
shape=
"circle"
class=
"actions__back"
:plain=
"true"
type=
"primary"
@
click=
"setShareData"
>
邀请好友
</cr-button
>
</div>
...
...
@@ -104,12 +109,11 @@ export default {
this
.
payStatus
=
success
?
'
订单支付成功
'
:
'
订单支付失败
'
;
this
.
payStatusName
=
success
?
'
支付成功
'
:
'
支付失败
'
;
this
.
getCouponList
();
this
.
setShareData
();
},
mounted
()
{
EventBus
.
$on
(
'
shareClickItem
'
,
({
ev
})
=>
{
if
(
ev
===
'
pic
'
)
{
this
.
createPic
();
// 处理图片url
}
});
},
...
...
@@ -119,21 +123,15 @@ export default {
methods
:
{
outputPicUrl
(
res
)
{
console
.
log
(
res
);
this
.
$store
.
dispatch
(
'
goods_share_open
'
,
{
res
});
},
async
setShareData
()
{
const
[
res
]
=
await
groupBuyApi
.
getGroupShareInfo
({
orderNo
:
this
.
orderNo
});
this
.
sharePicData
=
res
;
},
createPic
()
{
console
.
log
(
typeof
this
.
$refs
.
sharePic
.
createAndUploadPic
);
this
.
$refs
.
sharePic
.
createAndUploadPic
();
},
share
()
{
// 分享
this
.
$store
.
dispatch
(
'
goods_share_open
'
);
},
// goPay() {
// this.$track?.registeredEvents('h5_RechargeResultPageClick', {
// commodity_id: this.skuID,
...
...
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