d***@yeah.net
d***@yeah.net
  • 发布:2023-04-13 14:03
  • 更新:2023-04-13 14:11
  • 阅读:158

notify为undefined

分类:uni-app

以声明:const notify = uni.requireNativePlugin('Ba-Notify')
调用:
console.log(notify) // undefined
notify.show({
'channelID': '1',
'channelName': '普通通知',
'ID': 0,
'notifyType': '1',
'ticker': 'Ticker',
'title': '常驻通知',
'content': "某应用正在运行..",
'autoCancel': true,
'ongoing': true,
'isSound': true
},
(res) => {
console.log(res)
});

但是此时的notify为undefined

2023-04-13 14:03 负责人:无 分享
已邀请:
BoredApe

BoredApe - 有问题就会有答案。

  • d***@yeah.net (作者)

    已解决,就是自定义基座问题。谢谢您!

    2023-04-13 14:39

  • d***@yeah.net (作者)

    再请问您一下,我的notify目前是存在了,调用show方法,但并没有在通知栏中收到通知?

    2023-04-13 14:55

  • BoredApe

    回复 d***@yeah.net: 在编写原生插件的时候测试正常吗

    2023-04-13 15:02

  • d***@yeah.net (作者)

    回复 BoredApe: 正常的

    2023-04-13 15:05

  • d***@yeah.net (作者)

    就是通知没有显示在通知栏,需要设置手机上的什么属性吗?还是说权限问题

    2023-04-13 15:06

要回复问题请先登录注册