最近要使用django前台用easyui,发现当从后台获取数据过程中会出现跨域问题。

多次尝试后发现将ajax的方法设置为GET就没问题了

代码如下:

            $('#syslog_1').datagrid({
        url:'/bookapp/book/test/',
                toolbar:'#toolbar',
                fitColumns:true,                iconCls:'icon-wafa',
                nowrap:false,
                method:'get',
                columns:[[
                    {field:'imp',title:'接口名',width:100},
                    {field:'sta',title:'状态',width:100},
                                ]],
                pagination:true                
            });

 

相关文章:

  • 2022-02-04
  • 2021-12-20
  • 2021-07-05
  • 2021-09-27
  • 2021-12-02
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-04-01
  • 2021-11-07
  • 2021-04-14
  • 2021-04-04
  • 2021-09-29
  • 2021-09-19
  • 2021-10-28
相关资源
相似解决方案