我尝试将数据添加到我的应用程序中。我添加了这个代码结构
return {
'@context': 'https://schema.org',
'@type': 'Product',
'sku': this.currentProduct.sku,
'category': this.productCategory,
'name': this.productName,
'description': this.productDescription,
'offers': {
'@type': 'Offer',
'price': this.bestPrice,
'priceCurrency': 'USD',
'availability': this.currentProduct.stock?.is_in_stock ? 'https://schema.org/InStock' : 'https://schema.org/OutOfStock'
},
'image': this.thumbnail
}但是,如果我在search.google.com/test/rich-results上查看结果,我会看到availability字段被分配了https值(而不是https://schema.org/InStock )。为什么会发生这种情况?这对项目很重要吗?
发布于 2021-02-20 06:38:37
这不是问题。Schema.org正在过渡到使用https,但在很长一段时间里,它都是http,并且http将在未来很长一段时间内使用。

https://stackoverflow.com/questions/66279378
复制相似问题