message-verify 1.0.0-beta.1 → 1.0.0-beta.2

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.
@@ -50,8 +50,8 @@ const CreateMessageVerifyModal = ({ props }) => {
50
50
  const formData = new FormData();
51
51
  formData.append('captchaKey', captchaKey);
52
52
  formData.append('captcha', captchCode);
53
- const res = await Api.reSendCode(formData);
54
- console.log('handleResend=>res', res);
53
+ // 重新发送验证码
54
+ await Api.reSendCode(formData);
55
55
  message.success(t('sendSuccess', lang));
56
56
  };
57
57
  return (_jsxs(Modal, { width: 420, visible: visible, onClose: () => {
@@ -60,13 +60,13 @@ const CreateMessageVerifyModal = ({ props }) => {
60
60
  }, 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: (val) => {
61
61
  setOtp(val);
62
62
  if (val.length === 6) {
63
- console.log('otp', val);
64
63
  http({
65
64
  ...config,
66
65
  headers: {
67
66
  ...http.defaults.headers.common,
68
67
  'sms-code': val,
69
68
  'sms-code-key': verifyCodeKey,
69
+ 'Content-Type': 'application/json',
70
70
  }
71
71
  });
72
72
  setVisible(false);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "message-verify",
3
- "version": "1.0.0-beta.1",
3
+ "version": "1.0.0-beta.2",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "dependencies": {
@@ -67,8 +67,8 @@ const CreateMessageVerifyModal = ({ props }: { props: ModalConfig }) => {
67
67
  const formData = new FormData();
68
68
  formData.append('captchaKey', captchaKey);
69
69
  formData.append('captcha', captchCode);
70
- const res = await Api.reSendCode(formData);
71
- console.log('handleResend=>res', res);
70
+ // 重新发送验证码
71
+ await Api.reSendCode(formData);
72
72
  message.success(t('sendSuccess', lang));
73
73
  }
74
74
 
@@ -90,13 +90,13 @@ const CreateMessageVerifyModal = ({ props }: { props: ModalConfig }) => {
90
90
  onChange={(val) => {
91
91
  setOtp(val);
92
92
  if (val.length === 6) {
93
- console.log('otp', val);
94
93
  http({
95
94
  ...config,
96
95
  headers: {
97
96
  ...http.defaults.headers.common,
98
97
  'sms-code': val,
99
98
  'sms-code-key': verifyCodeKey,
99
+ 'Content-Type': 'application/json',
100
100
  }
101
101
  });
102
102
  setVisible(false);