utils.jq(() => { $(function () { const els = document.getElementsByClassName('ds-weibo'); for (var i = 0; i < els.length; i++) { const el = els[i]; const api = el.getAttribute('api'); if (api == null) { continue; } const default_avatar = el.getAttribute('avatar') || def.avatar; // layout utils.request(el, api, function(data) { const arr = data.tweets || []; const limit = el.getAttribute('limit'); arr.forEach((item, i) => { if (limit && i >= limit) { return; } var cell = '
'; cell += '
'; cell += ''; cell += '' + item.created_at + ''; cell += '
'; cell += '
'; cell += ''; cell += item.content; cell += ''; // cell += '
'; // 每条微博的右下角 转发 评论 点赞 cell += ''; // 右下角结束 $(el).append(cell); }); }); } }); });