From 64c9d933b1937c0b0ab3549e668e357644e6a9fd Mon Sep 17 00:00:00 2001 From: ISFP_T <68358856@qq.com> Date: Fri, 28 Nov 2025 10:38:22 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E6=96=B0=E5=A2=9E=E6=8A=95=E8=AF=89?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E4=B8=8E=E6=8A=95=E8=AF=89=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/api/feedback.js | 35 +++ locale/en-US.js | 34 ++- locale/zh-CN.js | 34 ++- pages.json | 12 + pages/feedback/detail.vue | 574 ++++++++++++++++++++++++++++++++++++++ pages/feedback/index.vue | 80 +++++- pages/feedback/list.vue | 487 ++++++++++++++++++++++++++++++++ 7 files changed, 1245 insertions(+), 11 deletions(-) create mode 100644 pages/feedback/detail.vue create mode 100644 pages/feedback/list.vue diff --git a/config/api/feedback.js b/config/api/feedback.js index 931d417..0b89f8e 100644 --- a/config/api/feedback.js +++ b/config/api/feedback.js @@ -10,3 +10,38 @@ export const addUserFeedback = (data) => { }) } +// 获取投诉记录列表 +export const getFeedbackList = (params) => { + // GET请求需要将参数拼接到URL上 + let url = '/app/feedback/list'; + if (params) { + const queryString = Object.keys(params) + .map(key => `${encodeURIComponent(key)}=${encodeURIComponent(params[key])}`) + .join('&'); + if (queryString) { + url += `?${queryString}`; + } + } + return request({ + url: url, + method: 'get', + }) +} + +// 获取投诉详情 +export const getFeedbackDetail = (id) => { + return request({ + url: `/app/feedback/${id}`, + method: 'get', + }) +} + +// 提交投诉回复 +export const submitFeedbackReply = (data) => { + return request({ + url: '/app/feedback/reply', + method: 'post', + data, + }) +} + diff --git a/locale/en-US.js b/locale/en-US.js index a32e62d..7f9ae93 100644 --- a/locale/en-US.js +++ b/locale/en-US.js @@ -50,7 +50,8 @@ export default { operationFailed: 'Operation failed', refresh: 'Refresh', pull: 'Pull to refresh', - release: 'Release to refresh' + release: 'Release to refresh', + noMore: 'No more' }, nav: { @@ -267,7 +268,8 @@ export default { avatarDownloadFailed: 'Download failed', notLoggedIn: 'Not logged in', phoneNotBound: 'No phone', - balanceDesc: 'Available for rental' + balanceDesc: 'Available for rental', + feedbackRecord: 'Feedback Records' }, auth: { @@ -352,7 +354,33 @@ export default { deviceFault: 'Device Fault', chargingIssue: 'Charging', usageSuggestion: 'Suggestion', - other: 'Other' + other: 'Other', + recordList: 'Feedback Records', + detail: 'Feedback Detail', + noRecord: 'No feedback records', + getListFailed: 'Failed to get list', + getDetailFailed: 'Failed to get detail', + processing: 'Processing', + completed: 'Completed', + pending: 'Pending', + complain: 'Complain', + suggestion: 'Suggestion', + contactPhone: 'Contact Phone', + initialSubmit: 'Initial Submit', + submitTime: 'Submit Time', + uploadedImages: 'Uploaded Images', + platformReplies: 'Platform Replies', + userReplies: 'User Replies', + platform: 'Platform', + me: 'Me', + replyPlaceholder: 'Enter your reply...', + submitReply: 'Submit Reply', + replySuccess: 'Reply successful', + replyFailed: 'Reply failed', + pleaseEnterReply: 'Please enter reply content', + idRequired: 'Feedback ID is required', + viewRecords: 'View Records', + replyHistory: 'Reply History' }, help: { diff --git a/locale/zh-CN.js b/locale/zh-CN.js index cb2c09c..0838d20 100644 --- a/locale/zh-CN.js +++ b/locale/zh-CN.js @@ -50,7 +50,8 @@ export default { operationFailed: '操作失败', refresh: '刷新', pull: '下拉刷新', - release: '释放刷新' + release: '释放刷新', + noMore: '没有更多了' }, nav: { @@ -267,7 +268,8 @@ export default { avatarDownloadFailed: '头像下载失败', notLoggedIn: '未登录', phoneNotBound: '未绑定手机号', - balanceDesc: '可用于租借设备' + balanceDesc: '可用于租借设备', + feedbackRecord: '投诉记录' }, auth: { @@ -352,7 +354,33 @@ export default { deviceFault: '设备故障', chargingIssue: '收费问题', usageSuggestion: '使用建议', - other: '其他' + other: '其他', + recordList: '投诉记录', + detail: '投诉详情', + noRecord: '暂无投诉记录', + getListFailed: '获取列表失败', + getDetailFailed: '获取详情失败', + processing: '处理中', + completed: '已完成', + pending: '待处理', + complain: '投诉', + suggestion: '建议', + contactPhone: '联系电话', + initialSubmit: '首次提交', + submitTime: '提交时间', + uploadedImages: '上传图片', + platformReplies: '平台回复', + userReplies: '用户回复', + platform: '平台客服', + me: '我', + replyPlaceholder: '请输入您的回复...', + submitReply: '提交回复', + replySuccess: '回复成功', + replyFailed: '回复失败', + pleaseEnterReply: '请输入回复内容', + idRequired: '投诉ID不能为空', + viewRecords: '查看记录', + replyHistory: '回复记录' }, help: { diff --git a/pages.json b/pages.json index 80a26be..b5700e1 100644 --- a/pages.json +++ b/pages.json @@ -129,6 +129,18 @@ "navigationBarTitleText": "" } }, + { + "path": "pages/feedback/list", + "style": { + "navigationBarTitleText": "" + } + }, + { + "path": "pages/feedback/detail", + "style": { + "navigationBarTitleText": "" + } + }, { "path": "pages/help/index", "style": { diff --git a/pages/feedback/detail.vue b/pages/feedback/detail.vue new file mode 100644 index 0000000..6248f88 --- /dev/null +++ b/pages/feedback/detail.vue @@ -0,0 +1,574 @@ + + + + + diff --git a/pages/feedback/index.vue b/pages/feedback/index.vue index dd5e521..1762f5d 100644 --- a/pages/feedback/index.vue +++ b/pages/feedback/index.vue @@ -1,5 +1,17 @@