我是新手,我正在努力为我的网球运动员提供服务,他们可以在网站上填写一份表格,以便预留球场。当他们想玩时,表格会发送一封包含时间和地点的电子邮件。确认后,应该更新日历。我尝试了各种方案,但它没有用。我不确定我错过了什么。我只是发送电子邮件给我自己,如下:
<html>
<body>
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "EventReservation",
"reservationNumber": "IO12345",
"underName": {
"@type": "Person",
"name": "John Smith"
},
"reservationFor": {
"@type": "Event",
"name": "Google I/O 2013",
"startDate": "2017-08-30T08:30:00-08:00",
"location": {
"@type": "Place",
"name": "Moscone Center",
"address": {
"@type": "PostalAddress",
"streetAddress": "800 Howard St.",
"addressLocality": "San Francisco",
"addressRegion": "CA",
"postalCode": "94103",
"addressCountry": "US"
}
}
}
}
</script>
<p>
Dear John, thanks for booking your Google I/O ticket with us.
</p>
<p>
BOOKING DETAILS<br/>
Reservation number: IO12345<br/>
Order for: John Smith<br/>
Event: Google I/O 2013<br/>
Start time: May 15th 2013 8:00am PST<br/>
Venue: Moscone Center, 800 Howard St., San Francisco, CA 94103<br/>
</p>
</body>
</html>
但我看到它只是上面的文字。 提前致谢, Hagop
答案 0 :(得分:0)
您遗失了一个属性:reservationStatus
,这是必需的。我使用了Basic event reminder without a ticket JSON-LD:
<html>
<head>
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "EventReservation",
"reservationNumber": "E123456789",
"reservationStatus": "http://schema.org/Confirmed",
"underName": {
"@type": "Person",
"name": "John Smith"
},
"reservationFor": {
"@type": "Event",
"name": "Foo Fighters Concert",
"startDate": "2017-09-06T11:30:00-12:30",
"location": {
"@type": "Place",
"name": "AT&T Park",
"address": {
"@type": "PostalAddress",
"streetAddress": "24 Willie Mays Plaza",
"addressLocality": "San Francisco",
"addressRegion": "CA",
"postalCode": "94107",
"addressCountry": "US"
}
}
}
}
</script>
</head>
<body>
<p>
An event was reserved.
</p>
</body>
</html>
结果如下:
我已经尝试了您的代码并添加了reservationStatus
并且它有效。您可以使用Email Markup Tester测试您的架构。
希望这有帮助。