@brushes/component-core 1.1.5 → 2.0.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brushes/component-core",
3
- "version": "1.1.5",
3
+ "version": "2.0.0",
4
4
  "main": "src/index.ts",
5
5
  "license": "MIT",
6
6
  "scripts": {
@@ -4,7 +4,7 @@ import { useMountedRef } from '@brushes/form';
4
4
  import { get } from '@brushes/request';
5
5
  import { encryptBySM2 } from '../tool';
6
6
 
7
- export const CodeComponent = ({ api = '/web/ml/muser/sendPhone.json', codeKey, height = 36, encryption = false }: { codeKey?: string; api?: string; height?: number; encryption?: boolean }) => {
7
+ export const CodeComponent = ({ api = '/web/ml/muser/sendPhone.json', codeKey, height = 36, encryption = true }: { codeKey?: string; api?: string; height?: number; encryption?: boolean }) => {
8
8
  const form = Form.useFormInstance();
9
9
  const verCode = form.getFieldValue('verCode');
10
10
  const [dataTime, setDataTime] = useState(0);
@@ -35,7 +35,7 @@ export const encryptBySM2 = async (plainText: string): Promise<string> => {
35
35
  const publicKey = await getPublicKey();
36
36
  return `04${sm2.doEncrypt(String(plainText), publicKey, 1)}`;
37
37
  } catch (error) {
38
- message.error('SM2 密钥获取失败');
38
+ // message.error('SM2 密钥获取失败');
39
39
  return plainText;
40
40
  }
41
41
  };