www:新增问题反馈功能;dashboard:适配问题反馈功能,可以在后台系统和用户沟通

This commit is contained in:
eafonyang
2026-08-20 16:42:01 +08:00
parent 5ae979f7e1
commit 3702ad4163
31 changed files with 1956 additions and 11 deletions
@@ -21,4 +21,5 @@ export * from './www-news';
export * from './www-media';
export * from './www-i18n';
export * from './www-contact';
export * from './www-support-feedback';
export * from './www-seo';
@@ -0,0 +1,44 @@
import { request } from '../request';
import type { PageParams } from './brand';
export function fetchGetSupportFeedbacks(params?: PageParams & {
status?: string;
email?: string;
feedback_no?: string;
start_date?: string;
end_date?: string;
}) {
return request<Api.Common.PageResult<Api.Www.SupportFeedback>>({
url: '/www/support/feedbacks',
method: 'get',
params,
});
}
export function fetchGetSupportFeedback(id: number) {
return request<Api.Www.SupportFeedback>({ url: `/www/support/feedbacks/${id}`, method: 'get' });
}
export function fetchUpdateSupportFeedbackStatus(id: number, status: string) {
return request<Api.Www.SupportFeedback>({
url: `/www/support/feedbacks/${id}`,
method: 'patch',
data: { status },
});
}
export function fetchGetSupportFeedbackMessages(id: number, sinceId?: number) {
return request<{ items: Api.Www.SupportFeedbackMessage[]; total: number }>({
url: `/www/support/feedbacks/${id}/messages`,
method: 'get',
params: sinceId ? { since_id: sinceId } : undefined,
});
}
export function fetchSendSupportFeedbackMessage(id: number, content: string) {
return request<{ items: Api.Www.SupportFeedbackMessage[]; total: number }>({
url: `/www/support/feedbacks/${id}/messages`,
method: 'post',
data: { content },
});
}