Commit 37eb9689 authored by wangxuelai's avatar wangxuelai

''

parent e83d71bf
...@@ -9,7 +9,10 @@ import { ...@@ -9,7 +9,10 @@ import {
import { import {
studentidentity studentidentity
} from './service/customer/signup.js' } from './service/customer/signup.js'
import staticLog from './js/staticlog.js' import staticLog from './js/staticlog.js';
import {
sharerLog
} from './service/customer/staticlog.js';
// tracker({ // tracker({
// token: "c92deb3f301e16682ecf598120083403", // token: "c92deb3f301e16682ecf598120083403",
// behaviour: 15, // behaviour: 15,
...@@ -19,7 +22,6 @@ import staticLog from './js/staticlog.js' ...@@ -19,7 +22,6 @@ import staticLog from './js/staticlog.js'
staticLog(); staticLog();
App({ App({
onLaunch: function (params) { // 小程序初始化完成时(全局只触发一次) onLaunch: function (params) { // 小程序初始化完成时(全局只触发一次)
console.log('触发');
const {path, query, scene, shareTicket, referrerInfo} = params; const {path, query, scene, shareTicket, referrerInfo} = params;
this.globalData.fromUrl = path; this.globalData.fromUrl = path;
this.globalData.query = query; this.globalData.query = query;
...@@ -33,6 +35,9 @@ App({ ...@@ -33,6 +35,9 @@ App({
} }
this.setGlobalData(true, params); this.setGlobalData(true, params);
}, },
setSharerLog (data) {
sharerLog(data);
},
onShow: function (params) { // 小程序启动,或从后台进入前台显示时 onShow: function (params) { // 小程序启动,或从后台进入前台显示时
const {path, query, scene, shareTicket, referrerInfo} = params; const {path, query, scene, shareTicket, referrerInfo} = params;
if (path != 'wechatinfoget/index' && path.indexOf('business/') == -1) { if (path != 'wechatinfoget/index' && path.indexOf('business/') == -1) {
......
...@@ -14,6 +14,7 @@ const apis = { ...@@ -14,6 +14,7 @@ const apis = {
getVerifyCode: `${api}common/sms`,//发送短信获取验证码 getVerifyCode: `${api}common/sms`,//发送短信获取验证码
staticlog: { staticlog: {
behaviorLog: `${api}student/data/behavior`, behaviorLog: `${api}student/data/behavior`,
sharerLog: `${api}student/data/share`,
}, },
customer: { customer: {
integral: { integral: {
......
...@@ -11,7 +11,16 @@ import { ...@@ -11,7 +11,16 @@ import {
errorresolve: 2, errorresolve: 2,
}) })
} }
function sharerLog(data) {
return wxRequest({
url: apis.staticlog.sharerLog,
data,
method: 'POST',
errorresolve: 2,
})
}
export { export {
behaviorLog behaviorLog,
sharerLog,
} }
\ No newline at end of file
...@@ -322,11 +322,25 @@ Page({ ...@@ -322,11 +322,25 @@ Page({
} }
if (from == 'menu') { if (from == 'menu') {
shareObj = initShareObj; shareObj = initShareObj;
app.setSharerLog({
source_path: 'src/pages/beforeinvitation/index',
source_id: this.data.tid,
param: JSON.stringify({
query: `tid=${this.data.tid}&consumerId=${visitor && visitor.id || 0}&d=${clockdate.substr(2)}&w=${visitor.studentId}`
})
});
} else if (from == 'button') { } else if (from == 'button') {
if(target.dataset.typefrom && target.dataset.typefrom=='dailySign'){ if(target.dataset.typefrom && target.dataset.typefrom=='dailySign'){
const visitor = LocalStorage.getItem('visitor'); const visitor = LocalStorage.getItem('visitor');
const userInfo = this.data.userInfoDetail; const userInfo = this.data.userInfoDetail;
let clockDetail = this.data.selfClockDetail; let clockDetail = this.data.selfClockDetail;
app.setSharerLog({
source_path: 'src/pages/clockdetail/newindex',
source_id: clockDetail.id,
param: JSON.stringify({
query: `id=${this.data.id}&tid=${this.data.themeSelect.id}&cid=${clockDetail.id}&w=${visitor.studentId}`
})
});
shareObj = { shareObj = {
title: `${myBaseinfo.nickname}的打卡详情`, title: `${myBaseinfo.nickname}的打卡详情`,
path: `/src/pages/clockdetail/newindex?id=${this.data.id}&tid=${this.data.themeSelect.id}&cid=${clockDetail.id}&w=${visitor.studentId}` path: `/src/pages/clockdetail/newindex?id=${this.data.id}&tid=${this.data.themeSelect.id}&cid=${clockDetail.id}&w=${visitor.studentId}`
...@@ -356,11 +370,25 @@ Page({ ...@@ -356,11 +370,25 @@ Page({
this.autoclosefeedback(); this.autoclosefeedback();
} }
}) })
app.setSharerLog({
source_path: 'src/pages/clockdetail/newindex',
source_id: info.id,
param: JSON.stringify({
query: `id=${this.data.id}&tid=${this.data.themeSelect.id}&cid=${info.id}&w=${visitor.studentId}`
})
});
shareObj = { shareObj = {
title: `${info.school_student.nickname}的打卡详情`, title: `${info.school_student.nickname}的打卡详情`,
path: `/src/pages/clockdetail/newindex?id=${this.data.id}&tid=${this.data.themeSelect.id}&cid=${info.id}&w=${visitor.studentId}` path: `/src/pages/clockdetail/newindex?id=${this.data.id}&tid=${this.data.themeSelect.id}&cid=${info.id}&w=${visitor.studentId}`
} }
}else{ }else{
app.setSharerLog({
source_path: 'src/pages/beforeinvitation/index',
source_id: this.data.tid,
param: JSON.stringify({
query: `tid=${this.data.tid}&consumerId=${visitor && visitor.id || 0}&d=${clockdate.substr(2)}&w=${visitor.studentId}`
})
});
shareObj = initShareObj; shareObj = initShareObj;
} }
} }
......
...@@ -300,6 +300,13 @@ Page({ ...@@ -300,6 +300,13 @@ Page({
this.autoclosefeedback(); this.autoclosefeedback();
} }
}) })
app.setSharerLog({
source_path: 'src/pages/clockdetail/newindex',
source_id: this.data.cid,
param: JSON.stringify({
query: `tid=${this.data.tid}&cid=${this.data.cid}&w=${visitor.studentId}`
})
});
return { return {
title: `${name}的打卡详情`, title: `${name}的打卡详情`,
path: `/src/pages/clockdetail/newindex?tid=${this.data.tid}&cid=${this.data.cid}&w=${visitor.studentId}`, path: `/src/pages/clockdetail/newindex?tid=${this.data.tid}&cid=${this.data.cid}&w=${visitor.studentId}`,
......
...@@ -341,6 +341,13 @@ Page({ ...@@ -341,6 +341,13 @@ Page({
this.autoclosefeedback(); this.autoclosefeedback();
} }
}) })
app.setSharerLog({
source_path: 'src/pages/clockdetail/newindex',
source_id: this.data.cid,
param: JSON.stringify({
query: `tid=${this.data.tid}&cid=${this.data.cid}&w=${visitor.studentId}`
})
});
return { return {
title: `${name}的打卡详情`, title: `${name}的打卡详情`,
path: `/src/pages/clockdetail/newindex?tid=${this.data.tid}&cid=${this.data.cid}&w=${visitor.studentId}`, path: `/src/pages/clockdetail/newindex?tid=${this.data.tid}&cid=${this.data.cid}&w=${visitor.studentId}`,
......
...@@ -111,6 +111,13 @@ Page({ ...@@ -111,6 +111,13 @@ Page({
title: `${this.data.clockDetail.school_student.nickname}的打卡详情`, title: `${this.data.clockDetail.school_student.nickname}的打卡详情`,
path: `/src/pages/clockdetail/newindex?id=${this.data.clockDetail.class_id}&tid=${this.data.tid}&cid=${this.data.clockId}&w=${visitor.studentId}` path: `/src/pages/clockdetail/newindex?id=${this.data.clockDetail.class_id}&tid=${this.data.tid}&cid=${this.data.clockId}&w=${visitor.studentId}`
} }
app.setSharerLog({
source_path: 'src/pages/clockdetail/newindex',
source_id: this.data.clockId,
param: JSON.stringify({
query: `id=${this.data.clockDetail.class_id}&tid=${this.data.tid}&cid=${this.data.clockId}&w=${visitor.studentId}`
})
});
return { return {
title: shareObj.title, title: shareObj.title,
path: shareObj.path, path: shareObj.path,
......
...@@ -493,6 +493,13 @@ Page({ ...@@ -493,6 +493,13 @@ Page({
consumer_id: this.data.consumerId, consumer_id: this.data.consumerId,
clock_circle_id: this.data.id clock_circle_id: this.data.id
}) })
app.setSharerLog({
source_path: 'src/pages/growthrecord/index',
source_id: this.data.consumerId,
param: JSON.stringify({
query: `consumerId=${this.data.consumerId}&id=${this.data.id}&sid=${this.data.sid}&w=${visitor.studentId}`
})
});
} else if (from == 'button') { } else if (from == 'button') {
if (!target.dataset.info) { if (!target.dataset.info) {
shareObj = initShareObj; shareObj = initShareObj;
...@@ -502,6 +509,13 @@ Page({ ...@@ -502,6 +509,13 @@ Page({
consumer_id: this.data.consumerId, consumer_id: this.data.consumerId,
clock_circle_id: this.data.id clock_circle_id: this.data.id
}) })
app.setSharerLog({
source_path: 'src/pages/growthrecord/index',
source_id: this.data.consumerId,
param: JSON.stringify({
query: `consumerId=${this.data.consumerId}&id=${this.data.id}&sid=${this.data.sid}&w=${visitor.studentId}`
})
});
} else { } else {
const {target: {dataset: {info}}} = option; const {target: {dataset: {info}}} = option;
integralLog({ integralLog({
...@@ -522,6 +536,13 @@ Page({ ...@@ -522,6 +536,13 @@ Page({
this.autoclosefeedback(); this.autoclosefeedback();
} }
}) })
app.setSharerLog({
source_path: 'src/pages/clockdetail/newindex',
source_id: info.id,
param: JSON.stringify({
query: `tid=${info.subject_id}&cid=${info.id}&sid=${this.data.sid}&w=${visitor.studentId}`
})
});
shareObj = { shareObj = {
title: `${info.school_student.nickname}的打卡详情`, title: `${info.school_student.nickname}的打卡详情`,
path: `/src/pages/clockdetail/newindex?tid=${info.subject_id}&cid=${info.id}&sid=${this.data.sid}&w=${visitor.studentId}` path: `/src/pages/clockdetail/newindex?tid=${info.subject_id}&cid=${info.id}&sid=${this.data.sid}&w=${visitor.studentId}`
......
...@@ -124,6 +124,13 @@ Page({ ...@@ -124,6 +124,13 @@ Page({
*/ */
onShareAppMessage: function () { onShareAppMessage: function () {
const visitor = LocalStorage.getItem('visitor'); const visitor = LocalStorage.getItem('visitor');
app.setSharerLog({
source_path: 'src/pages/invitation/index',
source_id: this.data.tid,
param: JSON.stringify({
query: `tid=${this.data.tid}&consumerId=${this.data.consumerId}&d=${this.data.d}&w=${visitor.studentId}`
})
});
return { return {
title: '入学通知书', title: '入学通知书',
path: `/src/pages/invitation/index?tid=${this.data.tid}&consumerId=${this.data.consumerId}&d=${this.data.d}&w=${visitor.studentId}`, path: `/src/pages/invitation/index?tid=${this.data.tid}&consumerId=${this.data.consumerId}&d=${this.data.d}&w=${visitor.studentId}`,
......
...@@ -111,6 +111,13 @@ Page({ ...@@ -111,6 +111,13 @@ Page({
*/ */
onShareAppMessage: function () { onShareAppMessage: function () {
const visitor = LocalStorage.getItem('visitor'); const visitor = LocalStorage.getItem('visitor');
app.setSharerLog({
source_path: 'src/pages/inviteindex/index',
source_id: this.data.id,
param: JSON.stringify({
query: `id=${this.data.id}&w=${visitor.studentId}`
})
});
return { return {
title: '入学通知书', title: '入学通知书',
path: `/src/pages/inviteindex/index?id=${this.data.id}&w=${visitor.studentId}`, path: `/src/pages/inviteindex/index?id=${this.data.id}&w=${visitor.studentId}`,
......
...@@ -367,6 +367,13 @@ Page({ ...@@ -367,6 +367,13 @@ Page({
} }
if (from == 'menu') { if (from == 'menu') {
shareObj = initShareObj; shareObj = initShareObj;
app.setSharerLog({
source_path: 'src/pages/sharemoretheme/index',
source_id: this.data.tid,
param: JSON.stringify({
query: `tid=${this.data.tid}&id=${this.data.id}&w=${visitor.studentId}`
})
});
} else if (from == 'button') { } else if (from == 'button') {
if(target.dataset.typefrom && target.dataset.typefrom=='dailySign'){ if(target.dataset.typefrom && target.dataset.typefrom=='dailySign'){
const visitor = LocalStorage.getItem('visitor'); const visitor = LocalStorage.getItem('visitor');
...@@ -376,8 +383,22 @@ Page({ ...@@ -376,8 +383,22 @@ Page({
title: `${myBaseinfo.nickname}的打卡详情`, title: `${myBaseinfo.nickname}的打卡详情`,
path: `/src/pages/clockdetail/newindex?id=${this.data.id}&tid=${this.data.themeSelect.id}&cid=${clockDetail[0].id}&w=${visitor.studentId}` path: `/src/pages/clockdetail/newindex?id=${this.data.id}&tid=${this.data.themeSelect.id}&cid=${clockDetail[0].id}&w=${visitor.studentId}`
} }
app.setSharerLog({
source_path: 'src/pages/clockdetail/newindex',
source_id: clockDetail[0].id,
param: JSON.stringify({
query: `id=${this.data.id}&tid=${this.data.themeSelect.id}&cid=${clockDetail[0].id}&w=${visitor.studentId}`
})
});
}else if (!target.dataset.info) { }else if (!target.dataset.info) {
shareObj = initShareObj; shareObj = initShareObj;
app.setSharerLog({
source_path: 'src/pages/sharemoretheme/index',
source_id: this.data.tid,
param: JSON.stringify({
query: `tid=${this.data.tid}&id=${this.data.id}&w=${visitor.studentId}`
})
});
} else { } else {
const { const {
target: { target: {
...@@ -403,6 +424,13 @@ Page({ ...@@ -403,6 +424,13 @@ Page({
this.autoclosefeedback(); this.autoclosefeedback();
} }
}) })
app.setSharerLog({
source_path: 'src/pages/clockdetail/newindex',
source_id: info.id,
param: JSON.stringify({
query: `id=${this.data.id}&tid=${this.data.themeSelect.id}&cid=${info.id}&w=${visitor.studentId}`
})
});
shareObj = { shareObj = {
title: `${info.school_student.nickname}的打卡详情`, title: `${info.school_student.nickname}的打卡详情`,
path: `/src/pages/clockdetail/newindex?id=${this.data.id}&tid=${this.data.themeSelect.id}&cid=${info.id}&w=${visitor.studentId}` path: `/src/pages/clockdetail/newindex?id=${this.data.id}&tid=${this.data.themeSelect.id}&cid=${info.id}&w=${visitor.studentId}`
......
...@@ -165,6 +165,13 @@ Page({ ...@@ -165,6 +165,13 @@ Page({
}, },
onShareAppMessage: function (option) { // return custom share data when user share. onShareAppMessage: function (option) { // return custom share data when user share.
const visitor = LocalStorage.getItem('visitor'); const visitor = LocalStorage.getItem('visitor');
app.setSharerLog({
source_path: 'src/pages/myachievement/index',
source_id: this.data.sid,
param: JSON.stringify({
query: `sid=${this.data.sid}&custormeId=${this.data.custormeId}&w=${visitor.studentId}`
})
});
return { return {
title: '排行榜', title: '排行榜',
path: `/src/pages/myachievement/index?sid=${this.data.sid}&custormeId=${this.data.custormeId}&w=${visitor.studentId}`, path: `/src/pages/myachievement/index?sid=${this.data.sid}&custormeId=${this.data.custormeId}&w=${visitor.studentId}`,
......
...@@ -275,9 +275,23 @@ Page({ ...@@ -275,9 +275,23 @@ Page({
let shareObj = {} let shareObj = {}
if (from == 'menu') { if (from == 'menu') {
shareObj = initShareObj; shareObj = initShareObj;
app.setSharerLog({
source_path: 'src/pages/mycalendart/index',
source_id: this.data.tid,
param: JSON.stringify({
query: `tid=${this.data.tid}&id=${this.data.id}&clockdate=${this.data.clockdate}&w=${visitor.studentId}`
})
});
} else if (from == 'button') { } else if (from == 'button') {
if (!target.dataset.info) { if (!target.dataset.info) {
shareObj = initShareObj; shareObj = initShareObj;
app.setSharerLog({
source_path: 'src/pages/mycalendart/index',
source_id: this.data.tid,
param: JSON.stringify({
query: `tid=${this.data.tid}&id=${this.data.id}&clockdate=${this.data.clockdate}&w=${visitor.studentId}`
})
});
} else { } else {
const { const {
target: { target: {
...@@ -286,6 +300,13 @@ Page({ ...@@ -286,6 +300,13 @@ Page({
} }
} }
} = option; } = option;
app.setSharerLog({
source_path: 'src/pages/clockdetail/newindex',
source_id: info.id,
param: JSON.stringify({
query: `/src/pages/clockdetail/newindex?tid=${info.subject_id}&cid=${info.id}&w=${visitor.studentId}`
})
});
shareObj = { shareObj = {
title: `${info.school_student.nickname}的打卡详情`, title: `${info.school_student.nickname}的打卡详情`,
path: `/src/pages/clockdetail/newindex?tid=${info.subject_id}&cid=${info.id}&w=${visitor.studentId}` path: `/src/pages/clockdetail/newindex?tid=${info.subject_id}&cid=${info.id}&w=${visitor.studentId}`
......
...@@ -148,6 +148,13 @@ Page({ ...@@ -148,6 +148,13 @@ Page({
}, },
onShareAppMessage: function () { onShareAppMessage: function () {
const visitor = LocalStorage.getItem('visitor'); const visitor = LocalStorage.getItem('visitor');
app.setSharerLog({
source_path: 'src/pages/papersquare/reviewdetail',
source_id: this.data.rid,
param: JSON.stringify({
query: `sid=${this.data.sid}&id=${this.data.id}&rid=${this.data.rid}&type=${this.data.type}&w=${visitor.studentId}`
})
});
return { return {
title: `课堂小评详情`, title: `课堂小评详情`,
path: `/src/pages/papersquare/reviewdetail?sid=${this.data.sid}&id=${this.data.id}&rid=${this.data.rid}&type=${this.data.type}&w=${visitor.studentId}` path: `/src/pages/papersquare/reviewdetail?sid=${this.data.sid}&id=${this.data.id}&rid=${this.data.rid}&type=${this.data.type}&w=${visitor.studentId}`
......
...@@ -1221,6 +1221,13 @@ defaultClockList: [[{"id":119722,"school_id":424,"student_id":8465,"class_id":12 ...@@ -1221,6 +1221,13 @@ defaultClockList: [[{"id":119722,"school_id":424,"student_id":8465,"class_id":12
title: `习作广场`, title: `习作广场`,
path: `/src/pages/papersquare/index?sid=${this.data.sid}&w=${visitor.studentId}` path: `/src/pages/papersquare/index?sid=${this.data.sid}&w=${visitor.studentId}`
} }
app.setSharerLog({
source_path: 'src/pages/papersquare/index',
source_id: this.data.sid,
param: JSON.stringify({
query: `sid=${this.data.sid}&w=${visitor.studentId}`
})
});
return { return {
title: initShareObj.title, title: initShareObj.title,
path: initShareObj.path, path: initShareObj.path,
......
...@@ -153,6 +153,13 @@ Page({ ...@@ -153,6 +153,13 @@ Page({
*/ */
onShareAppMessage: function () { onShareAppMessage: function () {
const visitor = LocalStorage.getItem('visitor'); const visitor = LocalStorage.getItem('visitor');
app.setSharerLog({
source_path: 'src/pages/papersquare/reviewdetail',
source_id: this.data.rid,
param: JSON.stringify({
query: `sid=${this.data.sid}&id=${this.data.id}&rid=${this.data.rid}&type=${this.data.type}&w=${visitor.studentId}`
})
});
return { return {
title: `课堂小评详情`, title: `课堂小评详情`,
path: `/src/pages/papersquare/reviewdetail?sid=${this.data.sid}&id=${this.data.id}&rid=${this.data.rid}&type=${this.data.type}&w=${visitor.studentId}` path: `/src/pages/papersquare/reviewdetail?sid=${this.data.sid}&id=${this.data.id}&rid=${this.data.rid}&type=${this.data.type}&w=${visitor.studentId}`
......
...@@ -250,6 +250,13 @@ Page({ ...@@ -250,6 +250,13 @@ Page({
*/ */
onShareAppMessage: function () { onShareAppMessage: function () {
const visitor = LocalStorage.getItem('visitor'); const visitor = LocalStorage.getItem('visitor');
app.setSharerLog({
source_path: 'src/pages/rankingList/index',
source_id: this.data.id,
param: JSON.stringify({
query: `id=${this.data.id}&sid=${this.data.sid}&tag=${this.data.bigCurrentTab}&w=${visitor.studentId}`
})
});
return { return {
title: '排行榜', title: '排行榜',
path: `/src/pages/rankingList/index?id=${this.data.id}&sid=${this.data.sid}&tag=${this.data.bigCurrentTab}&w=${visitor.studentId}`, path: `/src/pages/rankingList/index?id=${this.data.id}&sid=${this.data.sid}&tag=${this.data.bigCurrentTab}&w=${visitor.studentId}`,
......
...@@ -154,9 +154,23 @@ Page({ ...@@ -154,9 +154,23 @@ Page({
} }
if (from == 'menu') { if (from == 'menu') {
shareObj = initShareObj; shareObj = initShareObj;
app.setSharerLog({
source_path: 'src/pages/websiteindex/index',
source_id: this.data.sid,
param: JSON.stringify({
query: `sid=${this.data.sid}&w=${visitor.studentId}`
})
});
} else if (from == 'button') { } else if (from == 'button') {
if (!target.dataset.info) { if (!target.dataset.info) {
shareObj = initShareObj; shareObj = initShareObj;
app.setSharerLog({
source_path: 'src/pages/websiteindex/index',
source_id: this.data.sid,
param: JSON.stringify({
query: `sid=${this.data.sid}&w=${visitor.studentId}`
})
});
} else { } else {
const { const {
target: { target: {
...@@ -183,6 +197,13 @@ Page({ ...@@ -183,6 +197,13 @@ Page({
this.autoclosefeedback(); this.autoclosefeedback();
} }
}) })
app.setSharerLog({
source_path: 'src/pages/clockdetail/newindex',
source_id: info.id,
param: JSON.stringify({
query: `id=${info.class_id}&tid=${info.subject_id}&cid=${info.id}&w=${visitor.studentId}`
})
});
shareObj = { shareObj = {
title: `${info.school_student.nickname}的打卡详情`, title: `${info.school_student.nickname}的打卡详情`,
path: `/src/pages/clockdetail/newindex?id=${info.class_id}&tid=${info.subject_id}&cid=${info.id}&w=${visitor.studentId}` path: `/src/pages/clockdetail/newindex?id=${info.class_id}&tid=${info.subject_id}&cid=${info.id}&w=${visitor.studentId}`
......
...@@ -400,11 +400,25 @@ Page({ ...@@ -400,11 +400,25 @@ Page({
} }
if (from == 'menu') { if (from == 'menu') {
shareObj = initShareObj; shareObj = initShareObj;
app.setSharerLog({
source_path: 'src/pages/beforeinvitation/index',
source_id: this.data.tid,
param: JSON.stringify({
query: `tid=${this.data.tid}&consumerId=${visitor && visitor.id || 0}&w=${visitor.studentId}`
})
});
} else if (from == 'button') { } else if (from == 'button') {
if(target.dataset.typefrom && target.dataset.typefrom=='dailySign'){ if(target.dataset.typefrom && target.dataset.typefrom=='dailySign'){
const visitor = LocalStorage.getItem('visitor'); const visitor = LocalStorage.getItem('visitor');
const userInfo = this.data.userInfoDetail; const userInfo = this.data.userInfoDetail;
let clockDetail = this.data.selfClockDetail let clockDetail = this.data.selfClockDetail
app.setSharerLog({
source_path: 'src/pages/clockdetail/newindex',
source_id: clockDetail.id,
param: JSON.stringify({
query: `id=${this.data.id}&tid=${this.data.themeSelect.id}&cid=${clockDetail.id}&w=${visitor.studentId}`
})
});
shareObj = { shareObj = {
title: `${myBaseinfo.nickname}的打卡详情`, title: `${myBaseinfo.nickname}的打卡详情`,
path: `/src/pages/clockdetail/newindex?id=${this.data.id}&tid=${this.data.themeSelect.id}&cid=${clockDetail.id}&w=${visitor.studentId}` path: `/src/pages/clockdetail/newindex?id=${this.data.id}&tid=${this.data.themeSelect.id}&cid=${clockDetail.id}&w=${visitor.studentId}`
...@@ -435,11 +449,25 @@ Page({ ...@@ -435,11 +449,25 @@ Page({
this.autoclosefeedback(); this.autoclosefeedback();
} }
}) })
app.setSharerLog({
source_path: 'src/pages/clockdetail/newindex',
source_id: info.id,
param: JSON.stringify({
query: `id=${this.data.id}&tid=${this.data.themeSelect.id}&cid=${info.id}&w=${visitor.studentId}`
})
});
shareObj = { shareObj = {
title: `${info.school_student.nickname}的打卡详情`, title: `${info.school_student.nickname}的打卡详情`,
path: `/src/pages/clockdetail/newindex?id=${this.data.id}&tid=${this.data.themeSelect.id}&cid=${info.id}&w=${visitor.studentId}` path: `/src/pages/clockdetail/newindex?id=${this.data.id}&tid=${this.data.themeSelect.id}&cid=${info.id}&w=${visitor.studentId}`
} }
}else{ }else{
app.setSharerLog({
source_path: 'src/pages/beforeinvitation/index',
source_id: this.data.tid,
param: JSON.stringify({
query: `tid=${this.data.tid}&consumerId=${visitor && visitor.id || 0}&w=${visitor.studentId}`
})
});
shareObj = initShareObj; shareObj = initShareObj;
} }
} }
......
...@@ -207,6 +207,13 @@ Page({ ...@@ -207,6 +207,13 @@ Page({
*/ */
onShareAppMessage: function () { onShareAppMessage: function () {
const visitor = LocalStorage.getItem('visitor'); const visitor = LocalStorage.getItem('visitor');
app.setSharerLog({
source_path: 'src/pages/themeindex/rankList',
source_id: this.data.tid,
param: JSON.stringify({
query: `id=${this.data.id}&sid=${this.data.sid}&tid=${this.data.tid}&w=${visitor.studentId}`
})
});
return { return {
title: '排行榜', title: '排行榜',
path: `/src/pages/themeindex/rankList?id=${this.data.id}&sid=${this.data.sid}&tid=${this.data.tid}&w=${visitor.studentId}`, path: `/src/pages/themeindex/rankList?id=${this.data.id}&sid=${this.data.sid}&tid=${this.data.tid}&w=${visitor.studentId}`,
......
...@@ -123,6 +123,13 @@ Page({ ...@@ -123,6 +123,13 @@ Page({
*/ */
onShareAppMessage: function () { onShareAppMessage: function () {
const visitor = LocalStorage.getItem('visitor'); const visitor = LocalStorage.getItem('visitor');
app.setSharerLog({
source_path: 'src/pages/themeranklist/index',
source_id: this.data.tid,
param: JSON.stringify({
query: `tid=${this.data.tid}&sid=${this.data.sid}&w=${visitor.studentId}`
})
});
return { return {
title: '日历打卡排行榜', title: '日历打卡排行榜',
path: `/src/pages/themeranklist/index?tid=${this.data.tid}&sid=${this.data.sid}&w=${visitor.studentId}`, path: `/src/pages/themeranklist/index?tid=${this.data.tid}&sid=${this.data.sid}&w=${visitor.studentId}`,
......
...@@ -76,6 +76,13 @@ Page({ ...@@ -76,6 +76,13 @@ Page({
}, },
onShareAppMessage: function () { onShareAppMessage: function () {
const visitor = LocalStorage.getItem('visitor'); const visitor = LocalStorage.getItem('visitor');
app.setSharerLog({
source_path: 'src/pages/unlockranklist/index',
source_id: this.data.mode_id,
param: JSON.stringify({
query: `tid=${this.data.mode_id}&sid=${this.data.sid}&w=${visitor.studentId}`
})
});
return { return {
title: '闯关打卡排行榜', title: '闯关打卡排行榜',
path: `/src/pages/unlockranklist/index?tid=${this.data.mode_id}&sid=${this.data.sid}&w=${visitor.studentId}`, path: `/src/pages/unlockranklist/index?tid=${this.data.mode_id}&sid=${this.data.sid}&w=${visitor.studentId}`,
......
...@@ -179,6 +179,13 @@ Page({ ...@@ -179,6 +179,13 @@ Page({
*/ */
onShareAppMessage: function () { onShareAppMessage: function () {
const visitor = LocalStorage.getItem('visitor'); const visitor = LocalStorage.getItem('visitor');
app.setSharerLog({
source_path: 'src/pages/userMedal/index',
source_id: this.data.id,
param: JSON.stringify({
query: `id=${this.data.id}&customerId=${this.data.consumerId}&sid=${this.data.sid}&w=${visitor.studentId}`
})
});
return { return {
title: '荣誉勋章', title: '荣誉勋章',
path: `/src/pages/userMedal/index?id=${this.data.id}&customerId=${this.data.consumerId}&sid=${this.data.sid}&w=${visitor.studentId}`, path: `/src/pages/userMedal/index?id=${this.data.id}&customerId=${this.data.consumerId}&sid=${this.data.sid}&w=${visitor.studentId}`,
......
...@@ -179,6 +179,13 @@ Page({ ...@@ -179,6 +179,13 @@ Page({
*/ */
onShareAppMessage: function () { onShareAppMessage: function () {
const visitor = LocalStorage.getItem('visitor'); const visitor = LocalStorage.getItem('visitor');
app.setSharerLog({
source_path: 'src/pages/userMedal/index',
source_id: this.data.id,
param: JSON.stringify({
query: `id=${this.data.id}&customerId=${this.data.consumerId}&sid=${this.data.sid}&w=${visitor.studentId}`
})
});
return { return {
title: '荣誉勋章', title: '荣誉勋章',
path: `/src/pages/userMedal/index?id=${this.data.id}&customerId=${this.data.consumerId}&sid=${this.data.sid}&w=${visitor.studentId}`, path: `/src/pages/userMedal/index?id=${this.data.id}&customerId=${this.data.consumerId}&sid=${this.data.sid}&w=${visitor.studentId}`,
......
...@@ -75,6 +75,13 @@ Page({ ...@@ -75,6 +75,13 @@ Page({
}, },
onShareAppMessage: function (option) { // return custom share data when user share. onShareAppMessage: function (option) { // return custom share data when user share.
const visitor = LocalStorage.getItem('visitor'); const visitor = LocalStorage.getItem('visitor');
app.setSharerLog({
source_path: 'src/pages/websiteindex/bannervideo',
source_id: this.data.sid,
param: JSON.stringify({
query: `sid=${this.data.sid}&type=1&video=${this.data.video}&w=${visitor.studentId}`
})
});
return { return {
title: `我发现一家好机构@${this.data.schoolInfo.title},推荐给你`, title: `我发现一家好机构@${this.data.schoolInfo.title},推荐给你`,
path: `/src/pages/websiteindex/bannervideo?sid=${this.data.sid}&type=1&video=${this.data.video}&w=${visitor.studentId}`, path: `/src/pages/websiteindex/bannervideo?sid=${this.data.sid}&type=1&video=${this.data.video}&w=${visitor.studentId}`,
......
...@@ -123,6 +123,13 @@ Page({ ...@@ -123,6 +123,13 @@ Page({
*/ */
onShareAppMessage: function () { onShareAppMessage: function () {
const visitor = LocalStorage.getItem('visitor'); const visitor = LocalStorage.getItem('visitor');
app.setSharerLog({
source_path: 'src/pages/websiteindex/businessinfolist',
source_id: this.data.sid,
param: JSON.stringify({
query: `sid=${this.data.sid}&w=${visitor.studentId}`
})
});
return { return {
title: `我发现一家好机构@${this.data.schoolInfo.title},推荐给你`, title: `我发现一家好机构@${this.data.schoolInfo.title},推荐给你`,
path: `/src/pages/websiteindex/businessinfolist?sid=${this.data.sid}&w=${visitor.studentId}`, path: `/src/pages/websiteindex/businessinfolist?sid=${this.data.sid}&w=${visitor.studentId}`,
......
...@@ -131,9 +131,23 @@ Page({ ...@@ -131,9 +131,23 @@ Page({
} }
if (from == 'menu') { if (from == 'menu') {
shareObj = initShareObj; shareObj = initShareObj;
app.setSharerLog({
source_path: 'src/pages/websiteindex/clocklist',
source_id: this.data.sid,
param: JSON.stringify({
query: `sid=${this.data.sid}&w=${visitor.studentId}`
})
});
} else if (from == 'button') { } else if (from == 'button') {
if (!target.dataset.info) { if (!target.dataset.info) {
shareObj = initShareObj; shareObj = initShareObj;
app.setSharerLog({
source_path: 'src/pages/websiteindex/clocklist',
source_id: this.data.sid,
param: JSON.stringify({
query: `sid=${this.data.sid}&w=${visitor.studentId}`
})
});
} else { } else {
const { const {
target: { target: {
...@@ -142,6 +156,13 @@ Page({ ...@@ -142,6 +156,13 @@ Page({
} }
} }
} = option; } = option;
app.setSharerLog({
source_path: 'src/pages/clockdetail/newindex',
source_id: info.id,
param: JSON.stringify({
query: `id=${info.class_id}&tid=${info.subject_id}&cid=${info.id}&w=${visitor.studentId}`
})
});
shareObj = { shareObj = {
title: `${info.school_student.nickname}的打卡详情`, title: `${info.school_student.nickname}的打卡详情`,
path: `/src/pages/clockdetail/newindex?id=${info.class_id}&tid=${info.subject_id}&cid=${info.id}&w=${visitor.studentId}` path: `/src/pages/clockdetail/newindex?id=${info.class_id}&tid=${info.subject_id}&cid=${info.id}&w=${visitor.studentId}`
......
...@@ -234,9 +234,23 @@ Page({ ...@@ -234,9 +234,23 @@ Page({
} }
if (from == 'menu') { if (from == 'menu') {
shareObj = initShareObj; shareObj = initShareObj;
app.setSharerLog({
source_path: 'src/pages/websiteindex/index',
source_id: this.data.sid,
param: JSON.stringify({
query: `sid=${this.data.sid}&w=${visitor.studentId}`
})
});
} else if (from == 'button') { } else if (from == 'button') {
if (!target.dataset.info) { if (!target.dataset.info) {
shareObj = initShareObj; shareObj = initShareObj;
app.setSharerLog({
source_path: 'src/pages/websiteindex/index',
source_id: this.data.sid,
param: JSON.stringify({
query: `sid=${this.data.sid}&w=${visitor.studentId}`
})
});
} else { } else {
const { const {
target: { target: {
...@@ -249,6 +263,13 @@ Page({ ...@@ -249,6 +263,13 @@ Page({
title: `${info.school_student.nickname}的打卡详情`, title: `${info.school_student.nickname}的打卡详情`,
path: `/src/pages/clockdetail/newindex?id=${info.class_id}&tid=${info.subject_id}&cid=${info.id}&w=${visitor.studentId}` path: `/src/pages/clockdetail/newindex?id=${info.class_id}&tid=${info.subject_id}&cid=${info.id}&w=${visitor.studentId}`
} }
app.setSharerLog({
source_path: 'src/pages/clockdetail/newindex',
source_id: info.id,
param: JSON.stringify({
query: `id=${info.class_id}&tid=${info.subject_id}&cid=${info.id}&w=${visitor.studentId}`
})
});
} }
} }
return { return {
......
...@@ -172,6 +172,13 @@ Page({ ...@@ -172,6 +172,13 @@ Page({
student_id: visitor && visitor.studentId student_id: visitor && visitor.studentId
}).then((res) => { }).then((res) => {
}) })
app.setSharerLog({
source_path: 'src/pages/websiteindex/infovideo',
source_id: this.data.sid,
param: JSON.stringify({
query: `sid=${this.data.sid}&crt=${this.data.currentIndex}&type=1&w=${visitor.studentId}`
})
});
return { return {
title: `我发现一家好机构@${this.data.schoolInfo.title},推荐给你`, title: `我发现一家好机构@${this.data.schoolInfo.title},推荐给你`,
path: `/src/pages/websiteindex/infovideo?sid=${this.data.sid}&crt=${this.data.currentIndex}&type=1&w=${visitor.studentId}`, path: `/src/pages/websiteindex/infovideo?sid=${this.data.sid}&crt=${this.data.currentIndex}&type=1&w=${visitor.studentId}`,
......
...@@ -170,6 +170,14 @@ Page({ ...@@ -170,6 +170,14 @@ Page({
}, },
onShareAppMessage: function () { // return custom share data when user share. onShareAppMessage: function () { // return custom share data when user share.
const visitor = LocalStorage.getItem('visitor'); const visitor = LocalStorage.getItem('visitor');
app.setSharerLog({
source_path: 'ucenter/index',
source_id: this.data.sid,
param: JSON.stringify({
query: `w=${visitor.studentId}`
})
});
// setSharerLog
return { return {
title: '轻校通', title: '轻校通',
path: `/ucenter/index?w=${visitor.studentId}` path: `/ucenter/index?w=${visitor.studentId}`
......
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