获取设置的卡路里/距离/中高运动时长 主界面
功能表 : getSupportGetMainSportGoalV3
参数说明:
| 字段名 | 字段类型 | 字段说明 |
|---|---|---|
| timeGoalType | int | 0:无效 1:日目标 2:周目标 需要固件开启功能表 getSupportSetGetTimeGoalTypeV2 |
示例
Swift
Cmds.getMainSportGoal(timeGoalType: 1).send { rs in
if case .success(let obj) = rs {
// 成功
// obj is IDOMainSportGoalModel
}else {
// 失败
}
}
Kotlin
Cmds.getMainSportGoal(timeGoalType: 1).send {
if (it.error.code == 0) {
// 成功
// it.res is IDOMainSportGoalModel
}else {
// 失败
}
}
ArkTs
//获取设置的卡路里/距离/中高运动时长 主界面
// timeGoalType: 0: Invalid 1: Daily goal 2: Weekly goal
let timeGoalType = 1
Cmds.getMainSportGoal(timeGoalType,(res)=>{
if(res.success){
//成功
// res.value is IDOMainSportGoalModel
} else {
//失败
}
})