提交 d4b24efc 编写于 作者: fxy060608's avatar fxy060608

chore(push): update gtpush

上级 88d360b0
因为 它太大了无法显示 source diff 。你可以改为 查看blob
......@@ -12,6 +12,10 @@ declare namespace GtPush {
* 个推官网生成的appid
*/
appid: string
/**
* 错误回调
*/
onError?: (res: {error: any}) => void
/**
* 个推终端ID回调,标识当前终端和应用
*/
......
因为 它太大了无法显示 source diff 。你可以改为 查看blob
此差异已折叠。
......@@ -17,6 +17,15 @@ if (!appid) {
} else {
GtPush.init({
appid,
onError: (res) => {
console.error(res.error)
// @ts-expect-error
uni.invokePushCallback({
type: 'clientId',
cid: '',
errMsg: res.error,
})
},
onClientId: (res) => {
// @ts-expect-error
uni.invokePushCallback({
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册