Commit 450280a7 by liuyingying

添加文章链接问题

parent a3cc59cb
...@@ -15,6 +15,14 @@ ...@@ -15,6 +15,14 @@
<div id="edit_title">修改</div> <div id="edit_title">修改</div>
<div id="edit_content"> <div id="edit_content">
<div> <div>
<label for="title">title</label>
<input id="title" name="title">
</div>
<div>
<label for="link">外部链接</label>
<input id="link" name="link">
</div>
<div>
<label>是否公开发布:</label> <label>是否公开发布:</label>
<select name="isPublish" id = 'isPublish'> <select name="isPublish" id = 'isPublish'>
<option value="1" selected>公开(在首页显示)</option> <option value="1" selected>公开(在首页显示)</option>
...@@ -138,7 +146,7 @@ ...@@ -138,7 +146,7 @@
<button class="add_url" onclick="addArt()" title="添加外部平台文章链接"></button> <button class="add_url" onclick="addArt()" title="添加外部平台文章链接"></button>
<a href="{% url 'hunter:write_art' %}" title="写文章"> <a href="{% url 'hunter:write_art' %}" title="写文章">
<svg t="1587711451871" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2741" width="20" height="20"><path d="M863.079412 351.09129a29.2569 29.2569 0 0 1 58.5138 0v555.881108a117.027602 117.027602 0 0 1-117.027601 117.027602H219.427602a117.027602 117.027602 0 0 1-117.027602-117.027602V146.292987a117.027602 117.027602 0 0 1 117.027602-117.027602h380.339706a29.2569 29.2569 0 0 1 0 58.513801H219.427602a58.513801 58.513801 0 0 0-58.513801 58.513801v760.679411a58.513801 58.513801 0 0 0 58.513801 58.513801h585.138009a58.513801 58.513801 0 0 0 58.513801-58.513801V351.09129zM855.414104 10.306913a29.2569 29.2569 0 1 1 44.587516 37.916943l-248.683654 292.569005a29.2569 29.2569 0 1 1-44.587516-37.916943l248.683654-292.569005zM307.198303 526.632692h263.312104a29.2569 29.2569 0 0 1 0 58.513801H307.198303a29.2569 29.2569 0 0 1 0-58.513801z m0 175.541403h409.596606a29.2569 29.2569 0 0 1 0 58.513801H307.198303a29.2569 29.2569 0 0 1 0-58.513801z" p-id="2742" fill="#6e829e"></path></svg> <svg t="1587711451871" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2741" width="20" height="20"><path d="M863.079412 351.09129a29.2569 29.2569 0 0 1 58.5138 0v555.881108a117.027602 117.027602 0 0 1-117.027601 117.027602H219.427602a117.027602 117.027602 0 0 1-117.027602-117.027602V146.292987a117.027602 117.027602 0 0 1 117.027602-117.027602h380.339706a29.2569 29.2569 0 0 1 0 58.513801H219.427602a58.513801 58.513801 0 0 0-58.513801 58.513801v760.679411a58.513801 58.513801 0 0 0 58.513801 58.513801h585.138009a58.513801 58.513801 0 0 0 58.513801-58.513801V351.09129zM855.414104 10.306913a29.2569 29.2569 0 1 1 44.587516 37.916943l-248.683654 292.569005a29.2569 29.2569 0 1 1-44.587516-37.916943l248.683654-292.569005zM307.198303 526.632692h263.312104a29.2569 29.2569 0 0 1 0 58.513801H307.198303a29.2569 29.2569 0 0 1 0-58.513801z m0 175.541403h409.596606a29.2569 29.2569 0 0 1 0 58.513801H307.198303a29.2569 29.2569 0 0 1 0-58.513801z" p-id="2742" fill="#6e829e"></path></svg>
</a> </a>
</div> </div>
</div> </div>
<div class="wrap smaller_wrap"> <div class="wrap smaller_wrap">
...@@ -506,6 +514,12 @@ ...@@ -506,6 +514,12 @@
' <div>\n' + ' <div>\n' +
' <label for="url">文章地址:</label>\n' + ' <label for="url">文章地址:</label>\n' +
' <input id="url" name="url" type="text">\n' + ' <input id="url" name="url" type="text">\n' +
' </div>'+' <div>\n' +
' <label>是否公开发布:</label>\n' +
' <select name="isPublish" id = \'isPublish\'>\n' +
' <option value="1" selected>公开(在首页显示)</option>\n' +
' <option value="0" >不公开(仅自己可见)</option>\n' +
' </select>\n' +
' </div>'; ' </div>';
$('#edit_content').append(input_html); $('#edit_content').append(input_html);
} }
...@@ -535,9 +549,6 @@ ...@@ -535,9 +549,6 @@
} }
function create_article_html(){
}
function create_publication_html(){ function create_publication_html(){
$('#edit_content').empty(); $('#edit_content').empty();
let input_html = '<div>\n' + let input_html = '<div>\n' +
...@@ -582,6 +593,10 @@ ...@@ -582,6 +593,10 @@
if(submit_what==='cve'){ if(submit_what==='cve'){
submit_cve(); submit_cve();
} }
if(submit_what==='article'){
submit_article();
}
} }
function login_fail(message){ function login_fail(message){
$('#error_log').empty(); $('#error_log').empty();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment