first commit

This commit is contained in:
编码猿
2024-09-27 02:06:13 +08:00
commit 852d94fbb9
36760 changed files with 3274413 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
var E = window.wangEditor
var editor = new E('#editor')
editor.create()
$(".pushArticel").click(function() {
var title = $(".title").val()
var introduction = $(".introduction").val()
var author = $(".author").val()
var content = editor.txt.html()
// 验证用户是否输入内容,有没填写的给提示
// 对push接口实现token验证的调用
// 登录成功本地保存 token发送ajax请求头携带token
//
$.ajax({
url: 'http://127.0.0.1:3000/admin/api/push',
type: 'POST',
data: {
title: title,
introduction: introduction,
author: author,
content: content
},
success: function(res) {
console.log(res);
},
error: function(err) {}
})
});