1.IOS app 职业搜索 经常无响应(卡死),其实并没有死掉。 IOS软键盘会影像position:fixed的布局需要改成position:absolute;
原代码:
.modal{position:fixed;}`
更改后:
.modal-dialog.no-mar{margin:0; position: static; }
.modal{ position:absolute;top:0;right:0;left:0;bottom:0;}
2.IOS下使用canvas drawImg时候高度不对,造成 图片空白
3.复制到粘贴板功能兼容IOS
主要用到execCommand命令
注意:html需要用 input或者 textarea 不可以隐藏,必须是显示的
<input id="url_{{list.id}}" ng-if="list.type=='39'" style="z-index:-1;position: absolute;" type="text" value="https://work.weixin.qq.com/hbs/08f78cd0d08080c00310eca1d8e584808018/1"></input>
js代码
var contID = document.getElementById('url_'+type.id);
if($scope.global.isIOS){
var input = document.createElement("input");
//只需要改变取值方式即可
input.value =contID.value;
document.body.appendChild(input);
input.select();
input.setSelectionRange(0, input.value.length);
document.execCommand('Copy');
document.body.removeChild(input);
}else{
contID.select();
document.execCommand("Copy"); //执行浏览器复制命令
}
4.兼容移动端的弹出层,禁止背景滑动。弹出层内容可以滑动。
方式一:实践兼容(pc,安卓手机,苹果)
//打开弹出层时设置样式如下:
.over-h2{position:fixed;width:100%;height:100%; overflow:hidden;}
//关闭弹出层时设置样式如下:
.over-y2{ overflow-y:auto;height:auto;position:static;}.
方式二:未实践
js方式参考:https://www.cnblogs.com/ruankr/p/9088785.html
http://www.imooc.com/article/40624
5.设置签字的笔触粗细,不起作用。发现是并没有初始化 笔触设置这个方法。
6.时间选择器搭配 angular ng-init 不好用。直接在js文件里初始化即可,如果需要选择完后又相应的处理要增加 ng-change
7.input type=number 去除上下箭头,注意此时的input中的value是数字格式,不是字符串。
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {-webkit-appearance: none;}
input[type="number"] {-moz-appearance: textfield;}
8.为何回调回来的路径后面带着参数,有时候返回正确,有时候返回到首页?
检测系统的路由控制。因为逻辑是要登录才可以访问其他页面,当时没有用户信息所以就跳转了。
注:排除bug的方法 => 首先找低级bug(语法错误,拼写错误)等,确认没有低级错误没有再根据报错信息逐步排查问题。血泪史很长,至今还在延续。