我正在我的应用程序中开发一项功能,以通过 Whatsapp 发送消息。
但我不确定如何显示它们。例如给定这个数组:
purchaseOrderMessage() {
var po = this.currentPurchaseOrder.purchase_order_lines.map(x => {
return {
name: x.item_name,
quantity: x.quantity,
};
});
return po
},
我发送 Wa 消息:
sendWa() {
let url = 'https://wa.me/' + this.currentPurchaseOrder.supplier.phone + '?text=' + this.purchaseOrderMessage
openURL(url)
},
我应该如何格式化数组以使其在消息中可读?