feat: 分享
This commit is contained in:
@@ -99,7 +99,7 @@
|
||||
},
|
||||
onWxBtn(index){
|
||||
console.log('微信分享',index);
|
||||
this.$emit('share',index)
|
||||
this.$emit('wxShare',index)
|
||||
},
|
||||
onBtn(index){
|
||||
if(index == 2){
|
||||
|
||||
@@ -551,6 +551,49 @@ export default {
|
||||
});
|
||||
},
|
||||
getValue,
|
||||
// 微信小程序环境分享
|
||||
onWxShare(index) {
|
||||
console.log("分享", index);
|
||||
// const shareParams = {
|
||||
// title: this.orderInfo.name || "商品分享",
|
||||
// path: `/pages/other_package/productInfo/productInfo?id=${this.id}${this.orderInfo.name}`,
|
||||
// imageUrl: this.swiperList.length > 0 ? this.swiperList[0] : "",
|
||||
// };
|
||||
// if (index == 0) {
|
||||
// uni.share({
|
||||
// provider: "weixin",
|
||||
// scene: "WXSceneSession", // 好友场景
|
||||
// title: shareParams.title,
|
||||
// path: shareParams.path,
|
||||
// imageUrl: shareParams.imageUrl,
|
||||
// success: (res) => {
|
||||
// console.log("分享好友成功", res);
|
||||
// uni.showToast({ title: "分享成功", icon: "success" });
|
||||
// },
|
||||
// fail: (err) => {
|
||||
// console.log("分享好友失败", err);
|
||||
// uni.showToast({ title: "分享取消", icon: "none" });
|
||||
// },
|
||||
// });
|
||||
// } else {
|
||||
// // 分享到微信朋友圈
|
||||
// uni.share({
|
||||
// provider: "weixin",
|
||||
// scene: "WXSceneTimeline", // 朋友圈场景
|
||||
// title: shareParams.title,
|
||||
// path: shareParams.path,
|
||||
// imageUrl: shareParams.imageUrl,
|
||||
// success: (res) => {
|
||||
// console.log("分享朋友圈成功", res);
|
||||
// uni.showToast({ title: "分享成功", icon: "success" });
|
||||
// },
|
||||
// fail: (err) => {
|
||||
// console.log("分享朋友圈失败", err);
|
||||
// uni.showToast({ title: "分享取消", icon: "none" });
|
||||
// },
|
||||
// });
|
||||
// }
|
||||
},
|
||||
onShare(index) {
|
||||
let tmp = `【信任桥】消费共享数字化权益 ${SHARE_URL}/#/pages/other_package/productInfo/productInfo?id=${this.id} ${this.orderInfo.name}`;
|
||||
if (index == 0) {
|
||||
@@ -907,7 +950,6 @@ export default {
|
||||
/<img([^>]*?)>/gi,
|
||||
'<img$1 style="max-width:100%;height:auto;display:block;">'
|
||||
);
|
||||
|
||||
}
|
||||
},
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user