Browse Source

提交代码。

Signed-off-by: zouap <zouap@pcl.ac.cn>
tags/v1.22.3.2^2
zouap 3 years ago
parent
commit
14eb779c88
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      public/home/search.js

+ 2
- 2
public/home/search.js View File

@@ -163,14 +163,14 @@ function displayRepoResult(page,jsonResult,onlyReturnNum,keyword){
html += " <div class=\"description\">";
html += " <p class=\"has-emoji\"> " + recordMap["description"] + "</p>";
html += " <div class=\"ui tags\">";
if(!isEmpty(recordMap["topics"])){
if(!isEmpty(recordMap["topics"]) && recordMap["topics"] !="null"){
for(var j = 0; j < recordMap["topics"].length;j++){
html +=" <a href=\"/explore/repos?q=" + recordMap["topics"][j] + "&amp;topic=\"><div class=\"ui small label topic\">"+ recordMap["topics"][j] + "</div></a>";
}
}
html +=" </div>";
html +=" <p class=\"time\">";
html +=" <i class=\"ri-star-line\"></i>" + recordMap["NumStars"] + "<i class=\"ri-git-branch-line am-ml-10\"></i>" + recordMap["NumForks"];
html +=" <i class=\"ri-star-line\"></i>" + recordMap["num_stars"] + "<i class=\"ri-git-branch-line am-ml-10\"></i>" + recordMap["num_forks"];
html +=" 最后更新于 <span class=\"time-since poping up\" title=\"\" data-content=\"\" data-variation=\"inverted tiny\">" + getTime(recordMap["updated_unix"],currentTime) +"</span>";
html +=" <span class=\"text grey am-ml-10\"><i class=\"color-icon\" style=\"background-color: #3572A5\"></i>" + recordMap["lang"] + "</span>";
html +=" </p>";


Loading…
Cancel
Save