Skip to content

Commit f888d5c

Browse files
committed
路径错误问题
1 parent 26756a2 commit f888d5c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

template/js/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@
8080
des = json.d.replace(reg,'<i class="kw">'+"$1"+"</i>") || '';
8181
}
8282

83-
str = islist ? '<a href="'+this.root_path+'/c$url$.html"><strong>$name$</strong> - $des$</a><p></p>' : '<a href="'+this.root_path+'/c$url$.html"><strong>$name$</strong> - $des$</a>';
83+
var rootp = this.root_path.replace(/\/$/,'');
84+
str = islist ? '<a href="'+ rootp +'/c$url$.html"><strong>$name$</strong> - $des$</a><p></p>' : '<a href="'+ rootp +'/c$url$.html"><strong>$name$</strong> - $des$</a>';
8485
return this.simple(str,{
8586
name:name,
8687
url:json.p,

0 commit comments

Comments
 (0)