From 89efee9a2e20fc04b4537d859917b47cf68a814c Mon Sep 17 00:00:00 2001 From: peng <peng.com> Date: 星期五, 26 九月 2025 18:28:40 +0800 Subject: [PATCH] 用户行为分享基础埋点 --- pages/order/afterSales/afterSalesDetail.vue | 37 ++++++++++++++++++++++++++++++++++++- 1 files changed, 36 insertions(+), 1 deletions(-) diff --git a/pages/order/afterSales/afterSalesDetail.vue b/pages/order/afterSales/afterSalesDetail.vue index a157028..ca1a226 100644 --- a/pages/order/afterSales/afterSalesDetail.vue +++ b/pages/order/afterSales/afterSalesDetail.vue @@ -108,6 +108,7 @@ import { upload } from "@/api/common.js"; import { checkBankno } from "@/utils/Foundation"; import storage from "@/utils/storage.js"; +import { getSessionId, userAction } from "@/api/userAction.js"; export default { component: { city, @@ -169,13 +170,47 @@ refundWay: "", serviceType: "", //鐢宠绫诲瀷 }, + pageSessionNo:"", + sendOnShow:false, + actionParam:{ + sessionId:'', + actionType:"PAGE", + joinType:"SELF", + pageCode:"REFUND_ORDER", + pageParams:"{}", + pageStatus:"JOIN", + pageType:"DETAIL" + } }; }, - + onUnload() { + let param = this.actionParam; + if (this.sendOnShow)return + param.pageStatus = "LEAVE" + userAction(param) + }, + onHide() { + this.startHidenTime = Date.now() + let param = this.actionParam; + this.sendOnShow = true; + param.pageStatus = "LEAVE" + userAction(param) + }, + onShow() { + getSessionId().then(res=>{ + this.pageSessionNo = res.data.data + if(this.pageSessionNo){ + let param = this.actionParam; + param.sessionId = this.pageSessionNo + userAction(param) + } + }) + }, /** * 鍒ゆ柇褰撳墠鍐呭骞剁敓鎴愭暟鎹� */ onLoad(options) { + this.actionParam.pageParams = JSON.stringify(options) let navTitle = "鐢宠鍞悗"; this.form.serviceType = "RETURN_GOODS"; if (options.value == 1) { -- Gitblit v1.8.0