手写签名

这个提交包含在:
徐勤民 2024-08-30 19:03:07 +08:00
父节点 28a7d7feba
当前提交 9426372d09
共有 5 个文件被更改,包括 46 次插入6 次删除

查看文件

@ -1,5 +1,17 @@
/**
* Use these variables when you tailor your ArkTS code. They must be of the const type.
*/
export const HAR_VERSION = '1.0.1';
export const BUILD_MODE_NAME = 'debug';
export const DEBUG = true;
export const TARGET_NAME = 'default';
/**
* BuildProfile Class is used only for compatibility purposes.
*/
export default class BuildProfile { export default class BuildProfile {
static readonly HAR_VERSION = '1.0.1'; static readonly HAR_VERSION = HAR_VERSION;
static readonly BUILD_MODE_NAME = 'debug'; static readonly BUILD_MODE_NAME = BUILD_MODE_NAME;
static readonly DEBUG = true; static readonly DEBUG = DEBUG;
static readonly TARGET_NAME = TARGET_NAME;
} }

查看文件

@ -2,6 +2,7 @@
* 常用工具 * 常用工具
*/ */
export { ToolsHelper } from './src/main/ets/utils/ToolsHelper' export { ToolsHelper } from './src/main/ets/utils/ToolsHelper'
export { AlgorithmHelper } from './src/main/ets/utils/AlgorithmHelper'
/** /**
* 存储相关 * 存储相关

查看文件

@ -52,10 +52,20 @@ ToolsHelper.showMessage('Hello Word!')
```typescript ```typescript
import { ValidatorHelper } from '@szyx/sdk_base'; import { ValidatorHelper } from '@szyx/sdk_base';
ValidatorHelper.isPhone('13800000000') ValidatorHelper.isPhone('13800000000')
``` ```
### 1.5.[XWebHelper](./src/main/ets/utils/XWebHelper.ets) ### 1.5.[AlgorithmHelper](./src/main/ets/utils/AlgorithmHelper.ets)
> 计算相关
#### 1.5.1.验证手机号
```typescript
import { AlgorithmHelper } from '@szyx/sdk_base';
AlgorithmHelper.calculateDistance(x1, y1, x2, y2)
```
### 1.6.[XWebHelper](./src/main/ets/utils/XWebHelper.ets)
> 打开webview页面 > 打开webview页面
```typescript ```typescript

查看文件

@ -0,0 +1,18 @@
/**
* 计算相关工具类
*/
export class AlgorithmHelper {
/**
* 计算两点间距离
* @param x1
* @param y1
* @param x2
* @param y2
* @returns
*/
static calculateDistance(x1: number, y1: number, x2: number, y2: number): number {
const dx = x2 - x1;
const dy = y2 - y1;
return Math.sqrt(dx * dx + dy * dy);
}
}

查看文件

@ -1,5 +1,4 @@
import promptAction from '@ohos.promptAction'; import promptAction from '@ohos.promptAction';
import { Resource } from 'GlobalResource';
import { BusinessError } from '@kit.BasicServicesKit'; import { BusinessError } from '@kit.BasicServicesKit';
import { HashMap } from '@kit.ArkTS'; import { HashMap } from '@kit.ArkTS';