diff --git a/pages/finance/aid/apply.vue b/pages/finance/aid/apply.vue index d32db6a..9cb3f63 100644 --- a/pages/finance/aid/apply.vue +++ b/pages/finance/aid/apply.vue @@ -588,6 +588,14 @@ // 处理用户个人信息 if (userProfileRes.code === 200 && userProfileRes.data) { // 可以获取用户相关信息 + // 获取用户签名 + const signature = userProfileRes.data.signature + if (signature) { + // 设置表单签名字段 + this.formData.xsqm = signature + // 构造完整的图片URL + this.signImg = this.baseUrl + signature + } } // 处理家庭成员信息 if (familyRes.code === 200 && familyRes.data && familyRes.data.length > 0) { diff --git a/pages/finance/knzzGl/apply.vue b/pages/finance/knzzGl/apply.vue index 517d6d8..d0b8c76 100644 --- a/pages/finance/knzzGl/apply.vue +++ b/pages/finance/knzzGl/apply.vue @@ -297,7 +297,8 @@ import { getOwnSign } from '@/api/workStudy/post'; import { getOwnKnrd, getOwnExtraInfo, getOwnInfo as getOwnStuInfo } from '@/api/finance/special'; import uploadFile from "@/plugins/upload.js" - import config from '@/config' +import { getUserProfile } from '@/api/system/user' +import config from '@/config' export default { data() { return { @@ -418,17 +419,17 @@ this.loading = true; try { // 并行请求所有基础信息 - const [signRes, knrdRes, stuInfoRes, extraInfoRes] = await Promise.all([ - getOwnSign(), + const [userProfileRes, knrdRes, stuInfoRes, extraInfoRes] = await Promise.all([ + getUserProfile(), getOwnKnrd(), getOwnStuInfo(), getOwnExtraInfo() ]); // 处理签名信息 - if (signRes && signRes.data) { - this.formData.applySign = signRes.data; - this.signImg = this.baseUrl + signRes.data; + if (userProfileRes && userProfileRes.code === 200 && userProfileRes.data && userProfileRes.data.signature) { + this.formData.applySign = userProfileRes.data.signature; + this.signImg = this.baseUrl + userProfileRes.data.signature; } // 处理困难认定信息 @@ -498,56 +499,56 @@ } // 处理额外信息 - if (extraInfoRes && extraInfoRes.data) { - const extraInfo = extraInfoRes.data; - console.log('额外信息:', extraInfo); - this.formData.familyNum = extraInfo.familyNum || this.formData.familyNum; - this.formData.monthMoney = extraInfo.monthMoney || this.formData.monthMoney; - this.formData.perMoney = extraInfo.perMoney || this.formData.perMoney; - this.formData.moneySrc = extraInfo.moneySrc || this.formData.moneySrc; - // 处理困难类型 - if (extraInfo.hardType) { - this.formData.hardType = extraInfo.hardType; - } else if (extraInfo.xsqmyj) { - // 处理xsqmyj字段,映射到困难类型 - switch (extraInfo.xsqmyj) { - case '1': - this.formData.hardType = '特别困难'; - break; - case '2': - this.formData.hardType = '比较困难'; - break; - case '3': - this.formData.hardType = '一般困难'; - break; - } - } - // 尝试从额外信息中获取民族和政治面貌 - if (extraInfo.mz) { - this.formData.mz = extraInfo.mz; - } - if (extraInfo.zzmm) { - this.formData.zzmm = extraInfo.zzmm; - } - // 处理家庭住址和邮政编码 - if (extraInfo.xjtdz) { - this.formData.homeAddr = extraInfo.xjtdz; - } else if (extraInfo.hkszd) { - this.formData.homeAddr = extraInfo.hkszd; - } else if (extraInfo.hksz1 && extraInfo.hksz2 && extraInfo.hksz3) { - this.formData.homeAddr = extraInfo.hksz1 + extraInfo.hksz2 + extraInfo.hksz3; - } - if (extraInfo.jtyzbm) { - this.formData.postCode = extraInfo.jtyzbm; - } else if (extraInfo.yzbm) { - this.formData.postCode = extraInfo.yzbm; - } - // 处理证件照 - if (extraInfo.whitePhoto) { - this.formData.pic = extraInfo.whitePhoto; - console.log('设置证件照:', this.formData.pic); - } + if (extraInfoRes && extraInfoRes.data) { + const extraInfo = extraInfoRes.data; + console.log('额外信息:', extraInfo); + this.formData.familyNum = extraInfo.familyNum || this.formData.familyNum; + this.formData.monthMoney = extraInfo.monthMoney || this.formData.monthMoney; + this.formData.perMoney = extraInfo.perMoney || this.formData.perMoney; + this.formData.moneySrc = extraInfo.moneySrc || this.formData.moneySrc; + // 处理困难类型 + if (extraInfo.hardType) { + this.formData.hardType = extraInfo.hardType; + } else if (extraInfo.xsqmyj) { + // 处理xsqmyj字段,映射到困难类型 + switch (extraInfo.xsqmyj) { + case '1': + this.formData.hardType = '特别困难'; + break; + case '2': + this.formData.hardType = '比较困难'; + break; + case '3': + this.formData.hardType = '一般困难'; + break; } + } + // 尝试从额外信息中获取民族和政治面貌 + if (extraInfo.mz) { + this.formData.mz = extraInfo.mz; + } + if (extraInfo.zzmm) { + this.formData.zzmm = extraInfo.zzmm; + } + // 处理家庭住址和邮政编码 + if (extraInfo.xjtdz) { + this.formData.homeAddr = extraInfo.xjtdz; + } else if (extraInfo.hkszd) { + this.formData.homeAddr = extraInfo.hkszd; + } else if (extraInfo.hksz1 && extraInfo.hksz2 && extraInfo.hksz3) { + this.formData.homeAddr = extraInfo.hksz1 + extraInfo.hksz2 + extraInfo.hksz3; + } + if (extraInfo.jtyzbm) { + this.formData.postCode = extraInfo.jtyzbm; + } else if (extraInfo.yzbm) { + this.formData.postCode = extraInfo.yzbm; + } + // 处理证件照 + if (extraInfo.whitePhoto) { + this.formData.pic = extraInfo.whitePhoto; + console.log('设置证件照:', this.formData.pic); + } + } // 如果有申请ID,获取申请详情 if (this.id) { diff --git a/pages/finance/knzzZsg/apply.vue b/pages/finance/knzzZsg/apply.vue index 941b3dc..d2e526a 100644 --- a/pages/finance/knzzZsg/apply.vue +++ b/pages/finance/knzzZsg/apply.vue @@ -316,6 +316,7 @@