Commit 946b9b6f by 杨明

积分埋点

1 parent 91b24b5f
...@@ -261,5 +261,17 @@ module.exports = { ...@@ -261,5 +261,17 @@ module.exports = {
projectName: 'pad', projectName: 'pad',
...data ...data
}) })
},
recordInsert(data) {
return http.post(
{
method: 'clue.api.burial.point.record.batch.insert',
projectName: 'clue',
...data
},
false,
'scrm'
)
} }
} }
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: yangming@didihu.com.cn yangming@didihu.com.cn * @Author: yangming@didihu.com.cn yangming@didihu.com.cn
* @Date: 2025-05-01 10:52:25 * @Date: 2025-05-01 10:52:25
* @LastEditors: yangming@didihu.com.cn yangming@didihu.com.cn * @LastEditors: yangming@didihu.com.cn yangming@didihu.com.cn
* @LastEditTime: 2025-05-01 16:24:52 * @LastEditTime: 2025-05-06 15:14:30
* @FilePath: \gl-tape\components\HomeFrame\components\Attendance\index.vue * @FilePath: \gl-tape\components\HomeFrame\components\Attendance\index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
--> -->
...@@ -18,7 +18,8 @@ export default { ...@@ -18,7 +18,8 @@ export default {
mixins: [pointTrack], mixins: [pointTrack],
data() { data() {
return { return {
pageName: '我的考勤' pageName: '我的考勤',
eventCode: 'app_work_home',
} }
}, },
components: {Calendar} components: {Calendar}
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn * @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2025-01-08 09:51:43 * @Date: 2025-01-08 09:51:43
* @LastEditors: yangming@didihu.com.cn yangming@didihu.com.cn * @LastEditors: yangming@didihu.com.cn yangming@didihu.com.cn
* @LastEditTime: 2025-05-01 15:01:50 * @LastEditTime: 2025-05-06 15:18:53
* @FilePath: \gl-tape\components\HomeFrame\components\Income\Tips.vue * @FilePath: \gl-tape\components\HomeFrame\components\Income\Tips.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
--> -->
...@@ -242,6 +242,7 @@ export default { ...@@ -242,6 +242,7 @@ export default {
data() { data() {
return { return {
pageName: '收入测算试算页', pageName: '收入测算试算页',
eventCode: 'app_income_count',
errorTip: false, errorTip: false,
isClick: false, isClick: false,
list: [], list: [],
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn * @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2025-01-07 13:49:15 * @Date: 2025-01-07 13:49:15
* @LastEditors: yangming@didihu.com.cn yangming@didihu.com.cn * @LastEditors: yangming@didihu.com.cn yangming@didihu.com.cn
* @LastEditTime: 2025-05-01 13:40:39 * @LastEditTime: 2025-05-06 15:14:04
* @FilePath: \gl-tape\components\HomeFrame\components\Income\History.vue * @FilePath: \gl-tape\components\HomeFrame\components\Income\History.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
--> -->
...@@ -135,6 +135,7 @@ export default { ...@@ -135,6 +135,7 @@ export default {
data() { data() {
return { return {
pageName: '历史收入记录', pageName: '历史收入记录',
eventCode: 'app_income_history',
title: '学习数据', title: '学习数据',
show: false, show: false,
isExist: false, isExist: false,
......
...@@ -107,6 +107,7 @@ export default { ...@@ -107,6 +107,7 @@ export default {
} }
if (page) { if (page) {
this.pageName = '收入测算首页' this.pageName = '收入测算首页'
this.eventCode = 'app_income_home'
this.enterPage() this.enterPage()
} }
this.showPassword = false this.showPassword = false
......
...@@ -70,6 +70,7 @@ export default { ...@@ -70,6 +70,7 @@ export default {
data() { data() {
return { return {
pageName: '本月积分', pageName: '本月积分',
eventCode: 'app_point_month',
pointClassification: ['C001', 'C003', 'C002'], pointClassification: ['C001', 'C003', 'C002'],
pointClassName: ['培训类', '行为类', '学习类'], pointClassName: ['培训类', '行为类', '学习类'],
statistics: {}, statistics: {},
......
...@@ -56,6 +56,7 @@ export default { ...@@ -56,6 +56,7 @@ export default {
data() { data() {
return { return {
pageName: '每日积分', pageName: '每日积分',
eventCode: 'app_point_day',
second: 3, second: 3,
timer: null, timer: null,
selectItem: {}, selectItem: {},
......
...@@ -87,6 +87,7 @@ export default { ...@@ -87,6 +87,7 @@ export default {
data() { data() {
return { return {
pageName: '成长勋章', pageName: '成长勋章',
eventCode: 'app_point_level',
selectItem: {}, selectItem: {},
detail: [], detail: [],
isHigh: false, isHigh: false,
......
...@@ -213,6 +213,7 @@ export default { ...@@ -213,6 +213,7 @@ export default {
data() { data() {
return { return {
pageName: '积分兑换券', pageName: '积分兑换券',
eventCode: 'app_point_coupon',
isHigh: false, isHigh: false,
typeList: [ typeList: [
{ tabName: '全部', num: () => '' }, { tabName: '全部', num: () => '' },
......
...@@ -97,6 +97,7 @@ export default { ...@@ -97,6 +97,7 @@ export default {
data() { data() {
return { return {
pageName: '本月排名', pageName: '本月排名',
eventCode: 'app_point_rank',
selectItem: {}, selectItem: {},
detail: [], detail: [],
currentIndex: 0, currentIndex: 0,
......
...@@ -38,6 +38,7 @@ export default { ...@@ -38,6 +38,7 @@ export default {
data() { data() {
return { return {
pageName: '积分规则', pageName: '积分规则',
eventCode: 'app_point_rule',
selectItem: {}, selectItem: {},
tabelTh: [ tabelTh: [
{ title: '分类', width: 6 }, { title: '分类', width: 6 },
......
...@@ -128,6 +128,7 @@ export default { ...@@ -128,6 +128,7 @@ export default {
data() { data() {
return { return {
pageName: '积分首页', pageName: '积分首页',
eventCode:'app_point_home',
level: 1, level: 1,
month: '', month: '',
date: '', date: '',
......
...@@ -2,11 +2,13 @@ ...@@ -2,11 +2,13 @@
* @Author: yangming@didihu.com.cn yangming@didihu.com.cn * @Author: yangming@didihu.com.cn yangming@didihu.com.cn
* @Date: 2025-05-01 11:00:20 * @Date: 2025-05-01 11:00:20
* @LastEditors: yangming@didihu.com.cn yangming@didihu.com.cn * @LastEditors: yangming@didihu.com.cn yangming@didihu.com.cn
* @LastEditTime: 2025-05-01 16:36:35 * @LastEditTime: 2025-05-06 16:02:46
* @FilePath: \gl-tape\mixin\pointTrack.js * @FilePath: \gl-tape\mixin\pointTrack.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/ */
const FILTER_PAGE = ['收入测算试算页'] const FILTER_PAGE = ['收入测算试算页']
const REPORT_MAN = 5
import dayjs from 'dayjs'
export default { export default {
data() { data() {
return { return {
...@@ -23,26 +25,46 @@ export default { ...@@ -23,26 +25,46 @@ export default {
this.enterPage() this.enterPage()
}, },
// 上报埋点 // 上报埋点
report() { report(recordList) {
const { phone: phoneNumber, uuid, sceneType: bussinessType } = uni.$storage.get('userInfo') uni.$api.commonApi.recordInsert({ recordList }).then(res => {
if (res) {
let recordTrackList = uni.$storage.get('recordTrackList') || []
recordTrackList = recordTrackList.slice(REPORT_MAN)
uni.$storage.set('recordTrackList', recordTrackList)
}
})
},
collect() {
const { phone: phoneNumber, name: loginAccount, uuid, sceneType: scene, userType } = uni.$storage.get('userInfo')
const params = { const params = {
userType,
loginAccount,
phoneNumber, phoneNumber,
uuid, uuid,
bussinessType, scene,
pageName: this.pageName, prePagePath: '/',
enterTime: this.currentTime, pagePath: this.pageName,
leaveTime: new Date(), eventCode: this.eventCode,
systemSource: 'app' eventTime: dayjs(Date.now()).format('YYYY-MM-DD HH:mm:ss'),
batchId: this.currentTime,
systemSource: 3,
eventType: 2
}
const recordTrackList = uni.$storage.get('recordTrackList') || []
recordTrackList.push(params)
uni.$storage.set('recordTrackList', recordTrackList)
if (recordTrackList.length >= REPORT_MAN) {
this.report(recordTrackList.slice(0, REPORT_MAN))
} }
}, },
// 离开页面埋点 // 离开页面埋点
leavePage() { leavePage() {
console.log('离开页面', this.pageName, this.currentTime, new Date()) this.collect()
}, },
// 进入页面埋点 // 进入页面埋点
enterPage() { enterPage() {
this.currentTime = new Date() this.currentTime = Date.now()
console.log('进入页面', this.pageName, new Date()) this.collect()
} }
}, },
beforeDestroy() { beforeDestroy() {
......
/*
* @Author: yangming@didihu.com.cn yangming@didihu.com.cn
* @Date: 2024-04-16 09:55:40
* @LastEditors: yangming@didihu.com.cn yangming@didihu.com.cn
* @LastEditTime: 2025-05-06 15:56:54
* @FilePath: \gl-tape\utils\cache\constantData.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
// export const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/miniprogram/store-assistant/' // export const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/miniprogram/store-assistant/'
// import util from '~/utils/util' // import util from '~/utils/util'
...@@ -29,5 +37,6 @@ export const STORAGE_OBJECTKEY = { ...@@ -29,5 +37,6 @@ export const STORAGE_OBJECTKEY = {
boutique_mock_data: 'boutique_mock_data', boutique_mock_data: 'boutique_mock_data',
findReceptionpriproConfigList: 'findReceptionpriproConfigList', findReceptionpriproConfigList: 'findReceptionpriproConfigList',
appInfoList: 'appInfoList', appInfoList: 'appInfoList',
leadPage: 'leadPage' leadPage: 'leadPage',
recordTrackList: 'recordTrackList'
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!