|
[插件开发]
openframeGroup启动顺序错乱
[复制链接]
交易这个模块本来应该在第3页的,但是跑到第一个来了。
api.openFrameGroup({
name: 'group',
scrollEnabled: false,
index: 0,
preload: 4,
rect: {
x: 0,
y: 0,
w: 'auto',
h: api.winHeight - bottomPos.h
},
frames: [{
name : 'home',
url : 'http://192.168.2.182/Bindex/index',
hScrollBarEnabled:false,
vScrollBarEnabled:false,
}, {
name : 'group_frame2',
url : 'http://192.168.2.182/Bindex/money',
hScrollBarEnabled:false,
vScrollBarEnabled:false,
}, {
name : 'group_frame3',
url : 'widget://html/business/transaction/transaction.html',
pageParam : {
bottomH : bottomPos.h
}
}, {
name : 'my',
url : 'http://192.168.2.182/Bindex/my',
hScrollBarEnabled:false,
vScrollBarEnabled:false,
}]
}, function (ret, err) {
var index = ret.index;
openFrame(index);
if (index != 2) {
api.setFrameGroupAttr({
name: 'newGroup',
hidden: true
});
} else {
api.setFrameGroupAttr({
name: 'newGroup',
hidden: false
});
}
});
}
//切换frameGroup显示
function setFrameGroup(index) {
api.setFrameGroupIndex({
name: 'group',
index: index
});
if (index != 2) {
if (index == 3) {
var reload = 'nowdata();';
api.execScript({
name:'userindex',
frameName:'my',
script: reload
});
}
if (index == 1) {
var reload = 'nowdata();';
api.execScript({
name:'userindex',
frameName:'group_frame2',
script: reload
});
}
if (index == 0) {
var reload = 'nowdata();';
api.execScript({
name:'userindex',
frameName:'home',
script: reload
});
}
}
}
|
-
|