fix:修复bug

This commit is contained in:
2026-01-22 10:52:58 +08:00
parent b0daa7b59b
commit 6a1dff4b94
46 changed files with 3779 additions and 2522 deletions
+17 -17
View File
@@ -98,13 +98,13 @@
} from '@/utils/i18n.js'
const {
t: $t
t
} = useI18n()
// 设置页面标题
onMounted(() => {
uni.setNavigationBarTitle({
title: $t('feedback.detail')
title: t('feedback.detail')
})
})
@@ -126,7 +126,7 @@
await loadDetail();
} else {
uni.showToast({
title: $t('feedback.idRequired'),
title: t('feedback.idRequired'),
icon: 'none'
});
setTimeout(() => {
@@ -170,7 +170,7 @@
try {
if (shouldShowLoading) {
uni.showLoading({
title: $t('common.loading')
title: t('common.loading')
});
}
@@ -180,7 +180,7 @@
await loadMessages(res.data.messages);
} else {
uni.showToast({
title: res.msg || $t('feedback.getDetailFailed'),
title: res.msg || t('feedback.getDetailFailed'),
icon: 'none'
});
setTimeout(() => {
@@ -190,7 +190,7 @@
} catch (error) {
console.error('获取投诉详情失败:', error);
uni.showToast({
title: $t('feedback.getDetailFailed'),
title: t('feedback.getDetailFailed'),
icon: 'none'
});
setTimeout(() => {
@@ -207,7 +207,7 @@
const submitReply = async () => {
if (!replyContent.value.trim()) {
uni.showToast({
title: $t('feedback.pleaseEnterReply'),
title: t('feedback.pleaseEnterReply'),
icon: 'none'
});
return;
@@ -215,7 +215,7 @@
try {
uni.showLoading({
title: $t('common.submitting')
title: t('common.submitting')
});
const res = await sendFeedbackMessage(feedbackId.value, {
@@ -224,7 +224,7 @@
if (res.code === 200) {
uni.showToast({
title: $t('feedback.replySuccess'),
title: t('feedback.replySuccess'),
icon: 'success'
});
replyContent.value = '';
@@ -234,14 +234,14 @@
});
} else {
uni.showToast({
title: res.msg || $t('feedback.replyFailed'),
title: res.msg || t('feedback.replyFailed'),
icon: 'none'
});
}
} catch (error) {
console.error('提交回复失败:', error);
uni.showToast({
title: $t('feedback.replyFailed'),
title: t('feedback.replyFailed'),
icon: 'none'
});
} finally {
@@ -252,11 +252,11 @@
// 获取状态文本
const getStatusText = (status) => {
const statusMap = {
'pending': $t('feedback.pending'),
'in_progress': $t('feedback.processing'),
'resolved': $t('feedback.completed')
'pending': t('feedback.pending'),
'in_progress': t('feedback.processing'),
'resolved': t('feedback.completed')
};
return statusMap[status] || $t('feedback.pending');
return statusMap[status] || t('feedback.pending');
};
// 获取状态样式类
@@ -272,8 +272,8 @@
// 获取类型文本
const getTypeText = (type) => {
const typeMap = {
'complain': $t('feedback.complain'),
'suggestion': $t('feedback.suggestion')
'complain': t('feedback.complain'),
'suggestion': t('feedback.suggestion')
};
return typeMap[type] || type || '-';
};
+10 -10
View File
@@ -80,7 +80,7 @@
useI18n
} from '@/utils/i18n.js'
const {
t: $t
t
} = useI18n()
// 跳转到投诉记录列表
@@ -92,7 +92,7 @@
onMounted(() => {
uni.setNavigationBarTitle({
title: $t('feedback.title')
title: t('feedback.title')
})
})
@@ -137,7 +137,7 @@
const submitFeedback = async () => {
if (selectedType.value === -1) {
uni.showToast({
title: $t('feedback.pleaseSelectType'),
title: t('feedback.pleaseSelectType'),
icon: 'none'
})
return
@@ -145,7 +145,7 @@
if (!description.value.trim()) {
uni.showToast({
title: $t('feedback.pleaseDescribe'),
title: t('feedback.pleaseDescribe'),
icon: 'none'
})
return
@@ -153,7 +153,7 @@
if (!contact.value) {
uni.showToast({
title: $t('feedback.pleaseContact'),
title: t('feedback.pleaseContact'),
icon: 'none'
})
return
@@ -169,7 +169,7 @@
try {
// 显示上传进度
uni.showLoading({
title: $t('feedback.uploading') || '上传中...',
title: t('feedback.uploading') || '上传中...',
mask: true
})
@@ -185,7 +185,7 @@
console.error(`文件 ${i + 1} 上传失败:`, err)
uni.hideLoading()
uni.showToast({
title: $t('feedback.imageUploadFailed'),
title: t('feedback.imageUploadFailed'),
icon: 'none'
})
return
@@ -208,7 +208,7 @@
// 处理响应
if (res && (res.code === 200 || res === true || res?.success === true)) {
uni.showToast({
title: $t('feedback.submitSuccess'),
title: t('feedback.submitSuccess'),
icon: 'success'
})
setTimeout(() => {
@@ -216,7 +216,7 @@
}, 1500);
} else {
uni.showToast({
title: (res && (res.msg || res.message)) || $t('feedback.submitFailed'),
title: (res && (res.msg || res.message)) || t('feedback.submitFailed'),
icon: 'none'
})
}
@@ -224,7 +224,7 @@
console.error('feedback submit failed:', err)
uni.hideLoading()
uni.showToast({
title: $t('error.networkError') || '网络错误,请重试',
title: t('error.networkError') || '网络错误,请重试',
icon: 'none'
})
}
+14 -14
View File
@@ -78,13 +78,13 @@
} from '@/utils/i18n.js'
const {
t: $t
t
} = useI18n()
// 设置页面标题
onMounted(() => {
uni.setNavigationBarTitle({
title: $t('feedback.recordList')
title: t('feedback.recordList')
})
})
@@ -100,25 +100,25 @@
// 状态标签
const statusTabs = reactive([{
get text() {
return $t('common.all')
return t('common.all')
},
status: ''
},
{
get text() {
return $t('feedback.pending')
return t('feedback.pending')
},
status: 'pending'
},
{
get text() {
return $t('feedback.processing')
return t('feedback.processing')
},
status: 'in_progress'
},
{
get text() {
return $t('feedback.completed')
return t('feedback.completed')
},
status: 'resolved'
}
@@ -176,14 +176,14 @@
}
} else {
uni.showToast({
title: res.msg || $t('feedback.getListFailed'),
title: res.msg || t('feedback.getListFailed'),
icon: 'none'
});
}
} catch (error) {
console.error('获取投诉列表失败:', error);
uni.showToast({
title: $t('feedback.getListFailed'),
title: t('feedback.getListFailed'),
icon: 'none'
});
} finally {
@@ -211,11 +211,11 @@
// 获取状态文本
const getStatusText = (status) => {
const statusMap = {
'pending': $t('feedback.pending'),
'in_progress': $t('feedback.processing'),
'resolved': $t('feedback.completed')
'pending': t('feedback.pending'),
'in_progress': t('feedback.processing'),
'resolved': t('feedback.completed')
};
return statusMap[status] || $t('feedback.pending');
return statusMap[status] || t('feedback.pending');
};
// 获取状态样式类
@@ -231,8 +231,8 @@
// 获取类型文本
const getTypeText = (type) => {
const typeMap = {
'complain': $t('feedback.complain'),
'suggestion': $t('feedback.suggestion')
'complain': t('feedback.complain'),
'suggestion': t('feedback.suggestion')
};
return typeMap[type] || type || '-';
};