docs内json文件排序
This commit is contained in:
parent
356a3b5b57
commit
ea1ae75251
6
Gmeek.py
6
Gmeek.py
@ -313,6 +313,10 @@ else:
|
||||
listFile=open("blogBase.json","w")
|
||||
listFile.write(json.dumps(blog.blogBase))
|
||||
listFile.close()
|
||||
shutil.copy("blogBase.json",blog.root_dir)
|
||||
# shutil.copy("blogBase.json",blog.root_dir)
|
||||
|
||||
blog.blogBase["postListJson"]=dict(sorted(self.blogBase["postListJson"].items(),key=lambda x:x[1]["createdAt"],reverse=True))#使列表由时间排序
|
||||
docListFile=open(blog.root_dir+"postList.json","w")
|
||||
docListFile.write(json.dumps(blog.blogBase))
|
||||
docListFile.close()
|
||||
######################################################################################
|
||||
|
||||
@ -68,7 +68,7 @@ document.getElementById("{{ blogBase['singeListJson'][num]['postTitle'] }}").set
|
||||
|
||||
tagList=[];
|
||||
jsonData='';
|
||||
let requestJson="blogBase.json"
|
||||
let requestJson="postList.json"
|
||||
let request=new XMLHttpRequest();
|
||||
request.open("GET",requestJson);
|
||||
request.responseType='text';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user