Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
koalagogogo opened this issue May 6, 2016 · 2 comments
Open

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

koalagogogo opened this issue May 6, 2016 · 2 comments

Comments

@koalagogogo
Copy link

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

@koalagogogo
Copy link
Author

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

@oxUnd
Copy link
Contributor

oxUnd commented May 10, 2016

@koalaqinqin 跳页啊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants