/* * MC Report System * Copyright (C) 2026 Sea Network Technology Studio * Author: CangLan * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published * by the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ const TrackingPage = { async render() { return '
'; }, mount() { const ct = document.getElementById('page-content'); document.getElementById('page-title').textContent = '追踪工单'; document.getElementById('page-actions').innerHTML = ''; const token = document.cookie.split('; ').find(r => r.startsWith('tracking_token='))?.split('=')[1] || ''; ct.innerHTML = `
`; }, async search() { const token = document.getElementById('track-token').value.trim(); if (!token) return alert('请输入追踪标识'); const ct = document.getElementById('track-result'); U.loading(ct); try { const tickets = await API.get(`/tickets/tracking?token=${token}`); ct.innerHTML = tickets.length ? `
${tickets.map(t => ` `).join('')}
#类型标题状态时间
${t.id}${U.badge(t.type,'type')} ${U.esc(t.title)} ${U.badge(t.status,'status')}${U.date(t.created_at)}

如需获取更详细的跟踪和回复通知,请注册账号

` : '

未找到工单

'; } catch (e) { ct.innerHTML = `
${e.message}
`; } } };