From d50a3ed44e2edab2a7a661c43491c3aa42c57794 Mon Sep 17 00:00:00 2001
From: peng <peng.com>
Date: 星期四, 25 九月 2025 14:17:05 +0800
Subject: [PATCH] 用户行为分享基础埋点

---
 pages/order/afterSales/afterSalesSelect.vue |   44 ++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 40 insertions(+), 4 deletions(-)

diff --git a/pages/order/afterSales/afterSalesSelect.vue b/pages/order/afterSales/afterSalesSelect.vue
index af45368..ceb4a8b 100644
--- a/pages/order/afterSales/afterSalesSelect.vue
+++ b/pages/order/afterSales/afterSalesSelect.vue
@@ -28,7 +28,7 @@
     <view class="select-view">
       <view class="select-cell"  v-if="applyInfo.returnGoods"  @click="onSelect(1)">
         <view class="select-image">
-          <image style="height: 51rpx; width: 51rpx" src="/static/order/t1.png"></image>
+          <image style="height: 51rpx; width: 51rpx" src="/pages/subComponents/static/order/t1.png"></image>
         </view>
         <view class="right">
           <view class="select-title">閫�璐�</view>
@@ -40,7 +40,7 @@
       </view>
       <view class="select-cell" v-if="applyInfo.returnMoney"  @click="onSelect(3)">
         <view class="select-image">
-          <image style="height: 51rpx; width: 51rpx" src="/static/order/t3.png"></image>
+          <image style="height: 51rpx; width: 51rpx" src="/pages/subComponents/static/order/t3.png"></image>
         </view>
         <view class="right">
           <view class="select-title">閫�娆�</view>
@@ -55,18 +55,54 @@
 </template>
 
 <script>
-import '@/uview-components/uview-ui'
+import '@/components/uview-components/uview-ui'
 import { getAfterSaleInfo } from "@/api/after-sale";
 import storage from "@/utils/storage";
+import { getSessionId, userAction } from "@/api/userAction.js";
 export default {
   data() {
     return {
       sn: "",
       sku: {}, //sku
-      applyInfo:""
+      applyInfo:"",
+	  pageSessionNo:"",
+    sendOnShow:false,
+	  actionParam:{
+			sessionId:'',
+			actionType:"PAGE",
+			joinType:"SELF",
+			pageCode:"APPLY_SALE",
+			pageParams:"{}",
+			pageStatus:"JOIN",
+			pageType:"LIST"
+		}
     };
   },
+  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)
     this.sn = options.sn;
     this.sku = storage.getAfterSaleData();
     // 鏌ョ湅褰撳墠鍟嗗搧鏄惁鏀寔閫�娆鹃��璐�

--
Gitblit v1.8.0