---
name: "onCountrySelectResult"
mode: "kit"
versionRequirements:
  - { name: "BizKit", version: "3.0.0" }
  - { name: "@ray-js/ray", version: "0.3.23" }
platform:
  - "iOS"
  - "Android"
async: true
title: "onCountrySelectResult - 监听国家选择页面的选择结果"
---

## onCountrySelectResult

> [VERSION] BizKit >= 3.0.0 | @ray-js/ray >= 0.3.23

> [PLATFORM] iOS, Android

> ⚡ **支持 Promise 调用** — 不传 success / fail / complete 回调时，该方法返回 Promise。

### 描述

监听国家选择页面的选择结果

### 参数

`(listener: Function)`

| 参数 | 类型 | 必填 | 默认值 | 描述 |
| --- | --- | --- | --- | --- |
| `listener` | `(params: CountrySelectResultResponse) => void` | 是 | - |  |

### 引用对象

##### `interface` CountrySelectResultResponse

| 属性 | 类型 | 最低版本 | 描述 |
| --- | --- | --- | --- |
| `countryCode` | `string` | `3.0.0` | 国家码 |
| `countryAbb` | `string` | `3.0.0` | 国家编码 |
| `countryName` | `string` | `3.0.0` | 国家名称 |


### 示例代码

#### Demo

```tsx
import { onCountrySelectResult, openCountrySelectPage } from '@ray-js/ray'

onCountrySelectResult(e => {
  console.log('[event]', e);
});

openCountrySelectPage({
  success: data => {
    console.log('[open]', data);
  },
  fail: error => {
    console.error('[open]', error);
  },
});
```
