添加小程序分享功能

This commit is contained in:
xuwenbo
2020-09-12 11:03:10 +08:00
parent dea2c42701
commit 6beae9bfb2
5 changed files with 81 additions and 2 deletions

View File

@ -319,6 +319,24 @@
},
},
methods: {
onShareAppMessage: function() {
return {
title: this.storeInfo.storeName,
imageUrl: this.storeInfo.image,
path: "pages/shop/GoodsCon/index?id="+this.storeInfo.id+"&spread=" + uni.getStorageSync("uid"),
success(res) {
uni.showToast({
title: '分享成功'
})
},
fail(res) {
uni.showToast({
title: '分享失败',
icon: 'none'
})
}
}
},
goShoppingCart() {
this.$yrouter.switchTab("/pages/shop/ShoppingCart/index");
},