From 4bb38b116b9e30a046eff0f1aa5f18026193752a Mon Sep 17 00:00:00 2001 From: zzc <1761997216@qq.com> Date: Fri, 13 Mar 2026 04:55:20 +0800 Subject: [PATCH] fix: ad watch --- src/api/system/index.js | 8 ++ src/router/index.js | 6 + src/utils/index.js | 1 + src/views/spring/user/adWatch/index.vue | 141 ++++++++++++++++++++++++ 4 files changed, 156 insertions(+) create mode 100644 src/views/spring/user/adWatch/index.vue diff --git a/src/api/system/index.js b/src/api/system/index.js index 67da33e..d8932e4 100644 --- a/src/api/system/index.js +++ b/src/api/system/index.js @@ -15,3 +15,11 @@ export function getTrackingLogsList(data) { params: data, }) } + +export function getAdWatchTicketList(data) { + return request({ + url: 'management/api/system/ad-watch-ticket/list', + method: 'get', + params: data, + }) +} diff --git a/src/router/index.js b/src/router/index.js index 02369be..7da8a51 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -277,6 +277,12 @@ export const asyncRoutes = [ component: () => import('@/views/spring/user/order/index'), meta: { title: '订单' }, }, + { + path: 'adWatchRecord', + name: 'AdWatchRecord', + component: () => import('@/views/spring/user/adWatch/index'), + meta: { title: '广告观看记录' }, + }, { path: 'userChat', name: 'UserChat', diff --git a/src/utils/index.js b/src/utils/index.js index 14b2a78..8c79a76 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -52,6 +52,7 @@ export function parseTime(time, cFormat) { * @returns {string} */ export function formatTime(time, option) { + if (!time) return if (typeof time === 'string' && !isNaN(Date.parse(time))) { // 处理 ISO 8601 格式的时间 time = new Date(time) diff --git a/src/views/spring/user/adWatch/index.vue b/src/views/spring/user/adWatch/index.vue new file mode 100644 index 0000000..8a5ceb3 --- /dev/null +++ b/src/views/spring/user/adWatch/index.vue @@ -0,0 +1,141 @@ + + + + +