【发布时间】:2023-03-08 22:00:01
【问题描述】:
我有一个无法解决的问题。 我用 woocommerce 创建了一个电子商务。我使用 onesignla 发送更新通知等。 但是我希望每个用户在订单更改状态时都有自己的通知,例如: 从收到到完成... 我已尝试使用 localnotification,但没有成功,有人可以帮助我吗?
我的订单页面.ts
orderstatus: any;
orderChangeStatus(){
if (this.orderstatus == 'processing') {
this.LocalNotifications.schedule({
title: 'My first notification',
text: 'flight is landed',
foreground: true
});
}
if (this.orderstatus == 'completed') {
this.LocalNotifications.schedule({
title: 'My first completed',
text: 'flight is landed',
foreground: true
});
}
}
html
</ion-row>
<ion-row [class.pending]="order.status=='pending' || order.status=='refunded'"
[class.cancel]="order.status=='cancelled' || order.status=='failed'"
[class.inprocess]="order.status=='processing'" [class.complete]="order.status=='completed'">
<ion-col size="6">
{{'Status'|translate}}
</ion-col>
<ion-col class="ion-text-right" size="6">
<strong>{{order.status|translate}}</strong>
</ion-col>
</ion-row>
【问题讨论】:
标签: ionic-framework localnotification