驳回原因显示bug
This commit is contained in:
parent
5bb78163b4
commit
0130ad939d
|
|
@ -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) {
|
||||
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('接口返回错误:', result?.msg || '未知错误');
|
||||
}
|
||||
}).catch(err => {
|
||||
console.error('获取用户信息失败:', err);
|
||||
console.error('获取申请详情失败:', err);
|
||||
this.backMag = '获取驳回原因失败,请联系客服';
|
||||
}).finally(() => {
|
||||
console.log('getUserInfo执行完成');
|
||||
|
|
|
|||
Loading…
Reference in New Issue