需要新下app的正常unipush,之前安装的勾选掉push模块发wgt继续用, 现在勾掉了发wgt报提示 打包时未添加push模块 想要加一层判断 有push模块再去调用 uni.onPushMessage( 应该怎么判断
if (plus && plus.push) { plus.runtime.getProperty(plus.runtime.appid, function(info) { if (!info.features.includes('push')) return; } }
3 个回复
BeforeMount (作者)
需要之前安装的正常用 不要报打包未包含push模块,怎么处理
在路上666
有这个判断的方法吗 ???
在路上666
if (plus && plus.push) {
plus.runtime.getProperty(plus.runtime.appid, function(info) {
if (!info.features.includes('push')) return;
}