鍍金池/ 問答/HTML/ 使用axois報錯

使用axois報錯


?Deprecated: Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set 'always_populate_raw_post_data' to '-1' in php.ini and use the php://input stream instead. in Unknown on line 0
?
?Warning: Cannot modify header information - headers already sent in Unknown on line 0
?1

 axios.post('__MODULE__/Point/produceOrder',{
                            pointproduct_no:this.pointproduct_no,
                            等等等等
                         
                        })
                        .then(function(res){
                            console.log(res);
                        }).catch(function (error) {
                            console.log(error);
                       });

為什么換成get就可以

回答
編輯回答
裸橙

這是后臺php報的錯,因為你直接post了raw-data。用JSON.stringify(data)試試

2017年12月16日 08:04