apiready = function() { var ctrl = { init : {}, bind : {}, }; ctrl.init = function() { // 适配安卓状态栏 CommonModel.fitInStatusBar(); ctrl.bind(); } ctrl.bind = function() { //点击返回按钮 $api.addEvt($api.dom("#back"), "touchend", function() { api.closeWin(); }) //打开frame var id = api.pageParam.ticketId; //计算frame显示的位置和尺寸 var windowWidth = parseInt($api.cssVal($api.dom("body"), "width")); var windowHeight = parseInt($api.cssVal($api.dom("body"), "height")); var headerHeight = parseInt($api.cssVal($api.dom("#header"), "height")); var frameX = 0; var frameY = headerHeight; var frameWidth = windowWidth; var frameHeight = windowHeight - headerHeight; api.openFrame({ name: 'workTicketDetailFrame', url: './workTicketDetailFrame.html', rect: { x: frameX, y: frameY, w: frameWidth, h: frameHeight }, scaleEnabled:true, pageParam: { id: id } }); } ctrl.init(); }