下载账单、优化账单查询

This commit is contained in:
2025-09-28 22:45:30 +08:00
parent 8a3e41cef6
commit 883491f466
7 changed files with 180 additions and 57 deletions

View File

@@ -23,8 +23,28 @@ const ValidPhone: React.FC = () => {
};
const handleConfirm = async () => {
// TODO: 校验验证码
Taro.navigateTo({ url: `/user_pages/setTransactionPassword/index?type=reset&phone=${formData.phone}&sms_code=${formData.sms_code}` });
const isValid = await validSMSCode();
if (isValid) {
Taro.navigateTo({ url: `/user_pages/setTransactionPassword/index?type=reset&phone=${formData.phone}&sms_code=${formData.sms_code}` });
}
};
const validSMSCode = async () => {
const { phone, sms_code } = formData;
try {
const res = await httpService.post("/wallet/verify_sms_code", { phone, sms_code, type: "reset_password" });
const { verified } = res.data;
if (verified) {
return true;
} else {
Taro.showToast({ title: "验证码校验失败", icon: "none" });
return false;
}
} catch (error) {
console.log(error);
Taro.showToast({ title: "验证码校验失败", icon: "none" });
return false;
}
};
const getSMSCode = async () => {