Authored by 李奇

首页默认分享

... ... @@ -40,9 +40,6 @@ Component({
type: text.miniappType || 0
})
},
goShare() {
this.triggerEvent('share', this.properties.item);
},
onOk() {
this.setData({
show: false
... ...
... ... @@ -517,13 +517,6 @@ Page(Object.assign({
});
},
share({detail}) {
this.setData({
'actionsheet.show': true,
'shareProduct': detail
})
},
handleZanActionsheetCancel({componentId}) {
this.setData({
'actionsheet.show': false
... ... @@ -552,37 +545,7 @@ Page(Object.assign({
}
;
},
onShareAppMessage(res) {
let params = {
TITLE: `【0元抽奖】点一下,免费拿走${this.data.shareProduct.name}`,
DESC: '我在YO!LUCK发现一个不错的商品赶快来看看吧!'
};
if (res.from === 'menu') {
// 用户点击右上角分享
return {
title: params.TITLE, // 分享标题
desc: params.DESC, // 分享描述
path: `pages/zeroSell/detail?actPrizeId=${this.data.shareProduct.act_prize_id}`,
imageUrl: this.data.shareProduct.cover_img,
success: function () {
},
fail: function () {
}
};
} else if (res.from === 'button') {
// 用户点击分享按钮
return {
title: params.TITLE, // 分享标题
desc: params.DESC, // 分享描述
path: `/pages/zeroSell/detail?actPrizeId=${this.data.shareProduct.act_prize_id}&shareUid=${app.getUid()}`,
imageUrl: this.data.shareProduct.cover_img,
success: function () {
},
fail: function () {
}
};
}
onShareAppMessage() {
// 默认分享
}
}, Toast, Actionsheet));
\ No newline at end of file
... ...
... ... @@ -38,7 +38,7 @@
</block>
<block wx:else>
<block wx:for="{{my_zero_list[0].data}}" wx:key="{{index}}">
<prize-item item="{{item}}" bindshare="share" tab-idx="{{tabIndex}}"></prize-item>
<prize-item item="{{item}}" tab-idx="{{tabIndex}}"></prize-item>
</block>
</block>
<view class="title-view">
... ... @@ -51,7 +51,7 @@
</block>
<block wx:else>
<block wx:for="{{my_zero_list[1].data}}" wx:key="{{index}}">
<prize-item item="{{item}}" bindshare="share" tab-idx="{{tabIndex}}"></prize-item>
<prize-item item="{{item}}" tab-idx="{{tabIndex}}"></prize-item>
</block>
</block>
</block>
... ...