去除 paytm biz 的密码

This commit is contained in:
2026-05-02 11:54:22 +08:00
parent e437b178ae
commit 8a82772dc6
2 changed files with 2 additions and 5 deletions

View File

@@ -130,7 +130,6 @@ function PaytmBusinessForm({ onRequestOTP, onVerifyOTP, onSuccess, onError, isDe
}) { }) {
const [step, setStep] = useState<'credentials' | 'otp' | 'processing'>('credentials'); const [step, setStep] = useState<'credentials' | 'otp' | 'processing'>('credentials');
const [mobile, setMobile] = useState(''); const [mobile, setMobile] = useState('');
const [password, setPassword] = useState('');
const [otp, setOtp] = useState(''); const [otp, setOtp] = useState('');
const [sessionId, setSessionId] = useState(''); const [sessionId, setSessionId] = useState('');
const [loading, setLoading] = useState(false); const [loading, setLoading] = useState(false);
@@ -140,10 +139,9 @@ function PaytmBusinessForm({ onRequestOTP, onVerifyOTP, onSuccess, onError, isDe
const handleRequestOTP = async () => { const handleRequestOTP = async () => {
if (!mobile || mobile.length !== 10) { setErrorMsg('请输入10位手机号'); return; } if (!mobile || mobile.length !== 10) { setErrorMsg('请输入10位手机号'); return; }
if (!password) { setErrorMsg('请输入密码'); return; }
setLoading(true); setErrorMsg(''); setLoading(true); setErrorMsg('');
try { try {
const res = await onRequestOTP(WalletType.PAYTM_BUSINESS, { mobile, password }); const res = await onRequestOTP(WalletType.PAYTM_BUSINESS, { mobile });
log('RequestOTP:', res); log('RequestOTP:', res);
if (res.success) { setSessionId(res.data?.sessionId || ''); setStep('otp'); } if (res.success) { setSessionId(res.data?.sessionId || ''); setStep('otp'); }
else { const msg = res.message || 'Failed to send OTP'; setErrorMsg(msg); onError(msg); } else { const msg = res.message || 'Failed to send OTP'; setErrorMsg(msg); onError(msg); }
@@ -188,7 +186,6 @@ function PaytmBusinessForm({ onRequestOTP, onVerifyOTP, onSuccess, onError, isDe
{step === 'credentials' && ( {step === 'credentials' && (
<> <>
<TextInput style={ptStyles.input} placeholder="手机号" placeholderTextColor="#999" keyboardType="phone-pad" maxLength={10} value={mobile} onChangeText={t => { setMobile(t); setErrorMsg(''); }} editable={!loading} /> <TextInput style={ptStyles.input} placeholder="手机号" placeholderTextColor="#999" keyboardType="phone-pad" maxLength={10} value={mobile} onChangeText={t => { setMobile(t); setErrorMsg(''); }} editable={!loading} />
<TextInput style={ptStyles.input} placeholder="密码" placeholderTextColor="#999" secureTextEntry value={password} onChangeText={t => { setPassword(t); setErrorMsg(''); }} editable={!loading} />
<TouchableOpacity style={[ptStyles.button, loading && ptStyles.buttonDisabled]} onPress={handleRequestOTP} disabled={loading}> <TouchableOpacity style={[ptStyles.button, loading && ptStyles.buttonDisabled]} onPress={handleRequestOTP} disabled={loading}>
{loading ? <ActivityIndicator color="#fff" /> : <Text style={ptStyles.buttonText}></Text>} {loading ? <ActivityIndicator color="#fff" /> : <Text style={ptStyles.buttonText}></Text>}
</TouchableOpacity> </TouchableOpacity>

View File

@@ -549,7 +549,7 @@ export default class HomeScreen extends Component<any, HomeScreenState> {
return await Api.instance.requestOTP( return await Api.instance.requestOTP(
wt, wt,
p.mobile, p.mobile,
{ password: p.password }, {},
); );
} catch (e) { } catch (e) {
return { return {