From 9653f4faa20699a2d9a03391f4a6175ff8ce59c3 Mon Sep 17 00:00:00 2001 From: peng <peng.com> Date: 星期日, 28 九月 2025 15:26:18 +0800 Subject: [PATCH] Merge branch 'dev_fix_sub' into user_action --- pages/tabbar/user/my.vue | 35 +++++++++++++++++++++++++++++++++++ 1 files changed, 35 insertions(+), 0 deletions(-) diff --git a/pages/tabbar/user/my.vue b/pages/tabbar/user/my.vue index 48bf11a..eaf717e 100644 --- a/pages/tabbar/user/my.vue +++ b/pages/tabbar/user/my.vue @@ -144,6 +144,7 @@ import { getUserWallet } from "@/api/members"; import configs from '@/config/config' import storage from '@/utils/storage.js' +import { getSessionId, userAction } from "@/api/userAction.js"; export default { components: { tool @@ -160,6 +161,16 @@ couponNum: "", footNum: "", walletNum: "", + pageSessionNo:"", + actionParam:{ + sessionId:'', + actionType:"PAGE", + joinType:"SELF", + pageCode:"TBA_BAR_MY", + pageParams:"{}", + pageStatus:"JOIN", + pageType:"DETAIL" + } }; }, onLoad(option) { @@ -207,8 +218,32 @@ } } this.initCOS() + 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) + }, + onLoad(options) { + this.actionParam.pageParams = JSON.stringify(options) + this.initCOS() }, onShow() { + getSessionId().then(res=>{ + this.pageSessionNo = res.data.data + if(this.pageSessionNo){ + let param = this.actionParam; + param.sessionId = this.pageSessionNo + userAction(param) + } + }) this.userInfo = this.$options.filters.isLogin() || {}; if (this.$options.filters.isLogin("auth")) { this.getUserOrderNum(); -- Gitblit v1.8.0