代码如下:
在线投保.title{
margin: 20px 15px 10px;
color: #6d6d72;
font-size: 15px;
}
.oa-contact-cell.mui-table .mui-table-cell {
padding: 11px 0;
vertical-align: middle;
}
.oa-contact-cell {
position: relative;
margin: -11px 0;
}
.oa-contact-avatar {
width: 75px;
}
.oa-contact-avatar img {
border-radius: 50%;
}
.oa-contact-content {
width: 100%;
}
.oa-contact-name {
margin-right: 20px;
}
.oa-contact-name, oa-contact-position {
float: left;
}
/*不固定高宽div垂直居中的方法:其它页用*/
.box {
width: 100%;
height: 40px;
border: 1px solid #FFF;
display: table;
margin-right:5px;
}
.wrap{
display: table-cell;
vertical-align: middle;
width: 100%;
padding: 6px 0px;
line-height: 26px;
word-wrap: break-word;
word-break: break-all;
}
.mui-input-row .div-leftauto{
width:110px;
display: inline-block;
vertical-align: middle;
margin-left:5px;
padding-top: 8px;vertical-align:top;
}
.mui-input-row.multi-line{
height: auto;
}
div span{
font-family: "微软雅黑";
font-size: 16px;
}
div p{
font-family: "微软雅黑";
font-size: 15px;
}
在线投保
首页
我的
设置
其实就是通过DIV模拟一个独立页面,通过DIV的显示、隐藏模拟不同页面的切换,典型的SPA模式;
这种模式适合简单业务系统,因为每个选项卡内容要写在一个DIV中,
若逻辑复杂,会导致当前页面DOM结构繁杂,造成webview响应缓慢,甚至崩溃;
因此若系统较复杂,需要下拉刷新等操作,推荐使用webview模式的选项卡;
(function($, doc) {
$.init(function(){});
mui('body').on('tap','a',function(){
window.top.location.href=this.href;
});
//设置账户显示
var username =localStorage.getItem("userName");//获取
account.innerText = username;
$.plusReady(function() {
var mycarButton = doc.getElementById('mycar');
var mytbButton = doc.getElementById('mytb');
var mybdButton = doc.getElementById('mybd');
doc.getElementById('myper').addEventListener('tap', function() {
$.openWindow({
url: 'person/userManager.html',
id: 'userManager',
preload: true,
show: {
aniShow: 'animationType'
},
waiting:{
autoShow: true, //自动显示等待框,默认为true
title: '正在加载...' //等待对话框上显示的提示内容
}
});
}, false);
mycarButton.addEventListener('tap', function(event) {
$.openWindow({
url: 'car/mycarinfo.html',
id: 'mycarinfo',
preload: true,
show: {
aniShow: 'pop-in'
},
styles: {
popGesture: 'hide'
},
waiting: {
autoShow: false
}
});
}, false);
mytbButton.addEventListener('tap', function(event) {
$.openWindow({
url: 'tb/personbx.html',
id: 'reg',
preload: true,
show: {
aniShow: 'pop-in'
},
styles: {
popGesture: 'hide'
},
waiting: {
autoShow: false
}
});
}, false);
mybdButton.addEventListener('tap', function(event) {
$.openWindow({
url: 'regist.html',
id: 'regist.html',
preload: true,
show: {
aniShow: 'pop-in'
},
waiting: {
autoShow: false
}
});
}, true);
});
}(mui, document));
例如。跳转使用
doc.getElementById('myper').addEventListener('tap', function() {
$.openWindow({
url: 'person/userManager.html',
id: 'userManager',
preload: true,
show: {
aniShow: 'animationType'
},
waiting:{
autoShow: true, //自动显示等待框,默认为true
title: '正在加载...' //等待对话框上显示的提示内容
}
});
}, false);
为何不成功啊?新手,求解答