From 10de4ac53a1dc9d6f5bccb8b8e38cf7fb62257eb Mon Sep 17 00:00:00 2001 From: gongfuxiang Date: Sat, 10 Jan 2026 22:37:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=95=E8=AF=89=E4=B8=BE=E6=8A=A5=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- locale/en.json | 2 ++ locale/zh.json | 2 ++ pages/plugins/complaint/form/form.vue | 41 +++++++++++++++++++++++++-- pages/plugins/complaint/user/user.vue | 3 +- 4 files changed, 44 insertions(+), 4 deletions(-) diff --git a/locale/en.json b/locale/en.json index d4c7e051..1d2dcef5 100644 --- a/locale/en.json +++ b/locale/en.json @@ -1993,6 +1993,8 @@ }, "complaint-form": { "complaint-form": { + "23rdfg": "Complaint/Report Type", + "5434rd": "Please select the type of complaint/report", "78iudg": "proof image", "56ys33": "Please upload complete and clear images, up to a maximum of 10", "ssdff4": "My submission record" diff --git a/locale/zh.json b/locale/zh.json index e0660a32..03bef785 100644 --- a/locale/zh.json +++ b/locale/zh.json @@ -1977,6 +1977,8 @@ }, "complaint-form": { "complaint-form": { + "23rdfg": "投诉/举报类型", + "5434rd": "请选择投诉/举报类型", "78iudg": "证明图片", "56ys33": "请上传完整清晰的图片,最多10张", "ssdff4": "我的提交记录" diff --git a/pages/plugins/complaint/form/form.vue b/pages/plugins/complaint/form/form.vue index 4ab6caaa..05fde4ee 100644 --- a/pages/plugins/complaint/form/form.vue +++ b/pages/plugins/complaint/form/form.vue @@ -21,6 +21,17 @@ {{data.data_title}} + + {{$t('complaint-form.complaint-form.23rdfg')}}* + + + + {{$t('complaint-form.complaint-form.5434rd')}} + {{ complaint_type_list[complaint_type_index] }} + + + + {{$t('user-orderaftersale-detail.user-orderaftersale-detail.87tuff')}}* @@ -69,6 +80,8 @@ user: null, data: {}, business: null, + complaint_type_index: null, + complaint_type_list: [], editor_path_type: '', form_submit_loading: false, is_complaint_app_login: false, @@ -141,10 +154,21 @@ success: (res) => { uni.stopPullDownRefresh(); if (res.data.code == 0) { + var data = res.data.data; + var complaint_type_list = data.complaint_type_list || []; + var complaint_type_index = null; + if((data.data || null) != null && (data.data.complaint_type || null) != null && complaint_type_list.length > 0) { + var temp_index = complaint_type_list.indexOf(data.data.complaint_type); + if(temp_index != -1) { + complaint_type_index = temp_index; + } + } this.setData({ - data: res.data.data.data || {}, - business: res.data.data.business || null, - editor_path_type: res.data.data.editor_path_type, + data: data.data || {}, + business: data.business || null, + complaint_type_list: complaint_type_list, + complaint_type_index: complaint_type_index, + editor_path_type: data.editor_path_type, data_list_loding_status: 3, }); } else { @@ -165,6 +189,13 @@ }, }); }, + + // 投诉/举报类型事件 + complaint_type_event(e) { + this.setData({ + complaint_type_index: e.detail.value || 0, + }); + }, // 上传回调 retrun_image_event(res) { @@ -188,7 +219,11 @@ var validation = [ { fields: 'describe', msg: this.$t('user-orderaftersale-detail.user-orderaftersale-detail.6uygft') }, ]; + if(this.complaint_type_list.length > 0) { + validation.push({ fields: 'complaint_type', msg: this.$t('complaint-form.complaint-form.5434rd') }); + } var form_data = this.data; + form_data['complaint_type'] = (this.complaint_type_index === null || this.complaint_type_list.length == 0) ? '' : (this.complaint_type_list[this.complaint_type_index] || ''); form_data['describe'] = e.detail.value.describe; if (app.globalData.fields_check(form_data, validation)) { if((this.business || null) != null) { diff --git a/pages/plugins/complaint/user/user.vue b/pages/plugins/complaint/user/user.vue index 7f637f21..18b7377b 100644 --- a/pages/plugins/complaint/user/user.vue +++ b/pages/plugins/complaint/user/user.vue @@ -72,7 +72,8 @@ data_list_loding_msg: '', data_bottom_line_status: false, data_is_loading: 0, - bottom_fixed_style: '', + bottom_fixed_style: '', + nav_status_list: [], params: {}, field_list: [], is_complaint_app: false,