//获取章节的channel列表 /* param { book:book, para:para, target:target, topchannel:[1,2,3], showchannel:[1,2,3] } */ function loadChapterChannel(param){ $.getJSON( "/api/v2/progress?view=chapter_channels", { book: param.book, par: param.para, }, function (data, status) { let arrChannelList = data.data.rows; if(typeof param.readonly != "undefined" && param.readonly == true){ $(param.target).html(render_chapter_progress_list_readonly(arrChannelList,param)); }else{ $(param.target).html(render_chapter_progress_list(arrChannelList,param)); Like(); } } ); } //章节已经有译文的channel 列表 function render_chapter_progress_list(chapterList,param) { let html = ""; html += ""; return html; } function render_chapter_progress_list_readonly(chapterList,param) { let html = ""; html += ""; return html; } function getChapterLikeCount(info,likeType){ for (const item of info) { if(item.type==likeType){ return item.count; } } return 0; } function renderChannelLikes(info,restype,resid){ /* 点赞 like 收藏 favorite 关注 watch 书签 bookmark */ let like_types = ["like",'favorite',"watch"]; let html = ""; for (const typs of like_types) { html += ""; } return html; } function renderProgressBar(progress){ let html = ""; let resulte = Math.round(progress*100); let clipPathId = "ClipPath_"+com_uuid(); html += ""; html += ""+resulte+"%"; html += ""; html += ""+resulte+"%"; html += ""; html += " "; html += ""; html += ""; return html; }