-
-
-
存客宝标签
+ {/* 存客宝标签(与用户标签共用 ckb_tags,兼容 JSON 与逗号分隔) */}
+ {(() => {
+ const raw = user.tags || user.ckbTags || ''
+ let arr: string[] = []
+ try {
+ const parsed = typeof raw === 'string' ? JSON.parse(raw || '[]') : []
+ arr = Array.isArray(parsed) ? parsed : (typeof raw === 'string' ? raw.split(',') : [])
+ } catch {
+ arr = typeof raw === 'string' ? raw.split(',') : []
+ }
+ const tags = arr.map((t) => String(t).trim()).filter(Boolean)
+ if (tags.length === 0) return null
+ return (
+
+
+
+ 存客宝标签
+
+
+ {tags.map((tag, i) => (
+ {tag}
+ ))}
+
-
- {(typeof user.ckbTags === 'string' ? user.ckbTags.split(',') : []).map((tag, i) => (
- {tag.trim()}
- ))}
-
-
- )}
+ )
+ })()}
{/* ===== 用户旅程(原行为轨迹)===== */}
diff --git a/soul-admin/src/pages/dashboard/DashboardPage.tsx b/soul-admin/src/pages/dashboard/DashboardPage.tsx
index ba3dc2c5..505a80ad 100644
--- a/soul-admin/src/pages/dashboard/DashboardPage.tsx
+++ b/soul-admin/src/pages/dashboard/DashboardPage.tsx
@@ -181,6 +181,10 @@ export function DashboardPage() {
const formatOrderProduct = (p: OrderRow) => {
const type = p.productType || ''
const desc = p.description || ''
+ if (type === 'balance_recharge') {
+ const amount = typeof p.amount === 'number' ? p.amount.toFixed(2) : parseFloat(String(p.amount || '0')).toFixed(2)
+ return { title: `余额充值 ¥${amount}`, subtitle: '余额充值' }
+ }
if (desc) {
if (type === 'section' && desc.includes('章节')) {
if (desc.includes('-')) {
@@ -197,6 +201,9 @@ export function DashboardPage() {
if (type === 'fullbook' || desc.includes('全书')) {
return { title: '《一场Soul的创业实验》', subtitle: '全书购买' }
}
+ if (type === 'vip' || desc.includes('VIP')) {
+ return { title: '超级个体开通费用', subtitle: '超级个体' }
+ }
if (type === 'match' || desc.includes('伙伴')) {
return { title: '找伙伴匹配', subtitle: '功能服务' }
}
@@ -207,6 +214,7 @@ export function DashboardPage() {
}
if (type === 'section') return { title: `章节 ${p.productId || ''}`, subtitle: '单章购买' }
if (type === 'fullbook') return { title: '《一场Soul的创业实验》', subtitle: '全书购买' }
+ if (type === 'vip') return { title: '超级个体开通费用', subtitle: '超级个体' }
if (type === 'match') return { title: '找伙伴匹配', subtitle: '功能服务' }
return { title: '未知商品', subtitle: type || '其他' }
}
diff --git a/soul-admin/src/pages/distribution/DistributionPage.tsx b/soul-admin/src/pages/distribution/DistributionPage.tsx
index 42ce5615..391eaeed 100644
--- a/soul-admin/src/pages/distribution/DistributionPage.tsx
+++ b/soul-admin/src/pages/distribution/DistributionPage.tsx
@@ -838,6 +838,14 @@ export function DistributionPage() {
{(() => {
const type = order.productType || order.type
+ const desc = order.description || ''
+ const pid = String(order.productId || order.sectionId || '')
+ const isVip = type === 'vip' || desc.includes('VIP') || desc.toLowerCase().includes('vip') || pid.toLowerCase().includes('vip')
+ if (type === 'balance_recharge') {
+ const amount = typeof order.amount === 'number' ? order.amount.toFixed(2) : parseFloat(String(order.amount || '0')).toFixed(2)
+ return `余额充值 ¥${amount}`
+ }
+ if (isVip) return '超级个体开通费用'
if (type === 'fullbook')
return `${order.bookName || '《底层逻辑》'} - 全本`
if (type === 'match') return '匹配次数购买'
@@ -847,6 +855,11 @@ export function DistributionPage() {
{(() => {
const type = order.productType || order.type
+ const desc = order.description || ''
+ const pid = String(order.productId || order.sectionId || '')
+ const isVip = type === 'vip' || desc.includes('VIP') || desc.toLowerCase().includes('vip') || pid.toLowerCase().includes('vip')
+ if (type === 'balance_recharge') return '余额充值'
+ if (isVip) return '超级个体'
if (type === 'fullbook') return '全书解锁'
if (type === 'match') return '功能权益'
return order.chapterTitle || '单章购买'
@@ -860,9 +873,11 @@ export function DistributionPage() {
{order.paymentMethod === 'wechat'
? '微信支付'
- : order.paymentMethod === 'alipay'
- ? '支付宝'
- : order.paymentMethod || '微信支付'}
+ : order.paymentMethod === 'balance'
+ ? '余额支付'
+ : order.paymentMethod === 'alipay'
+ ? '支付宝'
+ : order.paymentMethod || '微信支付'}
|
{order.status === 'refunded' ? (
diff --git a/soul-admin/src/pages/orders/OrdersPage.tsx b/soul-admin/src/pages/orders/OrdersPage.tsx
index b038c047..92b011ec 100644
--- a/soul-admin/src/pages/orders/OrdersPage.tsx
+++ b/soul-admin/src/pages/orders/OrdersPage.tsx
@@ -41,6 +41,9 @@ interface Purchase {
productType?: string
description?: string
refundReason?: string
+ giftPayRequestId?: string
+ payerUserId?: string
+ payerNickname?: string
}
interface UsersItem {
@@ -114,6 +117,10 @@ export function OrdersPage() {
const formatProduct = (order: Purchase) => {
const type = order.productType || order.type || ''
const desc = order.description || ''
+ if (type === 'balance_recharge') {
+ const amount = Number(order.amount || 0).toFixed(2)
+ return { name: `余额充值 ¥${amount}`, type: '余额充值' }
+ }
if (desc) {
if (type === 'section' && desc.includes('章节')) {
if (desc.includes('-')) {
@@ -128,7 +135,7 @@ export function OrdersPage() {
return { name: '《一场Soul的创业实验》', type: '全书购买' }
}
if (type === 'vip' || desc.includes('VIP')) {
- return { name: 'VIP年度会员', type: 'VIP' }
+ return { name: '超级个体开通费用', type: '超级个体' }
}
if (type === 'match' || desc.includes('伙伴')) {
return { name: '找伙伴匹配', type: '功能服务' }
@@ -137,7 +144,7 @@ export function OrdersPage() {
}
if (type === 'section') return { name: `章节 ${order.productId || order.sectionId || ''}`, type: '单章' }
if (type === 'fullbook') return { name: '《一场Soul的创业实验》', type: '全书' }
- if (type === 'vip') return { name: 'VIP年度会员', type: 'VIP' }
+ if (type === 'vip') return { name: '超级个体开通费用', type: '超级个体' }
if (type === 'match') return { name: '找伙伴匹配', type: '功能' }
return { name: '未知商品', type: type || '其他' }
}
@@ -182,7 +189,7 @@ export function OrdersPage() {
getUserPhone(p.userId),
product.name,
Number(p.amount || 0).toFixed(2),
- p.paymentMethod === 'wechat' ? '微信支付' : p.paymentMethod === 'alipay' ? '支付宝' : p.paymentMethod || '微信支付',
+ p.paymentMethod === 'wechat' ? '微信支付' : p.paymentMethod === 'balance' ? '余额支付' : p.paymentMethod === 'alipay' ? '支付宝' : p.paymentMethod || '微信支付',
p.status === 'refunded' ? '已退款' : p.status === 'paid' || p.status === 'completed' ? '已完成' : p.status === 'pending' || p.status === 'created' ? '待支付' : '已失败',
p.status === 'refunded' && p.refundReason ? p.refundReason : '-',
p.referrerEarnings ? Number(p.referrerEarnings).toFixed(2) : '-',
@@ -305,8 +312,18 @@ export function OrdersPage() {
- {getUserNickname(purchase)}
+
+ {getUserNickname(purchase)}
+ {purchase.payerUserId && (
+
+ 代付
+
+ )}
+
{getUserPhone(purchase.userId)}
+ {purchase.payerUserId && purchase.payerNickname && (
+ 代付人:{purchase.payerNickname}
+ )}
@@ -315,7 +332,7 @@ export function OrdersPage() {
{product.name}
{(purchase.productType || purchase.type) === 'vip' && (
- VIP
+ 超级个体
)}
@@ -328,9 +345,11 @@ export function OrdersPage() {
{purchase.paymentMethod === 'wechat'
? '微信支付'
- : purchase.paymentMethod === 'alipay'
- ? '支付宝'
- : purchase.paymentMethod || '微信支付'}
+ : purchase.paymentMethod === 'balance'
+ ? '余额支付'
+ : purchase.paymentMethod === 'alipay'
+ ? '支付宝'
+ : purchase.paymentMethod || '微信支付'}
{purchase.status === 'refunded' ? (
@@ -363,7 +382,8 @@ export function OrdersPage() {
{new Date(purchase.createdAt).toLocaleString('zh-CN')}
- {(purchase.status === 'paid' || purchase.status === 'completed') && (
+ {(purchase.status === 'paid' || purchase.status === 'completed') &&
+ purchase.paymentMethod !== 'balance' && (
|