...
|
...
|
@@ -18,35 +18,44 @@ const xianyu = { |
|
|
setXianyuWebview() {
|
|
|
if (this.isAliApp && window.WindVane) {
|
|
|
window.WindVane.call('WVIdleFishApi', 'setNavigationBarVisible', { visible: false }, () => {
|
|
|
console.log('set ok');
|
|
|
console.log('setNavigationBarVisible ok');
|
|
|
}, () => {
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
|
|
|
/*
|
|
|
* @ description: 导航栏右侧自定义按钮 设为关闭
|
|
|
* @ author: huzhiming
|
|
|
* @ date: 2019-11-14 16:15:07
|
|
|
* @ version: V1.0.5
|
|
|
*/
|
|
|
closeNavRightItem() {
|
|
|
|
|
|
if (this.isAliApp && window.WindVane) {
|
|
|
window.WindVane.call('WVIdleFishApi', 'setHideNavigatorRightItem', {},()=>{},()=>{})
|
|
|
}
|
|
|
},
|
|
|
|
|
|
/*
|
|
|
* @ description: 导航栏右侧自定义按钮 设为可见
|
|
|
* @ author: huzhiming
|
|
|
* @ date: 2019-11-05 11:54:24
|
|
|
* @ version: V1.0.5
|
|
|
*/
|
|
|
setNavigatorRightItem (shareParam = null, handler) {
|
|
|
console.log('setNavigatorRightItem start!');
|
|
|
|
|
|
setNavRightItem (shareParam = null, handler) {
|
|
|
window._xianyuShare = () => {
|
|
|
this.setXianyuShare(shareParam, handler);
|
|
|
}
|
|
|
console.log('this.isAliApp && window.WindVane', this.isAliApp , window.WindVane);
|
|
|
|
|
|
// console.log('this.isAliApp && window.WindVane', this.isAliApp , window.WindVane);
|
|
|
if (this.isAliApp && window.WindVane) {
|
|
|
console.log('window.WindVane.call() ok!!!')
|
|
|
window.WindVane.call('WVIdleFishApi', 'setNavigatorRightItem', {
|
|
|
title: '∙∙∙', // 按钮名称
|
|
|
func: '_xianyuShare' // func: 'test' //点击调用函数 注意调用的函数必须挂载在window上
|
|
|
}, function(data) {
|
|
|
console.log('11111=====',data);
|
|
|
console.log('setNavigatorRightItem success:',data);
|
|
|
}, function(e) {
|
|
|
console.log('2222===',e);
|
|
|
console.log('setNavigatorRightItem error:',e);
|
|
|
});
|
|
|
}
|
|
|
},
|
...
|
...
|
@@ -59,9 +68,6 @@ const xianyu = { |
|
|
*/
|
|
|
setXianyuShare (param = {
|
|
|
shareType: 'activity', // 类型,默认activity
|
|
|
// image: 'http://gw.alicdn.com/tps/i1/TB1Nep5FVXXXXXDaXXXE799_VXX-800-800.jpg',
|
|
|
// url: 'http://h5.xianyu.tb.cn/xianyu/maishen.html?wxIsAvailable', // 分享链接
|
|
|
// link: 'http://h5.xianyu.tb.cn/xianyu/maishen.html?wxIsAvailable', // 和url保持
|
|
|
image: '//img11.static.yhbimg.com/goodsimg/2018/12/24/17/01070adae9791c70ed02593550437cf30e.jpg?imageMogr2/thumbnail/600x600/background/d2hpdGU=/position/center/quality/80',
|
|
|
url: '//xianyu.yohobuy.com/xianyu/index/channel?wxIsAvailable', // 分享链接
|
|
|
link: '//xianyu.yohobuy.com/xianyu/index/channel?wxIsAvailable', // 和url保持
|
...
|
...
|
@@ -69,7 +75,7 @@ const xianyu = { |
|
|
text: '' // 分享描述
|
|
|
}, { XY_SHARE_PRODUCT, XY_SHARE_TYPE }) {
|
|
|
if (this.isAliApp && window.WindVane) {
|
|
|
XY_SHARE_PRODUCT.call(this)
|
|
|
XY_SHARE_PRODUCT.call(this);
|
|
|
window.WindVane.call('WVIdleFishApi', 'showShareMenu', param, (data)=>{
|
|
|
console.log('success:', JSON.stringify(data),typeof data.isCancel);
|
|
|
if (data.isCancel==='false') {
|
...
|
...
|
|