jquery - 发布时无法加载日历,在本地环境中工作
问题描述
尝试在实时环境中发布日历但不起作用。在本地环境中运行良好。
尝试使用 jquery cdn 但不起作用。更改了控制器中的方法返回类型,但没有工作。
$(document).ready(function () {
var events = [];
var selectedEvent = null;
FetchEventAndRenderCalendar();
function FetchEventAndRenderCalendar() {
events = [];
$.ajax({
type: "GET",
url: "/home/GetEvents",
success: function (data) {
$.each(data, function (i, v) {
events.push({
ID: v.ID,
title: v.Name,
description: v.Description,
start: moment(v.Start),
end: v.End != null ? moment(v.End) : null,
color: v.ThemeColor,
allDay: v.IsFullDay
});
})
GenerateCalender(events);
},
error: function (error) {
alert('failed');
}
})
}
jquery-1.10.2.min.js:23 GET http://www.onebase.com/home/GetEvents 404(未找到)
解决方案
推荐阅读
- python - 如何在方法内部使用构造函数中的变量?
- postgresql - 删除 Postgres 中的所有数据类型
- r - pivot_longer 无法转换为行,而是保留列
- r - 如何根据值对分组条形图中的条形重新排序
- python - Softmax 输出只返回一个和零?
- javascript - Javascript Array.reduce 奇怪的行为
- django - Rest Framework 将附加变量传递给 ModelViewSet
- java - 每天自动更新graphview
- vue.js - 可以将 v-for 与 :value 一起使用
- python - 在从 PDF 复制的 TXT 文件中插入正确的行尾