2***@qq.com
2***@qq.com
  • 发布:2021-10-21 17:36
  • 更新:2021-10-21 17:36
  • 阅读:262

mui post提交json为什么返回error

分类:MUI
mui.ajax(geolocation, {  
                    data: JSON.stringify(placeIds),  
                    dataType: 'json', //服务器返回json格式数据  
                    type: 'post', //HTTP请求类型  
                    timeout: 10000, //超时时间设置为10秒;  
                    headers: {  
                        'Content-Type': 'application/json'  
                    },  
                    success: function(data) {  
                        //服务器返回响应,根据响应结果,分析是否登录成功;  
                        console.log(JSON.stringify(data));  

                    },  
                    error: function(xhr, type, errorThrown) {  
                        //异常处理;  
                        console.log(type);  
                    }  
                });

用其他工具请求一样的接口,提交json可以正常返回结果,但是用mui的post提交就返回error,求解!

2021-10-21 17:36 负责人:无 分享
已邀请:

该问题目前已经被锁定, 无法添加新回复