代码提交
This commit is contained in:
@@ -15,8 +15,8 @@ $("#addPost").click(function () {
|
||||
var header = $("meta[name='_csrf_header']").attr("content");
|
||||
console.warn(header)
|
||||
console.warn(token)
|
||||
var title = $("#postcontent").val();
|
||||
console.log(title);
|
||||
var content = $("#postcontent").val();
|
||||
console.log(content);
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/newpost",
|
||||
@@ -32,11 +32,10 @@ $("#addPost").click(function () {
|
||||
success: function (data) {
|
||||
console.log(data);
|
||||
if(data.flag){
|
||||
window.alert(title+',添加成功!');
|
||||
$('.ui.modal.createNewDiccuss').modal('hide');
|
||||
massage(title+',添加成功!','');
|
||||
location.reload();
|
||||
}else{
|
||||
window.alert(data.msg);
|
||||
massage(data.msg,'');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,11 +83,11 @@ $("#newdiscussions").click(function(){
|
||||
success: function (data) {
|
||||
console.log(data);
|
||||
if(data.flag){
|
||||
window.alert(title+',添加成功!');
|
||||
massage(title+',添加成功!','');
|
||||
$('.ui.modal.createNewDiccuss').modal('hide');
|
||||
location.reload();
|
||||
}else{
|
||||
window.alert(data.msg);
|
||||
massage(data.msg,'');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -123,10 +123,10 @@ $("#commitnewtags").click(function(){
|
||||
success: function (data) {
|
||||
console.log(data);
|
||||
if(data.flag){
|
||||
window.alert(name+',添加成功!');
|
||||
massage(name+',添加成功!','');
|
||||
return false;
|
||||
}else{
|
||||
window.alert(name+',添加失败!');
|
||||
massage(name+',添加失败!','');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -148,7 +148,6 @@ $('#context2 .menu .item')
|
||||
context: 'parent'
|
||||
})
|
||||
;
|
||||
;
|
||||
|
||||
$('.ui.dropdown')
|
||||
.dropdown()
|
||||
|
||||
Reference in New Issue
Block a user