message-verify 1.0.1-beta.53 → 1.0.1-beta.55

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,5 +11,6 @@ declare const _default: {
11
11
  alertContent: string;
12
12
  ok: string;
13
13
  chidoriOpenPro: string;
14
+ verifyFail: string;
14
15
  };
15
16
  export default _default;
@@ -10,5 +10,6 @@ export default {
10
10
  accountAlert: 'Account Security Alert',
11
11
  alertContent: 'Changes have been detected in your login environment or network information.To ensure account security, please log in again to verify your identity.',
12
12
  ok: 'OK',
13
- chidoriOpenPro: 'Chidori has activated security protection for you'
13
+ chidoriOpenPro: 'Chidori has activated security protection for you',
14
+ verifyFail: 'Validation failed'
14
15
  };
@@ -11,5 +11,6 @@ declare const _default: {
11
11
  alertContent: string;
12
12
  ok: string;
13
13
  chidoriOpenPro: string;
14
+ verifyFail: string;
14
15
  };
15
16
  export default _default;
@@ -10,5 +10,6 @@ export default {
10
10
  accountAlert: 'Peringatan Keamanan Akun',
11
11
  alertContent: 'Terdeteksi perubahan pada lingkungan login atau informasi jaringan Anda.Untuk menjaga keamanan akun, silakan login kembali untuk memverifikasi identitas Anda.',
12
12
  ok: 'Baiklah',
13
- chidoriOpenPro: 'chidori telah mengaktifkan keamanan untuk Anda'
13
+ chidoriOpenPro: 'chidori telah mengaktifkan keamanan untuk Anda',
14
+ verifyFail: 'Autentikasi gagal'
14
15
  };
@@ -11,5 +11,6 @@ declare const _default: {
11
11
  alertContent: string;
12
12
  ok: string;
13
13
  chidoriOpenPro: string;
14
+ verifyFail: string;
14
15
  };
15
16
  export default _default;
@@ -10,5 +10,6 @@ export default {
10
10
  accountAlert: '账号安全提醒',
11
11
  alertContent: '检测到您的登录环境或网络信息有变动,为保障账户安全,请重新登录验证身份',
12
12
  ok: '好的',
13
- chidoriOpenPro: 'chidori已为您开启安全防护'
13
+ chidoriOpenPro: 'chidori已为您开启安全防护',
14
+ verifyFail: '验证失败'
14
15
  };
@@ -68,15 +68,13 @@ const CreateMessageVerifyModal = ({ props }) => {
68
68
  onClose?.();
69
69
  }, children: [_jsx("div", { style: { fontSize: 14, color: '#666' }, children: t('alreadySend', lang, { phone: mobile }) }), _jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: 8, marginTop: 12 }, children: [_jsx(Input.OTP, { length: 6, value: otp, onChange: async (val) => {
70
70
  setOtp(val);
71
- console.log('val', val);
72
71
  if (val.length === 6) {
73
- console.log('val2===>');
74
72
  try {
75
73
  const res = await Promise.race([
76
74
  new Promise((resolve, reject) => {
77
75
  setTimeout(() => {
78
76
  reject(new Error('Timeout'));
79
- }, 1500);
77
+ }, 1000);
80
78
  }),
81
79
  new Promise((resolve, reject) => {
82
80
  http({
@@ -88,29 +86,24 @@ const CreateMessageVerifyModal = ({ props }) => {
88
86
  'Content-Type': config.headers['Content-Type'],
89
87
  }
90
88
  }).then(res => {
91
- console.log('res', res);
92
89
  resolve(res);
93
90
  }).catch(err => {
94
- console.log('err', err);
95
91
  reject(err);
96
92
  });
97
93
  })
98
94
  ]);
99
- console.log('res', res);
100
95
  if (res?.data?.status?.code === 0) {
101
- console.log('code', res?.data?.status?.code);
102
96
  apiResolve(res);
103
97
  setVisible(false);
104
98
  }
105
99
  else {
106
- console.log('验证失败');
107
- message.error('验证失败');
100
+ message.error(t('verifyFail', lang));
108
101
  setOtp('');
109
102
  }
110
103
  }
111
104
  catch (error) {
112
105
  console.warn('catch=>error', error);
113
- message.error('验证失败');
106
+ message.error(t('verifyFail', lang));
114
107
  setOtp('');
115
108
  }
116
109
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "message-verify",
3
- "version": "1.0.1-beta.53",
3
+ "version": "1.0.1-beta.55",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "dependencies": {
package/src/locales/en.ts CHANGED
@@ -10,5 +10,6 @@ export default {
10
10
  accountAlert: 'Account Security Alert',
11
11
  alertContent: 'Changes have been detected in your login environment or network information.To ensure account security, please log in again to verify your identity.',
12
12
  ok: 'OK',
13
- chidoriOpenPro: 'Chidori has activated security protection for you'
13
+ chidoriOpenPro: 'Chidori has activated security protection for you',
14
+ verifyFail: 'Validation failed'
14
15
  };
package/src/locales/id.ts CHANGED
@@ -10,5 +10,6 @@ export default {
10
10
  accountAlert: 'Peringatan Keamanan Akun',
11
11
  alertContent: 'Terdeteksi perubahan pada lingkungan login atau informasi jaringan Anda.Untuk menjaga keamanan akun, silakan login kembali untuk memverifikasi identitas Anda.',
12
12
  ok: 'Baiklah',
13
- chidoriOpenPro: 'chidori telah mengaktifkan keamanan untuk Anda'
13
+ chidoriOpenPro: 'chidori telah mengaktifkan keamanan untuk Anda',
14
+ verifyFail: 'Autentikasi gagal'
14
15
  };
package/src/locales/zh.ts CHANGED
@@ -10,5 +10,6 @@ export default {
10
10
  accountAlert: '账号安全提醒',
11
11
  alertContent: '检测到您的登录环境或网络信息有变动,为保障账户安全,请重新登录验证身份',
12
12
  ok: '好的',
13
- chidoriOpenPro: 'chidori已为您开启安全防护'
13
+ chidoriOpenPro: 'chidori已为您开启安全防护',
14
+ verifyFail: '验证失败'
14
15
  };
@@ -84,15 +84,13 @@ const CreateMessageVerifyModal = ({ props }: { props: VerifyModalConfig }) => {
84
84
  value={otp}
85
85
  onChange={async (val) => {
86
86
  setOtp(val);
87
- console.log('val', val);
88
87
  if (val.length === 6) {
89
- console.log('val2===>');
90
88
  try {
91
89
  const res = await Promise.race([
92
90
  new Promise((resolve, reject) => {
93
91
  setTimeout(() => {
94
92
  reject(new Error('Timeout'));
95
- }, 1500);
93
+ }, 1000);
96
94
  }),
97
95
  new Promise((resolve, reject) => {
98
96
  http({
@@ -104,27 +102,22 @@ const CreateMessageVerifyModal = ({ props }: { props: VerifyModalConfig }) => {
104
102
  'Content-Type': config.headers['Content-Type'],
105
103
  }
106
104
  }).then(res => {
107
- console.log('res', res);
108
105
  resolve(res);
109
106
  }).catch(err => {
110
- console.log('err', err);
111
107
  reject(err);
112
108
  })
113
109
  })
114
110
  ]) as any;
115
- console.log('res', res);
116
111
  if (res?.data?.status?.code === 0) {
117
- console.log('code', res?.data?.status?.code);
118
112
  apiResolve(res);
119
113
  setVisible(false);
120
114
  } else {
121
- console.log('验证失败');
122
- message.error('验证失败');
115
+ message.error(t('verifyFail', lang));
123
116
  setOtp('');
124
117
  }
125
118
  } catch (error) {
126
119
  console.warn('catch=>error', error);
127
- message.error('验证失败');
120
+ message.error(t('verifyFail', lang));
128
121
  setOtp('');
129
122
  }
130
123
  }