classes/artifacts/student_test_war_exploded/static/js/zyd.comment.js
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/**
* bootstrap版评论框
*
* @date 2018-01-05 10:57
* @author zhyd(yadong.zhang0415#gmail.com)
* @link https://github.com/zhangyd-c
*/
$.extend({
comment: {
submit: function(target) {
var $this = $(target);
$this.button('loading');
$('#detail-modal').modal('show');
$(".close").click(function() {
setTimeout(function() {
$this.html("<i class='fa fa-close'></i>取消操作...");
setTimeout(function() {
$this.button('reset');
}, 1000);
}, 500);
});
// 模态框抖动
// $('#detail-modal .modal-content').addClass("shake");
$("#detail-form-btn").click(function() {
$.ajax({
type: "get",
url: "./server/comment.json",
async: true,
success: function(json) {
if(json.statusCode == 200) {
console.log(json.message);
} else {
console.error(json.message);
}
$('#detail-modal').modal('hide');
setTimeout(function() {
$this.html("<i class='fa fa-check'></i>" + json.message);
setTimeout(function() {
$this.button('reset');
window.location.reload();
}, 1000);
}, 1000);
},
error: function(data) {
console.error(data);
}
});
});
},
reply: function(pid, c) {
console.log(pid);
$('#comment-pid').val(pid);
$('#cancel-reply').show();
$('.comment-reply').show();
$(c).hide();
$(c).parents('.comment-body').append($('#comment-post'));
// $(c).parent().parent().parent().append($('#comment-post'));
},
后面还有 16 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
