feat: sync admin UI updates

This commit is contained in:
2026-04-23 18:41:45 +08:00
parent 24e517dfec
commit d628dfdd72
12 changed files with 199 additions and 136 deletions

View File

@@ -101,7 +101,8 @@ const openDialog = async (row?: { id?: string }) => {
try {
loading.value = true;
const res = await getLiveAccountDetail({ id: String(row.id) });
// 详情加载失败时由当前弹窗给出更易懂的业务提示。
const res = await getLiveAccountDetail({ id: String(row.id) }, { errorMode: 'page' });
if (res?.data) {
fillForm(res.data);
}
@@ -129,11 +130,12 @@ const handleSubmit = async () => {
remark: formData.remark,
};
// 提交失败提示交给当前弹窗自己处理,避免和 request.ts 的统一报错重复。
if (isEdit.value) {
await updateLiveAccount(payload);
await updateLiveAccount(payload, { errorMode: 'page' });
ElMessage.success('修改成功');
} else {
await createLiveAccount(payload);
await createLiveAccount(payload, { errorMode: 'page' });
ElMessage.success('新增成功');
}