首页 > 解决方案 > 发布时无法加载日历,在本地环境中工作

问题描述

尝试在实时环境中发布日历但不起作用。在本地环境中运行良好。

尝试使用 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(未找到)

标签: jqueryasp.netajaxfullcalendarhttp-status-code-404

解决方案


推荐阅读