Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
xianyu-ufo-app-web
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
huzhiming
5 years ago
Commit
80f2cc204a67027404b514c6865f9aa039a845b1
1 parent
2c6875b5
feat(分享): 添加分享测试代码
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
apps/common/xianyu.js
apps/common/xianyu.js
View file @
80f2cc2
...
...
@@ -31,6 +31,8 @@ const xianyu = {
* @ version: V1.0.5
*/
setXianyuShare
()
{
console
.
log
(
'开始调用分享'
);
if
(
this
.
isAliApp
&&
window
.
WindVane
)
{
window
.
_xianyuShare
=
()
=>
{
var
param
=
{
shareType
:
'activity'
,
// 类型,默认activity
...
...
@@ -43,8 +45,10 @@ const xianyu = {
window
.
WindVane
.
call
(
'WVIdleFishApi'
,
'showShareMenu'
,
param
,
(
data
)
=>
{
// alert('success:' + JSON.stringify(data));
},
function
(
e
)
{
// alert('fail:' + JSON.stringify(e));
console
.
log
(
'success:'
,
JSON
.
stringify
(
data
));
},
function
(
e
)
{
// alert('fail:' , JSON.stringify(e));
console
.
log
(
'fail:'
,
JSON
.
stringify
(
e
));
});
};
...
...
@@ -53,11 +57,14 @@ const xianyu = {
title
:
'∙∙∙'
,
// 按钮名称 func:'test' //点击调用函数
func
:
'_xianyuShare'
// func: 'test' //点击调用函数 注意调用的函数必须挂载在window上
},
function
(
data
)
{
console
.
log
(
'setNavigatorRightItem'
,
data
);
resolve
(
data
);
},
function
(
e
)
{
reject
(
e
);
console
.
log
(
'setNavigatorRightItem'
,
e
);
});
});
}
},
finishXianyuPage
()
{
...
...
Please
register
or
login
to post a comment