var ret =[{"result":1,"msg":"请求成功 ","list":[{"goodname":"属鼠-千手观音","user_id":2,"orderid":"1542643216144","trackingnumber":"","goodstate":0,"id":1,"goodid":"","detail":"{"username":"何少圳","goodname":"属鼠-千手观音","phonenum":"18202023544","address":"广东省北京市和平区","remark":"weixin"}"}]}];
var dataJSON = ret.list;
list_length = dataJSON.length;
for(var i=0; i<list_length; i++) {
var state = (dataJSON[i].goodstate) ? "已发货" : "备货中";
var detail = dataJSON[i].detail;
var detailObj = JSON.parse(detail);
var detailUsername = detailObj.username; //获取username
}
网友评论