短震动
vibrateShort
使手机发生较短时间的振动(15 ms)。仅在 iPhone 7 / 7 Plus 以上及 Android 机型生效
参数说明
| 属性 | 类型 | 默认值 | 是否必填 | 描述 |
|---|---|---|---|---|
type | string | medium | 否 | 震动强度类型,有效值为:heavy、medium、light |
success | function | 是 | 接口调用成功的回调函数 | |
fail | function | 否 | 接口调用失败的回调函数 | |
complete | function | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) |
示例代码
dsBridge.call(
'vibrateShort',
{
type: 'heavy',
success (res) {
// 参照返回结果示例
console.log(JSON.stringify(res))
}
}
)