var map = r.interactiveActivityMap;
var prizeHtml = ""
for (key in map) {
prizeHtml = prizeHtml + "<div class='subtitle'>" + key + "</div>";
prizeHtml = prizeHtml + " <div class='tbWrap'> <table><tr><th>昵称</th><th>姓名</th><th>手机号</th><th>操作</th></tr>";
for (obj in map[key]) {
prizeHtml = prizeHtml + "<tr><td>" + map[key][obj].wxNickName + "</td><td>" + map[key][obj].name + "</td><td>" + map[key][obj].mobile + "</td>";
if (map[key][obj].exchangeStatus == 0) {
prizeHtml = prizeHtml + "<td class='auction'id='" + map[key][obj].id + "'><span style='cursor: pointer;'>兑奖</span><span class='del'style='cursor: pointer;'>作废</span></td></tr>";
} else if (map[key][obj].exchangeStatus == 1) {
prizeHtml = prizeHtml + "<td class='auctioned'>已兑奖</td></tr>";
} else if (map[key][obj].exchangeStatus == 2) {
prizeHtml = prizeHtml + "<td class='auctioned'>已作废</td></tr>";
}
}
js 遍历map
最新推荐文章于 2023-08-30 14:08:39 发布