Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
wfc13
Project
Project
Details
Activity
Releases
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
wildfirecode13
wfc13
Commits
b3494b2e
Commit
b3494b2e
authored
Aug 25, 2021
by
wildfirecode13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
u
parent
97a40010
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
11 deletions
+23
-11
share.ts
project/src/share.ts
+23
-11
No files found.
project/src/share.ts
View file @
b3494b2e
import
{
start
,
WeixinMini
,
updateShare
}
from
'@spark/share'
//
import { start, WeixinMini, updateShare } from '@spark/share'
export
const
startShare
=
()
=>
{
console
.
log
(
'
start WeixinMini
'
)
start
([
WeixinMini
],
(
way
,
success
,
payload
)
=>
{
console
.
log
(
'分享'
+
success
?
'成功'
:
'失败'
);
console
.
log
(
'
wx.miniProgram.postMessage
'
)
//
start([WeixinMini], (way, success, payload) => {
//
console.log('分享' + success ? '成功' : '失败');
updateShare
({
title
:
'我正在参加d
\'
zzit拆盲盒'
,
//分享标题
content
:
'一起来吧~惊喜好物等着你'
,
//分享内容
url
:
'https://85337.activity-1.m.duiba.com.cn/projectx/pf80f49cf/index.html?appID=85337&iscustom=1&issharepage=1'
,
//分享链接
thumbnail
:
'https://yun.duiba.com.cn/db_games/disulogo.jpg'
,
//分享缩略图
});
//
updateShare({
//
title: '我正在参加d\'zzit拆盲盒', //分享标题
//
content: '一起来吧~惊喜好物等着你', //分享内容
//
url: 'https://85337.activity-1.m.duiba.com.cn/projectx/pf80f49cf/index.html?appID=85337&iscustom=1&issharepage=1', //分享链接
//
thumbnail: 'https://yun.duiba.com.cn/db_games/disulogo.jpg', //分享缩略图
//
});
});
// });
//@ts-ignore
wx
.
miniProgram
.
postMessage
(
{
dataIntent
:
1
,
//必传 1参数用于分享
limitation
:
0
,
//进入条件 0随便进;1开卡会员;2认证会员
sharable
:
1
,
//被分享者打开后能否进行分享 0不能;1可以
title
:
"我正在参加d
\
'zzit拆盲盒"
,
imageUrl
:
"https://yun.duiba.com.cn/db_games/disulogo.jpg"
,
//分享弹窗显示的图片
h5url
:
"https://85337.activity-1.m.duiba.com.cn/projectx/pf80f49cf/index.html?appID=85337&iscustom=1&issharepage=1"
,
//分享的链接(不需要encode)
}
)
}
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