设置交易密码页面

This commit is contained in:
2025-09-27 00:22:04 +08:00
parent ca0013b37c
commit a1be43e02b
9 changed files with 361 additions and 27 deletions

View File

@@ -0,0 +1,44 @@
import React, { useState, useEffect } from "react";
import Taro from '@tarojs/taro';
import { View, Text, Input, Button } from "@tarojs/components";
import "./index.scss";
import httpService from "@/services/httpService";
interface FormFields {
phone?: string;
sms_code?: string;
}
const ValidPhone: React.FC = () => {
const [formData, setFormData] = useState<FormFields>({
phone: "",
sms_code: "",
});
const handleInput = (e: any, field: string) => {
setFormData({ ...formData, [field]: e.detail.value });
};
const handleConfirm = async () => {
// TODO: 校验验证码
Taro.navigateTo({ url: "/user_pages/setTransactionPassword/index?type=find" });
};
return (
<View className="set-transaction-password-page">
<View className="form-item">
<Text className="form-label"></Text>
<Input defaultValue={"15708469466"} type="number" disabled></Input>
</View>
<View className="form-item">
<Text className="form-label"></Text>
<Input placeholder="请输入验证码" type="number" onInput={(e) => { handleInput(e, "sms_code") }}></Input>
<Button className="btn" ></Button>
</View>
<Button className="btn bottom-btn" onClick={handleConfirm}></Button>
</View>
);
};
export default ValidPhone;