# shareImage

> 分享海报

### shareImage

> 分享海报

#### 请求参数

| 参数       | 类型                          | 必填 | 说明                                  |
| ---------- | ----------------------------- | ---- | ------------------------------------- |
| `imageUrl` | `string`                      | 是   | 分享的图片链接,仅支持网络地址,png/jpg |
| `success`  | `() => void`                  | 否   | 成功回调                              |
| `fail`     | `(error: BridgeCode) => void` | 否   | 失败回调                              |
| `complete` | `() => void`                  | 否   | 完成回调                              |

#### 返回值

```js
Promise<void>
```

#### 异常返回值

```js
Promise<{ errCode: BridgeCode }>
```

#### 示例代码

```js
import { shareImage } from '@kbapp/js-bridge'

shareImage({
    imageUrl: 'https://example.com/poster.png',
    success() {
        console.log('分享海报成功')
    },
    fail(error) {
        console.log('分享海报失败', error)
    },
})
```

> 支持 Promise 风格调用
