|
[云开发]
求助,安卓打开经常会出现 页面显示一办
[复制链接]
安卓关掉再开,经常会出现打开是这样,这是哪里写错了!
代码:
- <script type="text/javascript">
- apiready = function () {
- var $header = $api.dom('header');
- $api.fixIos7Bar($header);
- var $body = $api.dom('body');
- var $footer = $api.byId('footer');
- var header_h = $api.offset($header).h;
- var body_h = $api.offset($body).h;
- var footer_h = $api.offset($footer).h;
- var rect_h = body_h - header_h - footer_h;
- var user = $api.getStorage('map');
- //判断用户是否登入
- if(user){
- api.openFrameGroup({
- name: 'group',
- scrollEnabled: false,
- rect: {x: 0, y: header_h, w: 'auto', h: rect_h},
- index: 0,
- frames: [
- {
- name: 'news',
- url: '../html/news.html'
- },
- {
- name: 'Yw',
- url: '../html/Yw.html'
- },
- {
- name: 'frame3',
- url: '../html/frame3.html'
- },
- {
- name: 'about',
- url: '../html/about.html'
- }
- ]
- }, function (ret, err) {
- });
-
- }else{
-
- api.openWin({
- name: 'index_login',
- url: '../html/Login.html',
- bounces: true,
-
- rect: {
- x: 0,
- y: header_h,
- w: 'auto',
- h: rect_h,
- }
- });
- }
- }
- // 随意切换按钮
- function randomSwitchBtn(obj, name, index) {
- var $header = $api.dom('header');
- var $titleBar = $api.domAll($header, '.topbar');
- for (var i = 0; i < $titleBar.length; i++) {
- $api.removeCls($titleBar[i], 'activebar');
- }
- $api.addCls($api.byId(name), 'activebar');
- var $footer = $api.byId('footer');
- var $footerBar = $api.domAll($footer, 'li');
- for (var j = 0; j < $footerBar.length; j++) {
- $api.removeCls($footerBar[j], 'active');
- }
- $api.addCls(obj, 'active');
- api.setFrameGroupIndex({
- name: 'group',
- index: index
- });
- }
- </script>
复制代码
|
|