From 0130ad939d0cf95d9b794e3fb4c2bc2e5e60e01b Mon Sep 17 00:00:00 2001 From: BAKEYi <16298417+bakeyi@user.noreply.gitee.com> Date: Thu, 30 Apr 2026 14:56:42 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A9=B3=E5=9B=9E=E5=8E=9F=E5=9B=A0=E6=98=BE?= =?UTF-8?q?=E7=A4=BAbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/ruzhu/submitres.vue | 43 +++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/pages/ruzhu/submitres.vue b/pages/ruzhu/submitres.vue index 3e1ec69..6ea3b4e 100644 --- a/pages/ruzhu/submitres.vue +++ b/pages/ruzhu/submitres.vue @@ -135,31 +135,30 @@ export default { return; } - // 重新确定 type 值 - let type; - if (this.identity == 1) { - type = 2; // 手艺人 - } else if (this.identity == 2) { - type = 3; // 商家 - } else { - console.error('未知的用户类型identity:', this.identity); - this.backMag = '用户类型错误,请联系客服'; - return; - } - - console.log('请求参数 type:', type); - - request.post('/user/getuser', {type}).then(result => { - console.log('接口返回数据:', result); - if (result.data && result.data.back_text) { - this.backMag = result.data.back_text; - console.log('设置backMag为:', this.backMag); + request.post('/sj/userSjAuth/details', { + type: this.identity // 1=手艺人,2=商家 + }).then(result => { + console.log('申请详情接口返回数据:', result); + if (result.code === 200) { + if (result.data) { + if (result.data.back_text) { + this.backMag = result.data.back_text; + console.log('设置backMag为:', this.backMag); + } else { + this.backMag = '未知原因,请联系客服'; + console.log('接口返回无back_text字段'); + } + } else { + // 接口返回成功但数据为空,可能没有申请记录 + console.log('接口返回成功但data为空'); + this.backMag = '暂无驳回原因信息'; + } } else { - this.backMag = '未知原因,请联系客服'; - console.log('接口返回无back_text字段'); + this.backMag = '获取驳回原因失败,请联系客服'; + console.log('接口返回错误:', result?.msg || '未知错误'); } }).catch(err => { - console.error('获取用户信息失败:', err); + console.error('获取申请详情失败:', err); this.backMag = '获取驳回原因失败,请联系客服'; }).finally(() => { console.log('getUserInfo执行完成');