fis-plus icon indicating copy to clipboard operation
fis-plus copied to clipboard

模拟后端数据,请求.json文件失败

Open koalagogogo opened this issue 8 years ago • 2 comments

因为后端还没开始写,我现在要写ajax请求代码如下 $.ajax({ url:'test.json', data:data, type:'post', dataType: 'json', success: function(data) { }, error: function(error) { } }); 这个ajax的url路径应该怎么写呢?应该放在哪里呢?我发现所有文件都被解析成为了tpl文件,所以根本找不到json文件

koalagogogo avatar May 06 '16 11:05 koalagogogo

钢发现了rewrite的作用,已经解决!谢谢rewrite ^\/aa\/?$ test/home/page/admin/index.json就可以通过访问aa访问到json了!!!不过redirect重定向的作用是什么??不能理解啊

koalagogogo avatar May 06 '16 12:05 koalagogogo

@koalaqinqin 跳页啊

oxUnd avatar May 10 '16 00:05 oxUnd