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

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/.arcconfig CHANGED
@@ -1,4 +1,5 @@
1
1
  {
2
+ "project.name": "message-verify",
2
3
  "phabricator.uri": "https://code.yangqianguan.com/",
3
4
  "lint.engine": "YqgWebDiffLintEngine"
4
5
  }
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  import { VerifyModalConfig, LoginModalConfig } from './utils/type.js';
2
2
  export declare const initFingerprint: () => Promise<string>;
3
3
  export declare const createReLoginModal: (modalProps: LoginModalConfig) => void;
4
- export declare const VerifyHandler: ({ data, config, http, verifyPromise, sendApi }: VerifyModalConfig) => Promise<any>;
4
+ export declare const VerifyHandler: ({ data, config, http, verifyPromise, sendApi, response }: VerifyModalConfig) => Promise<any>;
package/dist/index.js CHANGED
@@ -54,7 +54,8 @@ export const createReLoginModal = (modalProps) => {
54
54
  const reLoginModalId = 'relogin-modal-container';
55
55
  creatModal(modalProps, reLoginModalId, ReLoginModal);
56
56
  };
57
- export const VerifyHandler = ({ data, config, http, verifyPromise, sendApi }) => {
57
+ export const VerifyHandler = ({ data, config, http, verifyPromise, sendApi, response }) => {
58
+ console.log('VerifyHandler =>', response);
58
59
  const toEmpty = () => {
59
60
  verifyPromise.current = null;
60
61
  };
package/dist/main.js CHANGED
@@ -38,7 +38,7 @@ const config = {
38
38
  };
39
39
  const promise = { current: null };
40
40
  createRoot(document.getElementById('root')).render(_jsxs(_Fragment, { children: [_jsx("button", { onClick: () => {
41
- return VerifyHandler({ data, config, http: axios, verifyPromise: promise });
41
+ return VerifyHandler({ data, config, http: axios, verifyPromise: promise, response: {} });
42
42
  }, children: "Show verify Modal" }), _jsx("button", { onClick: () => createReLoginModal({
43
43
  goLogin: () => {
44
44
  console.log('goLogin');
@@ -93,7 +93,7 @@ const CreateMessageVerifyModal = ({ props }) => {
93
93
  })
94
94
  ]);
95
95
  if (res?.data?.status?.code === 0) {
96
- apiResolve(res);
96
+ // apiResolve(res);
97
97
  setVisible(false);
98
98
  }
99
99
  else {
@@ -25,6 +25,7 @@ export type VerifyModalConfig = {
25
25
  verifyPromise: {
26
26
  current: Promise<any> | null;
27
27
  };
28
+ response: any;
28
29
  };
29
30
  export type LoginModalConfig = {
30
31
  goLogin: () => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "message-verify",
3
- "version": "1.0.1-beta.55",
3
+ "version": "1.0.1-beta.57",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "dependencies": {
package/src/index.tsx CHANGED
@@ -64,7 +64,8 @@ export const createReLoginModal = (modalProps: LoginModalConfig) => {
64
64
  creatModal(modalProps, reLoginModalId, ReLoginModal);
65
65
  }
66
66
 
67
- export const VerifyHandler = ({data, config, http, verifyPromise, sendApi}: VerifyModalConfig): Promise<any> => {
67
+ export const VerifyHandler = ({data, config, http, verifyPromise, sendApi, response}: VerifyModalConfig): Promise<any> => {
68
+ console.log('VerifyHandler =>', response);
68
69
  const toEmpty = () => {
69
70
  verifyPromise.current = null;
70
71
  };
package/src/main.tsx CHANGED
@@ -43,7 +43,7 @@ const promise = {current: null};
43
43
  createRoot(document.getElementById('root')!).render(
44
44
  <>
45
45
  <button onClick={() => {
46
- return VerifyHandler({data, config, http: axios, verifyPromise: promise});
46
+ return VerifyHandler({data, config, http: axios, verifyPromise: promise, response: {}});
47
47
  }}>
48
48
  Show verify Modal
49
49
  </button>
@@ -109,7 +109,7 @@ const CreateMessageVerifyModal = ({ props }: { props: VerifyModalConfig }) => {
109
109
  })
110
110
  ]) as any;
111
111
  if (res?.data?.status?.code === 0) {
112
- apiResolve(res);
112
+ // apiResolve(res);
113
113
  setVisible(false);
114
114
  } else {
115
115
  message.error(t('verifyFail', lang));
package/src/utils/type.ts CHANGED
@@ -24,6 +24,7 @@ export type VerifyModalConfig = {
24
24
  apiResolve?: any;
25
25
  apiPromiseToEmpty?: () => void;
26
26
  verifyPromise: {current: Promise<any> | null}
27
+ response: any;
27
28
  }
28
29
 
29
30
  export type LoginModalConfig = {