Appearance
推送配置
方法名
pushConfig
用法
- 用法如下:
js
module.pushConfig({
params: {
appKey: "335739803",
appSecret: "b11cd14e12fa4585927c839aba76c82f"
},
//成功执行的函数
success: (res) => {
console.log(data)
},
//失败执行的函数
fail: (res) => {
console.log(res)
},
//接口调用完成返回函数,不管成功还是失败都会返回
complete: (res) => {
// console.log(res)
}
})js
module.pushConfig({
params: {
appKey: "335739803",
appSecret: "b11cd14e12fa4585927c839aba76c82f"
},
//成功执行的函数
success: (res) => {
console.log(res)
},
//失败执行的函数
fail: (res) => {
console.log(res)
},
//接口调用完成返回函数,不管成功还是失败都会返回
// complete: (res) => {
// console.log(res)
// }
} as LevenOptions)- 参数说明
参数名 参数类型 是否必填 默认值 参数描述 params Object 是 无 接口请求参数 params.appKey String 是 无 EMAS的appKey params.appSecret String 是 无 EMAS的appSecret params.loopStartChannel boolean 否 无 开启Channel进程时,设置定期循环启动Channel进程。默认关闭循环启动
true,开启channel进程循环启动
false,关闭channel进程循环启动params.loopInterval Integer 否 无 配置定期循环启动Channel进程的时间间隔,只有在开启定期循环启动Channel进程时才会生效,默认间隔是5分钟。单位:毫秒 success Function 否 无 执行成功的函数 fail Function 否 无 执行失败的函数 complete Function 否 无 执行完成的函数,不管成功还是失败都会执行
回调
- 示例
json
{
"data": {},
"message": "",
"code": 0
}- 回调说明:
参数名 参数类型 参数描述 message String 消息提示 data Object 数据对象 code Integer 返回类型,0.成功,其他:失败

