9
0
27
技术1级
更好的用户体验,让用户在web感受natvie的速度和流畅; 经典MVC开发模式,前后端各负其责。 一套Server API,多端使用(web、移动APP等) 重前端,业务逻辑全部在本地操作,数据都需要通过AJAX同步、提交;
location.hash // 获取URL hash location.hash = "#list" //改变URL hash
example.com/#index //首页视图 example.com/#list //列表页视图 example.com/#list/1 //id为1的列表信息的视图
example.com/?_escaped_fragment_=/detail/1;
http://119.28.4.22/?escapedfragment_=/detail/1
119.28.4.22/#!/detail/1
http://119.28.4.22/?_escaped_fragment_=/detail/1
if ($args ~ _escaped_fragment_) { rewrite ^ /api; }
upstream nodejs { server 127.0.0.1:3000; } location /api { proxy_set_header X-Request-URI $request_uri; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $ host; proxy_set_header Port $server_port; proxy_pass http://nodejs; proxy_redirect off; }
/api
http://119.28.4.22/#!/detail/1 weekly 0.5
使用道具 举报
本版积分规则 发表回复 回帖并转播 回帖后跳转到最后一页
相关侵权、举报、投诉及建议等,请发 E-mail:qiongdian@foxmail.com
Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.