欢迎语支持多段配置与图片
租户可配置有序文本/图片欢迎语;设置页支持增删排序与上传,Widget 空会话按序展示;兼容旧 welcome_message 字段。
This commit is contained in:
+12
-2
@@ -354,12 +354,21 @@ export const deleteStaff = (id: number) => del(`/staff/${id}`)
|
||||
export type WorkHours = Record<string, string>
|
||||
export type AssignStrategy = 'least_load' | 'round_robin'
|
||||
|
||||
/** 欢迎语段落:文本或图片 URL */
|
||||
export type WelcomeSegment = {
|
||||
type: 'text' | 'image'
|
||||
content: string
|
||||
}
|
||||
|
||||
export interface TenantSettings {
|
||||
tenant_id: number
|
||||
display_name: string
|
||||
agent_nickname: string
|
||||
timezone: string
|
||||
/** 兼容字段:首段文本欢迎语 */
|
||||
welcome_message: string
|
||||
/** 多段欢迎语(含图片) */
|
||||
welcome_messages?: WelcomeSegment[]
|
||||
offline_prompt: string
|
||||
work_hours: WorkHours
|
||||
worktime_prompt: string
|
||||
@@ -372,8 +381,9 @@ export interface TenantSettings {
|
||||
max_active_per_agent?: number
|
||||
}
|
||||
export const getTenantSettings = () => get<TenantSettings>('/settings')
|
||||
export const updateTenantSettings = (data: Partial<TenantSettings> & { work_hours?: WorkHours }) =>
|
||||
put<TenantSettings>('/settings', data)
|
||||
export const updateTenantSettings = (
|
||||
data: Partial<TenantSettings> & { work_hours?: WorkHours; welcome_messages?: WelcomeSegment[] },
|
||||
) => put<TenantSettings>('/settings', data)
|
||||
|
||||
// Statistics
|
||||
export const getKPIs = () => get<StatisticsKpis>('/statistics/kpi')
|
||||
|
||||
Reference in New Issue
Block a user