下载账单、优化账单查询
This commit is contained in:
@@ -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 () => {
|
||||
|
||||
Reference in New Issue
Block a user