我尝试使用推送通知。所以我使用的是信号。 使用这个时我得到了这个错误
"未捕获的TypeError:无法读取属性' OneSignal'的 未定义"
代码:
.run(function($ionicPlatform) {
$ionicPlatform.ready(function() {
// Enable to debug issues.
// window.plugins.OneSignal.setLogLevel({logLevel: 4, visualLevel: 4});
var notificationOpenedCallback = function(jsonData) {
console.log('didReceiveRemoteNotificationCallBack: ' + JSON.stringify(jsonData));
};
window.plugins.OneSignal.init("AIzaSyCkgXtEUurHrM5rYUmstQmL7s8HkA6OTpA", {googleProjectNumber: "583817643699"}, notificationOpenedCallback);
// Show an alert box if a notification comes in when the user is in your app.
window.plugins.OneSignal.enableInAppAlertNotification(true);
});
})
请帮助我找到好的解决方案
答案 0 :(得分:1)
Dim tblaux as listobject
Dim RdS as variant
Dim r as variant
With tblaux
Z = GetUnique(.ListColumns(7).DataBodyRange)
For Each RdS In Z
.Range.AutoFilter Field:=7, Criteria1:="=" & RdS
.Sort.SortFields.Clear
.Sort.SortFields.Add Key:=.Range.Columns(1), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With .Sort
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
Set r = .rng.Offset(1, 0).Resize(.rng.Rows.Count - 1, .rng.Columns.Count).SpecialCells(xlCellTypeVisible)
End With
Next RdS
End with
也许是因为,window.plugin未定义。尝试在deviceready事件函数中使用它。希望它会帮助你(y)