feat: enhance user profile with detailed tags and asset evaluation
Optimize user detail page for asset assessment and tag info. #VERCEL_SKIP Co-authored-by: null <4804959+fnvtk@users.noreply.github.com>
This commit is contained in:
74
types/acquisition.ts
Normal file
74
types/acquisition.ts
Normal file
@@ -0,0 +1,74 @@
|
||||
// 订单表单数据相关类型定义
|
||||
export interface OrderFormData {
|
||||
// 基本信息
|
||||
customerName: string
|
||||
customerPhone: string
|
||||
customerEmail?: string
|
||||
|
||||
// 产品信息
|
||||
productId: string
|
||||
productName: string
|
||||
quantity: number
|
||||
unitPrice: number
|
||||
totalAmount: number
|
||||
|
||||
// 订单详情
|
||||
orderType: "online" | "offline" | "phone"
|
||||
paymentMethod: "wechat" | "alipay" | "card" | "cash" | "transfer"
|
||||
deliveryMethod: "pickup" | "delivery" | "express"
|
||||
|
||||
// 地址信息(如需配送)
|
||||
deliveryAddress?: {
|
||||
province: string
|
||||
city: string
|
||||
district: string
|
||||
street: string
|
||||
zipCode?: string
|
||||
}
|
||||
|
||||
// 时间信息
|
||||
orderDate: string
|
||||
expectedDeliveryDate?: string
|
||||
|
||||
// 备注和标签
|
||||
notes?: string
|
||||
tags?: string[]
|
||||
|
||||
// 来源信息
|
||||
source: "website" | "app" | "phone" | "store" | "social" | "referral"
|
||||
campaign?: string
|
||||
referrer?: string
|
||||
|
||||
// 状态
|
||||
status: "pending" | "confirmed" | "processing" | "shipped" | "delivered" | "cancelled"
|
||||
|
||||
// 元数据
|
||||
metadata?: Record<string, any>
|
||||
}
|
||||
|
||||
export interface OrderStats {
|
||||
totalOrders: number
|
||||
totalRevenue: number
|
||||
avgOrderValue: number
|
||||
conversionRate: number
|
||||
topProducts: Array<{
|
||||
productId: string
|
||||
productName: string
|
||||
quantity: number
|
||||
revenue: number
|
||||
}>
|
||||
}
|
||||
|
||||
export interface OrderFilter {
|
||||
dateRange?: {
|
||||
start: string
|
||||
end: string
|
||||
}
|
||||
status?: OrderFormData["status"]
|
||||
paymentMethod?: OrderFormData["paymentMethod"]
|
||||
source?: OrderFormData["source"]
|
||||
minAmount?: number
|
||||
maxAmount?: number
|
||||
customerPhone?: string
|
||||
productId?: string
|
||||
}
|
||||
@@ -1,4 +1,6 @@
|
||||
export type DeviceStatus = "online" | "offline" | "unknown"
|
||||
export type DeviceStatus = "online" | "offline" | "unknown" | "busy"
|
||||
|
||||
export type DeviceType = Device
|
||||
|
||||
export interface Device {
|
||||
id: string
|
||||
@@ -6,7 +8,9 @@ export interface Device {
|
||||
wechatId?: string
|
||||
group?: string
|
||||
tags?: string[]
|
||||
os: "Android" | "iOS" | "Windows" | "Mac"
|
||||
status: DeviceStatus
|
||||
owner?: string
|
||||
lastSeen?: string
|
||||
}
|
||||
|
||||
@@ -15,6 +19,7 @@ export interface CreateDeviceParams {
|
||||
wechatId?: string
|
||||
group?: string
|
||||
tags?: string[]
|
||||
os: "Android" | "iOS" | "Windows" | "Mac"
|
||||
}
|
||||
|
||||
export interface UpdateDeviceParams extends Partial<CreateDeviceParams> {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
export type ScenarioStatus = "draft" | "running" | "paused" | "completed"
|
||||
export type ScenarioStatus = "draft" | "running" | "paused" | "completed" | "active" | "archived"
|
||||
export type Channel = "phone" | "wechat" | "douyin" | "xiaohongshu" | "api"
|
||||
|
||||
export interface ScenarioBase {
|
||||
id: string
|
||||
@@ -11,9 +12,19 @@ export interface ScenarioBase {
|
||||
description?: string
|
||||
}
|
||||
|
||||
export interface Scenario {
|
||||
id: string
|
||||
name: string
|
||||
channel: Channel
|
||||
createdAt: string
|
||||
status: ScenarioStatus
|
||||
config?: Record<string, unknown>
|
||||
}
|
||||
|
||||
export interface CreateScenarioParams {
|
||||
name: string
|
||||
type: string
|
||||
channel: Channel
|
||||
description?: string
|
||||
}
|
||||
|
||||
@@ -42,7 +53,7 @@ export interface AcquisitionRecord {
|
||||
scenarioId: string
|
||||
userId: string
|
||||
time: string
|
||||
channel: string
|
||||
channel: Channel
|
||||
}
|
||||
|
||||
export interface PaginatedResponse<T> {
|
||||
|
||||
59
types/traffic.ts
Normal file
59
types/traffic.ts
Normal file
@@ -0,0 +1,59 @@
|
||||
// 流量用户相关类型定义
|
||||
export interface TrafficUser {
|
||||
id: string
|
||||
userId?: string
|
||||
sessionId: string
|
||||
ip: string
|
||||
userAgent: string
|
||||
device: {
|
||||
type: "mobile" | "tablet" | "desktop"
|
||||
brand?: string
|
||||
model?: string
|
||||
os?: string
|
||||
}
|
||||
location?: {
|
||||
country: string
|
||||
region: string
|
||||
city: string
|
||||
latitude?: number
|
||||
longitude?: number
|
||||
}
|
||||
referrer?: string
|
||||
landingPage: string
|
||||
currentPage: string
|
||||
visitTime: string
|
||||
duration: number
|
||||
pageViews: number
|
||||
isNewUser: boolean
|
||||
source: "organic" | "direct" | "social" | "email" | "ads" | "referral"
|
||||
campaign?: string
|
||||
keywords?: string[]
|
||||
events: TrafficEvent[]
|
||||
}
|
||||
|
||||
export interface TrafficEvent {
|
||||
id: string
|
||||
type: "page_view" | "click" | "scroll" | "form_submit" | "download" | "custom"
|
||||
timestamp: string
|
||||
data: Record<string, any>
|
||||
}
|
||||
|
||||
export interface TrafficStats {
|
||||
totalUsers: number
|
||||
newUsers: number
|
||||
returningUsers: number
|
||||
pageViews: number
|
||||
avgDuration: number
|
||||
bounceRate: number
|
||||
}
|
||||
|
||||
export interface TrafficFilter {
|
||||
dateRange?: {
|
||||
start: string
|
||||
end: string
|
||||
}
|
||||
source?: TrafficUser["source"]
|
||||
device?: TrafficUser["device"]["type"]
|
||||
location?: string
|
||||
isNewUser?: boolean
|
||||
}
|
||||
Reference in New Issue
Block a user