message-verify 0.0.23-beta.0 → 0.0.24-beta.0

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.
package/dist/index.js CHANGED
@@ -1,10 +1,7 @@
1
1
  import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { useEffect, useState } from 'react';
3
- // import Modal from './components/modal'
4
- // import Input from './components/input'
5
3
  import { Input, Button, Modal } from 'antd';
6
- import Api from './resource';
7
- import { getEnvironmentFingerprint } from './utils';
4
+ import Api from './resource.js';
8
5
  const App = ({ data }) => {
9
6
  const { mobile } = data || {};
10
7
  const [countdown, setCountdown] = useState(60);
@@ -26,7 +23,6 @@ const App = ({ data }) => {
26
23
  // };
27
24
  useEffect(() => {
28
25
  setVisible(true);
29
- getEnvironmentFingerprint();
30
26
  }, []);
31
27
  useEffect(() => {
32
28
  let timer = null;
@@ -47,8 +43,6 @@ const App = ({ data }) => {
47
43
  setCountdown(60);
48
44
  // retryModal()
49
45
  };
50
- return (_jsx(_Fragment, { children: _jsxs(Modal, { open: visible, onClose: () => setVisible(false),
51
- // cancelButtonProps={false}
52
- okText: '提交', cancelText: false, children: [_jsxs("div", { children: ["\u5DF2\u53D1\u9001\u77ED\u4FE1\u81F3\u60A8\u7684\u624B\u673A\uFF1A", mobile] }), _jsxs("div", { style: { marginTop: 8, display: 'flex', alignItems: 'center', width: 300 }, children: [_jsx(Input, { disabled: countdown > 0 }), _jsx("img", { src: captchaImage, alt: "\u9A8C\u8BC1\u7801", style: { width: 100, height: 30, marginLeft: 8 }, onClick: getKey })] }), _jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: 8, marginTop: 8 }, children: [_jsx(Input.OTP, { length: 6, onChange: (val) => { console.log('change', val); } }), _jsx(Button, { disabled: countdown > 0, onClick: handleResend, style: countdown > 0 ? { marginLeft: 8 } : { marginLeft: 8, backgroundColor: '#1677ff', color: '#fff' }, children: countdown > 0 ? `${countdown}秒` : '重新发送' })] })] }) }));
46
+ return (_jsx(_Fragment, { children: _jsxs(Modal, { open: visible, onClose: () => setVisible(false), okText: '提交', cancelText: false, children: [_jsxs("div", { children: ["\u5DF2\u53D1\u9001\u77ED\u4FE1\u81F3\u60A8\u7684\u624B\u673A\uFF1A", mobile] }), _jsxs("div", { style: { marginTop: 8, display: 'flex', alignItems: 'center', width: 300 }, children: [_jsx(Input, { disabled: countdown > 0 }), _jsx("img", { src: captchaImage, alt: "\u9A8C\u8BC1\u7801", style: { width: 100, height: 30, marginLeft: 8 }, onClick: getKey })] }), _jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: 8, marginTop: 8 }, children: [_jsx(Input.OTP, { length: 6, onChange: (val) => { console.log('change', val); } }), _jsx(Button, { disabled: countdown > 0, onClick: handleResend, style: countdown > 0 ? { marginLeft: 8 } : { marginLeft: 8, backgroundColor: '#1677ff', color: '#fff' }, children: countdown > 0 ? `${countdown}秒` : '重新发送' })] })] }) }));
53
47
  };
54
48
  export default App;
package/dist/main.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { createRoot } from 'react-dom/client';
3
- import App from './index'; // 或 './index'
3
+ import App from './index.js'; // 或 './index'
4
4
  createRoot(document.getElementById('root')).render(_jsx(App, { data: {
5
5
  mobile: '185****7760',
6
6
  verifyCodeKey: 'e381c5f9-c7f4-4bf1-a948-744334fb0203',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "message-verify",
3
- "version": "0.0.23-beta.0",
3
+ "version": "0.0.24-beta.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "dependencies": {
package/src/index.tsx CHANGED
@@ -1,19 +1,6 @@
1
1
  import { useEffect, useState } from 'react'
2
- // import Modal from './components/modal'
3
- // import Input from './components/input'
4
2
  import { Input, Button, Modal } from 'antd';
5
- import Api from './resource'
6
- import { getEnvironmentFingerprint } from './utils'
7
- // import Button from './components/button'
8
-
9
- // const buttonStyle: React.CSSProperties = {
10
- // padding: '8px 16px',
11
- // border: 'none',
12
- // borderRadius: 4,
13
- // fontSize: 14,
14
- // cursor: 'pointer',
15
- // };
16
-
3
+ import Api from './resource.js'
17
4
  interface Props {
18
5
  data: {
19
6
  mobile: string;
@@ -48,7 +35,6 @@ const App: React.FC<Props> = ({ data }) => {
48
35
 
49
36
  useEffect(() => {
50
37
  setVisible(true);
51
- getEnvironmentFingerprint();
52
38
  }, [])
53
39
 
54
40
  useEffect(() => {
@@ -76,10 +62,8 @@ const App: React.FC<Props> = ({ data }) => {
76
62
  <Modal
77
63
  open={visible}
78
64
  onClose={() => setVisible(false)}
79
- // cancelButtonProps={false}
80
65
  okText={'提交'}
81
66
  cancelText={false}
82
- // onOk={() => refresh()}
83
67
  >
84
68
  <div>已发送短信至您的手机:{mobile}</div>
85
69
  <div style={{ marginTop: 8, display: 'flex', alignItems: 'center', width: 300 }}>
@@ -87,7 +71,6 @@ const App: React.FC<Props> = ({ data }) => {
87
71
  <img src={captchaImage} alt="验证码" style={{ width: 100, height: 30, marginLeft: 8 }} onClick={getKey} />
88
72
  </div>
89
73
  <div style={{ display: 'flex', alignItems: 'center', gap: 8, marginTop: 8 }}>
90
- {/* <Input placeholder="请输入验证码" onChange={(val) => {console.log('change', val)}} /> */}
91
74
  <Input.OTP length={6} onChange={(val) => {console.log('change', val)}} />
92
75
  <Button
93
76
  disabled={countdown > 0}
package/src/main.tsx CHANGED
@@ -1,5 +1,5 @@
1
1
  import { createRoot } from 'react-dom/client';
2
- import App from './index'; // 或 './index'
2
+ import App from './index.js'; // 或 './index'
3
3
 
4
4
  createRoot(document.getElementById('root')!).render(
5
5
  <App