Commit fc98f0c7 by sunchao

课程列表分享统计接口

parent eb30f599
......@@ -19,4 +19,6 @@ export function createApp() {
}
// #endif
//#ifdef H5
window.sessionStorage.setItem('firstEntryUrl',window.location.href.split('#')[0])
// #endif
\ No newline at end of file
......@@ -308,6 +308,7 @@
//#ifdef H5
this.shareTipsFlag = true;
this.getshareData2(shareCode,jumptime)
// #endif
},
shareToggle() {
......@@ -635,6 +636,7 @@
}
// let url = window.location.href.split('#')[0]
hshare(data, url)
this.submitsuessc(shareCode,jumptime)
},
// H5 自定义分享
getshareData() {
......@@ -685,6 +687,31 @@
})
},
submitsuessc(shareCode,jumptime){
let platform = uni.getSystemInfoSync().platform
let UserShareRequestVO = {
systemType: platform == 'ios'? '1': '0',
userId: uni.getStorageSync('cffp_userId'),
businessType: '1', // 分享类型
businessId: this.fileId, // 课程Id
shareUrl: "https://" + window.location.host + "/cffp/pages/courseDetail/courseDetail?fileId=" + this.fileId +
'&coursesharing=1' + '&serialsNo=' + nanoid() + '&shareCode=' + shareCode + '&shareUserId=' +
this.userId + '&jumpUrl=' + jumptime + "&", // 分享链接
shareType: '2', // 分享类型(1:图片分享; 2:链接分享)
shareToWhere: 3, //分享到哪儿(1好友 2朋友圈)
shareCode: shareCode
}
api.userShare(UserShareRequestVO).then(res => {
console.log(res, 1251)
// console.log('分享成功了吗')
if (res['success']) {
// uni.showToast({
// title: '分享成功',
// duration: 2000
// });
}
})
}
},
onLoad(option) {
this.fileId = option.fileId;
......
......@@ -35,13 +35,9 @@ export function initJssdkShare(callback, url) {
}
// data是穿的参数 url是当前页面的链接
export function hshare(data,url){
console.log(data)
// initJssdkShare(data, url)
initJssdkShare(function(){
console.log(1)
jWeixin.ready(function(){
console.log(2)
var sharedata={
title: data.title, //标题
desc: data.desc, //描述
......
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