Commit ecffd755 by sunerhu

1.微信分享接口未调用

parent 470e6327
...@@ -453,10 +453,11 @@ ...@@ -453,10 +453,11 @@
} }
api.userRead(UserReadRequestVO).then(res =>{ api.userRead(UserReadRequestVO).then(res =>{
if (res['success']) { if (res['success']) {
uni.showToast({ console.log('操作成功')
title: '阅读成功', // uni.showToast({
duration: 2000 // title: '阅读成功',
}); // duration: 2000
// });
} }
}) })
} }
......
...@@ -54,26 +54,29 @@ ...@@ -54,26 +54,29 @@
this.$refs.sharewx.close() this.$refs.sharewx.close()
}, },
uniShare(type) { uniShare(type) {
let that = this
this.closeShare() this.closeShare()
uni.share({ uni.share({
provider: "weixin", provider: "weixin",
scene: type === 1 ? "WXSceneSession" : "WXSceneTimeline", scene: type === 1 ? "WXSceneSession" : "WXSceneTimeline",
type: 0, type: 0,
href: this.WXdata.href, href: that.WXdata.href,
title: this.WXdata.title, title: that.WXdata.title,
summary: this.WXdata.summary, summary: that.WXdata.summary,
imageUrl: this.WXdata.imageUrl, imageUrl: that.WXdata.imageUrl,
success: function(res) { success: function(res) {
console.log(res, 155)
let UserShareRequestVO = { let UserShareRequestVO = {
userId: uni.getStorageSync('cffp_userId'), userId: uni.getStorageSync('cffp_userId'),
businessType: '1', // 分享类型 businessType: '1', // 分享类型
businessId: this.WXdata.fileId, // 课程Id businessId: that.WXdata.fileId, // 课程Id
shareUrl: this.WXdata.href, // 分享链接 shareUrl: that.WXdata.href, // 分享链接
shareType: '2', // 分享类型(1:图片分享; 2:链接分享) shareType: '2', // 分享类型(1:图片分享; 2:链接分享)
shareToWhere: type, //分享到哪儿(1好友 2朋友圈) shareToWhere: type, //分享到哪儿(1好友 2朋友圈)
shareCode: this.WXdata.shareCode shareCode: that.WXdata.shareCode
} }
api.userShare(UserShareRequestVO).then(res => { api.userShare(UserShareRequestVO).then(res => {
console.log(res, 1251)
// console.log('分享成功了吗') // console.log('分享成功了吗')
if (res['success']) { if (res['success']) {
// uni.showToast({ // uni.showToast({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment