uniapp微信分享功能部分代码
// 微信分享
fxwx(){
var title = '远易成的分享';
var miaoshu = this.dataD.projectName;
var imgurl = this.dataD.image;
var url = 'http://www.1chengjiao.cn/#/pages/goods/goods?cid='+this.cid;
uni.share({
provider: "weixin",
scene: "WXSceneSession",
type: 0,
href: url,
title: title,
summary: miaoshu,
imageUrl: imgurl,
success: function (res) {
console.log(JSON.stringify(res));
uni.showToast({
title: '已分享',
duration: 2000
});
},
fail: function (err) {
console.log(err)
}
});
},