发表于: 2017-03-14 20:55:25
1 1236
今天完成的事情:
1.前台代码合并。合并后有样式的覆盖,通过在外边在包上不同的类来独立。样式调整。添加页面之间的跳转,用ui-sref,在后面附上传递的参数。
2.后台的登录的界面以及查找禁止回退的解决方案。
遇到的问题:
http请求的异步问题,请求发送时候代码继续执行,不会等数据返回。可以通过在回调函数中处理来解决。
明天计划的事情:
登录界面。登录的数据获取与数据处理。
收获:
回退禁止解决方案思路1:通过缓存的布尔值确定是否执行回退禁止:
$(document).ready(function(e) {
var counter = 0;
if (window.history && window.history.pushState) {
$(window).on('popstate', function () {
window.history.pushState('forward', null, '#');
window.history.forward(1);
alert("不可回退");
});
}
window.history.pushState('forward', null, '#'); //在IE中必须得有这两行
window.history.forward(1);
});
评论