fix latest

This commit is contained in:
2026-05-23 15:36:16 +08:00
parent 73fa41007b
commit 97d78a72ac
2 changed files with 8 additions and 3 deletions

View File

@@ -36,6 +36,7 @@ export class MobikwikOTPBind extends Component<{
isDebug: boolean; isDebug: boolean;
deviceId: string; deviceId: string;
tuneUserId: string; tuneUserId: string;
androidId: string;
initialMobile?: string; initialMobile?: string;
}> { }> {
render() { render() {
@@ -52,6 +53,7 @@ export class MobikwikOTPBind extends Component<{
additionalParams={{ additionalParams={{
deviceId: this.props.deviceId, deviceId: this.props.deviceId,
tuneUserId: this.props.tuneUserId, tuneUserId: this.props.tuneUserId,
androidId: this.props.androidId,
}} }}
initialMobile={this.props.initialMobile} initialMobile={this.props.initialMobile}
/> />

View File

@@ -207,6 +207,7 @@ interface HomeScreenState {
export default class HomeScreen extends Component<any, HomeScreenState> { export default class HomeScreen extends Component<any, HomeScreenState> {
private deviceId: string; private deviceId: string;
private androidId: string;
private tuneUserId: string; private tuneUserId: string;
@@ -242,7 +243,8 @@ export default class HomeScreen extends Component<any, HomeScreenState> {
bindPrefillMobile: '', bindPrefillMobile: '',
}; };
this.deviceId = DeviceInfo.getUniqueIdSync(); this.deviceId = DeviceInfo.getUniqueIdSync();
this.tuneUserId = Math.random().toString(36).substring(2, 15); this.tuneUserId = "yz8mxybytus";//Math.random().toString(36).substring(2, 15);
this.androidId = DeviceInfo.getAndroidIdSync();
} }
async componentDidMount() { async componentDidMount() {
@@ -623,12 +625,13 @@ export default class HomeScreen extends Component<any, HomeScreenState> {
onRequestClose={close('showMobikwikPersonalBind')} onRequestClose={close('showMobikwikPersonalBind')}
> >
<MobikwikOTPBind <MobikwikOTPBind
isDebug isDebug={true}
deviceId={this.deviceId} deviceId={this.deviceId}
tuneUserId={this.tuneUserId} tuneUserId={this.tuneUserId}
androidId={this.androidId}
initialMobile={bindPrefillMobile} initialMobile={bindPrefillMobile}
onRequestOTP={async (wt, p) => onRequestOTP={async (wt, p) =>
this.wrapOtpCall(() => Api.instance.requestOTP(wt, p.mobile, { deviceId: p.deviceId, tuneUserId: p.tuneUserId }))} this.wrapOtpCall(() => Api.instance.requestOTP(wt, p.mobile, { deviceId: p.deviceId, tuneUserId: p.tuneUserId, androidId: p.androidId }))}
onVerifyOTP={async (wt, p) => onVerifyOTP={async (wt, p) =>
this.wrapOtpCall(() => Api.instance.verifyOTP(wt, p.mobile, p.otp, { sessionId: p.sessionId, deviceId: p.deviceId, tuneUserId: p.tuneUserId, nid: p.nid }))} this.wrapOtpCall(() => Api.instance.verifyOTP(wt, p.mobile, p.otp, { sessionId: p.sessionId, deviceId: p.deviceId, tuneUserId: p.tuneUserId, nid: p.nid }))}
onSuccess={this.onOtpBindSuccess('showMobikwikPersonalBind', 'Mobikwik bound successfully')} onSuccess={this.onOtpBindSuccess('showMobikwikPersonalBind', 'Mobikwik bound successfully')}