我只是想知道这是否是发布请求的正确方式:
$http.post(urlBase+'productattributecreate?'
+"&products_id"="1"
+"&attributes_id"=tab.attributeId
+"&attributes_values_id"=tab.attributeValueId
+"®ularPrice"=tab.regularPrice
+"&salesPrice"=tab.salePrice
+"&purchasePrice"=tab.purchasePrice
+"&stockStatus"=tab.stockStatus
+"&sttockQuantity"=tab.stockQuantity
+"&minquantitySales"=tab.minQuantitySales
+"&maxQuantitySales"=tab.maxQuantitySales
+"&productImage"="")
答案 0 :(得分:0)
我认为更正确的方法是:
$http.post('../productattributecreate', uploadData)
其中uploadData
是包含所有数据的对象:
var uploadData = {
products_id = '1',
attributes_id = tab.attributeId,
attributes_values_id = tab.attributeValueId,
regularPrice = tab.regularPrice,
salesPrice = tab.salePrice,
purchasePrice = tab.purchasePrice,
stockStatus = tab.stockStatus,
sttockQuantity = tab.stockQuantity,
minquantitySales = tab.minQuantitySales,
maxQuantitySales = tab.maxQuantitySales,
productImage = ''
};
另外......如果你用更多信息澄清了你的问题会更好。