服务器端返回的数据如下:
{"status":1,"msg":"","data":{"companyname":"","resCount":4,"res":[{"id":"120","sp":"\u56db\u5ddd\u7701","sc":"\u6210\u90fd\u5e02","ep":"\u5c71\u897f\u7701","ec":"\u592a\u539f\u5e02","product_type":"\u666e\u8d27","pack_type":"\u7bb1\u88c5","product_weight":"4.0","product_volume":"23.0","deadline":"4\u5929\u540e\u8fc7\u671f","distance":"\u8ddd\u79bb10.0\u516c\u91cc"},{"id":"119","sp":"\u56db\u5ddd\u7701","sc":"\u6210\u90fd\u5e02","ep":"\u5317\u4eac","ec":"\u5317\u4eac\u5e02","product_type":"\u666e\u8d27","pack_type":"\u7bb1\u88c5","product_weight":"21.0","product_volume":"21.0","deadline":"4\u5929\u540e\u8fc7\u671f","distance":"\u8ddd\u79bb11.4\u516c\u91cc"},{"id":"115","sp":"\u56db\u5ddd\u7701","sc":"\u6210\u90fd\u5e02","ep":"\u4e0a\u6d77","ec":"\u4e0a\u6d77\u5e02","product_type":"\u666e\u8d27","pack_type":"\u6563\u4ef6","product_weight":"3.0","product_volume":"30.0","deadline":"53\u5929\u540e\u8fc7\u671f","distance":"\u8ddd\u79bb20.8\u516c\u91cc"},{"id":"110","sp":"\u56db\u5ddd\u7701","sc":"\u6210\u90fd\u5e02","ep":"\u798f\u5efa\u7701","ec":"\u53a6\u95e8\u5e02","product_type":"\u666e\u8d27","pack_type":"\u7bb1\u88c5","product_weight":"13.0","product_volume":"12.0","deadline":"50\u5929\u540e\u8fc7\u671f","distance":"\u8ddd\u79bb28.0\u516c\u91cc"}],"page":1}}
if(res.startsWith("\ufeff")){
res = res.substring(1);
}
在确认JSON数据格式没有问题的前提下,100%是因为UTF-8的BOM头。