1getNewBlog() 2function getNewBlog() { 3 $('.oc-main-sam-news .news-items').addClass('oc-loading') 4 $.ajax({ 5 url: Apis.searchLatestBlog, 6 type: 'get', 7 success: (res) => { 8 if (res.code == 200) { 9 let html = '' 10 res.msg.forEach((item, index) => { 11 let img = item.imgs ? item.imgs.url : '' 12 let alt = item.imgs.alt ? item.imgs.alt : item.title 13 html += ` 14 <div class="news-item"> 15 <a href="${formatSeoUrlTrim(item.seo_url)}"> 16 <img class="new-image" src="${img}" alt="${alt}" title="${alt}"> 17 </a> 18 <div class="new-content"> 19 <div> 20 <a class="new-title text-ellipsis-2" href="${formatSeoUrlTrim(item.seo_url)}">${item.title}</a> 21 <p class="new-text text-ellipsis-4">${item.description}</p> 22 </div> 23 <a class="link" href="${formatSeoUrlTrim(item.seo_url)}">${TextPrompt.readMore} 24<div class="banner-sub_title-icon"> 25 <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> 26 <path d="M5.56836 2.5L10.7649 7.97009L5.56836 13.1667" stroke="#2F67B3" stroke-width="1.5"></path> 27 </svg> 28 </div> 29 </a> 30 </div> 31 </div>` 32 }) 33 $('.oc-main-sam-news .news-items').html(html) 34 } 35 $('.oc-main-sam-news .news-items').removeClass('oc-loading') 36 }, 37 error: () => { 38 $('.oc-main-sam-news .news-items').removeClass('oc-loading') 39 }, 40 }) 41} 42 43function formatSeoUrlTrim(url) { 44 if (url.startsWith('/') || url.startsWith('http')) { 45 return url 46 } 47 return '/' + url 48}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.