---
name: "getUnlockMethodDetail"
mode: "api"
versionRequirements:
  - { name: "@ray-js/lock-sdk", version: "1.0.0" }
title: "getUnlockMethodDetail - 获取开锁方式详细信息。"
summary: "获取开锁方式详细信息。"
---

## getUnlockMethodDetail

> [VERSION] @ray-js/lock-sdk >= 1.0.0

### 描述

获取开锁方式详细信息

### 参数

| 参数 | 类型 | 必填 | 描述 |
| --- | --- | --- | --- |
| `id` | `number` | 是 | 记录 id |

### 返回值

类型: `Promise<UnlockMethodDetail>`

开锁方式详情（云端记录解析结果）

##### UnlockMethodDetail

| 属性 | 类型 | 描述 |
| --- | --- | --- |
| `isBound` | `boolean` | 是否与云端用户绑定 |
| `type` | `"finger" \| "face" \| "password" \| "card" \| "fingerVein" \| "hand" \| "eye"` | 开锁方式类型 |
| `phase` | `number` | 云端阶段/状态值 |
| `dpId` | `number` | 对应 DP 数字 id |
| `isSpecial` | `boolean` | 是否特殊开锁方式 |
| `unlockName` | `string` | 开锁方式名称 |
| `userId` | `string` | 所属云端用户 id |
| `unlockId` | `number` | 锁端开锁实例 id |
| `lockUserId` | `number` | 锁端用户 id |
| `id` | `string` | 云端开锁方式记录 id（字符串形态） |
| `userType` | `number` | 用户类型（数值） |
| `notifyInfo` | `NotifyInfo` | 通知配置；`isSpecial` 为 true 时有效 |

##### NotifyInfo 的属性

| 属性 | 类型 | 必填 | 默认值 | 描述 |
| --- | --- | --- | --- | --- |
| `appSend` | `boolean` | 否 | - | 是否推送 App 消息 |
| `msgSend` | `boolean` | 否 | - | 是否发送短信 |
| `msgPhone` | `string` | 否 | - | 短信接收手机号（有值通常表示开启短信） |
| `countryCode` | `string` | 否 | - | 短信国家码 |


### 错误码

| 错误码 | 错误信息 |
| --- | --- |
| `1040` | 云端：记录不存在（RECORD_NOT_EXIST） |

### 示例代码

#### 示例

```ts
import { getUnlockMethodDetail } from '@ray-js/lock-sdk';
const detail = await getUnlockMethodDetail();
```
