ウィジェット機能(五)共有
2774 ワード
##html
<button open-type="share">
##js
// data methods
onShareAppMessage: function (res) {
if (res.from === "button") {
}
let img = "";
img = this.goods.shop_img[1].image;
let path = "";
if (this.options.print_type) {
path =
"/pages/shopList/productdetails/productdetails/id=" +
this.options.id +
"&print_type=" +
this.options.print_type;
} else {
path =
"/pages/shopList/productdetails/productdetails/id=" + this.options.id;
}
return {
title: goods.name,
path: path,
imageUrl: img,
success: function (res) {
}
};
},