# Function: getBalance
▸ getBalance(params?: GetBalanceParams): Promise‹GetBalanceRes›
查询余额
example
import { paymentSystem } from '@timi/mogs-sdk';
const {
balance,
giftedBalance,
isFirstRechargeAvailable,
totalAmount,
totalGiftedAmount,
totalChargedAmount,
totalConsumedAmount,
} = await paymentSystem.getBalance();
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
description 注意:仅支持 Android 平台。
description 注意:Android 手Q平台仅支持返回 balance,其余属性均为空。
throws {@link MogsError}
# 参数:
| 属性 | 类型 |
|---|---|
params? | GetBalanceParams |
GetBalanceParams
| 属性 | 类型 | 描述 |
|---|---|---|
complete? | Method | 操作完成时(成功或失败),均会调用该回调函数 |
fail? | Method | 操作失败时,调用该回调函数 |
success? | Method | 操作成功时,调用该回调函数 |
# 返回值:
Promise‹GetBalanceRes›