hookehuyr

fix: 修复银行账号在接口传输和存储时的类型转换问题

...@@ -494,7 +494,7 @@ const getUserInfo = async () => { ...@@ -494,7 +494,7 @@ const getUserInfo = async () => {
494 if (userInfo.bank_id && userInfo.bank_no) { 494 if (userInfo.bank_id && userInfo.bank_no) {
495 accountInfo.value = { 495 accountInfo.value = {
496 bankName: userInfo.bank_id, // 存储银行ID 496 bankName: userInfo.bank_id, // 存储银行ID
497 - bankAccount: userInfo.bank_no, 497 + bankAccount: Number(userInfo.bank_no), // 从接口获取后转换为数字
498 bankImg: userInfo.bank_img || '' // 存储银行卡图片 498 bankImg: userInfo.bank_img || '' // 存储银行卡图片
499 }; 499 };
500 } 500 }
...@@ -640,7 +640,7 @@ const saveAccountInfo = async () => { ...@@ -640,7 +640,7 @@ const saveAccountInfo = async () => {
640 // 调用API保存收款账号信息 640 // 调用API保存收款账号信息
641 const result = await updateProfileAPI({ 641 const result = await updateProfileAPI({
642 bank_id: tempAccountInfo.value.bankName, // 发送银行ID 642 bank_id: tempAccountInfo.value.bankName, // 发送银行ID
643 - bank_no: tempAccountInfo.value.bankAccount, 643 + bank_no: String(tempAccountInfo.value.bankAccount), // 转换为字符串传给接口
644 bank_img: tempAccountInfo.value.bankImg // 发送银行卡图片 644 bank_img: tempAccountInfo.value.bankImg // 发送银行卡图片
645 }); 645 });
646 646
...@@ -650,7 +650,7 @@ const saveAccountInfo = async () => { ...@@ -650,7 +650,7 @@ const saveAccountInfo = async () => {
650 // 更新全局用户状态 650 // 更新全局用户状态
651 userStore.updateUserInfo({ 651 userStore.updateUserInfo({
652 bank_id: tempAccountInfo.value.bankName, // 存储银行ID 652 bank_id: tempAccountInfo.value.bankName, // 存储银行ID
653 - bank_no: tempAccountInfo.value.bankAccount, 653 + bank_no: tempAccountInfo.value.bankAccount, // 保持数字类型存储到全局状态
654 bank_img: tempAccountInfo.value.bankImg // 存储银行卡图片 654 bank_img: tempAccountInfo.value.bankImg // 存储银行卡图片
655 }); 655 });
656 656
......