CI/CD Pipeline / UI Contracts (source-structure gates) (push) Canceled after 0s
CI/CD Pipeline / E2E (live stack) (push) Canceled after 0s
CI/CD Pipeline / Backend Build & Test (push) Canceled after 0s
CI/CD Pipeline / Admin Web Build (push) Canceled after 0s
CI/CD Pipeline / Mini Program Compile Check (push) Canceled after 0s
CI/CD Pipeline / Migration Validation (push) Canceled after 0s
CI/CD Pipeline / Test Shell Guard (Phase 23 Gate) (push) Canceled after 0s
40 lines
2.0 KiB
Vue
40 lines
2.0 KiB
Vue
<template>
|
|
<div class="referral-management">
|
|
<el-card>
|
|
<template #header><div class="card-header"><span>红娘转介记录</span></div></template>
|
|
<el-table :data="referrals" stripe v-loading="loading">
|
|
<el-table-column prop="type" label="类型" width="120">
|
|
<template #default="{ row }"><el-tag>{{ typeLabel(row.type) }}</el-tag></template>
|
|
</el-table-column>
|
|
<el-table-column prop="referralDisplayId" label="转介编号" min-width="180" />
|
|
<el-table-column prop="status" label="状态" width="100">
|
|
<template #default="{ row }"><el-tag :type="row.status==='confirmed'?'success':'warning'">{{ row.status }}</el-tag></template>
|
|
</el-table-column>
|
|
<el-table-column prop="userConfirmedAt" label="用户确认时间" width="160">
|
|
<template #default="{ row }">{{ row.userConfirmedAt ? formatDateTime(row.userConfirmedAt) : '未确认' }}</template>
|
|
</el-table-column>
|
|
<el-table-column prop="createdAt" label="创建时间" width="160">
|
|
<template #default="{ row }">{{ formatDateTime(row.createdAt) }}</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-card>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { ref, onMounted } from 'vue'
|
|
import { get } from '@/api/client'
|
|
const loading = ref(false)
|
|
const referrals = ref<any[]>([])
|
|
function typeLabel(t: string) { return t === 'service_station' ? '服务站' : t === 'activity' ? '活动' : t }
|
|
function formatDateTime(d: string) { return d ? new Date(d).toLocaleString('zh-CN') : '-' }
|
|
async function load() {
|
|
loading.value = true
|
|
// Phase 13 契约修复:原 `/referrals/my-history` 是 C 端用户端点(UserPrincipal),
|
|
// 运营端无"我的用户身份"→ 取不到数据。改用运营端端点(按发起红娘过滤)。
|
|
try { const res: any = await get('/referrals/operator/history'); referrals.value = res.data || [] } finally { loading.value = false }
|
|
}
|
|
onMounted(load)
|
|
</script>
|
|
<style scoped>.card-header{display:flex;justify-content:space-between;align-items:center}</style>
|