我在此页面上关注了文档:https ://docs.snipcart.com/v3/sdk/api#cart
我可以像这样更新购物车:
Snipcart.api.cart.update({
email: 'john.doe@example.com'
}).then(response => {
console.log("Snipcart.api.cart.update response", response);
}).catch(e => {
console.log("Snipcart.api.cart.update error", e);
});
但是,当我尝试这个时:
Snipcart.api.cart.update({
billingAddress:{
name: 'John Doe'
}
}).then(response => {
console.log("Snipcart.api.cart.update response", response);
}).catch(e => {
console.log("Snipcart.api.cart.update error", e);
});
我得到:
Snipcart.api.cart.update error Object { kind: Getter & Setter, form: Getter & Setter, fields: Getter & Setter, … }
而且我不知道为什么!?有什么提示吗?