请选择 进入手机版 | 继续访问电脑版
帖子
帖子
用户
博客
课程
显示全部楼层
25
帖子
0
勋章
157
Y币

[其他] openFrameGroup

[复制链接]
发表于 2018-12-24 11:25:51
同样的代码怎么安卓就成这样了
385400344706258050.jpg
355757161937697855.jpg
175
帖子
1
勋章
5678
Y币
全量同步一下试试
25
帖子
0
勋章
157
Y币
得呤 发表于 2018-12-24 11:29
全量同步一下试试

就是全部同步后的
175
帖子
1
勋章
5678
Y币
复现一下代码
25
帖子
0
勋章
157
Y币

var eFootLis = $api.domAll('.footerPart')
    for (var i = 0; i < eFootLis.length; i++) {
        $api.addEvt(eFootLis, 'click', function() {
            randomSwitchBtn(this)
            funIniGroup(this)
        });
    }

};

function funIniGroup(index) {
    var content = $api.dom('.content').offsetHeight
    var header = $api.dom('.header').offsetHeight
    var height = content + header;
    // var index = 0
    api.openFrameGroup({
        name: 'group',
        scrollEnabled: false,
        rect: {
            x: 0,
            y: 0,
            w: api.winWidth,
            h: height
        },
        index: index,
        frames: [{
            name: 'choose',
            url: 'html/choose.html'
        }, {
            name: 'appraise',
            url: 'html/appraise.html'
        }, {
            name: 'history',
            url: 'html/history.html'
        }, {
            name: 'own',
            url: 'html/own.html'
        }],
    }, function(ret, err) {
        if (ret) {
            var index = ret.index
            if (index == 2) {
                api.openFrame({
                    name: 'history',
                    url: 'html/history.html',
                    reload: true,
                    rect: {
                        x: 0,
                        y: 0,
                        w: api.winWidth,
                        h: height
                    },
                });
            }
            if (index == 3) {
                api.openFrame({
                    name: 'own',
                    url: 'html/own.html',
                    reload: true,
                    rect: {
                        x: 0,
                        y: 0,
                        w: api.winWidth,
                        h: height
                    },
                });
            }
        } else {

        }
    });
}
// 随意切换按钮
function randomSwitchBtn(tag) {
    if (tag == $api.dom('.footer div.chooseT')) return;
    var eFootLis = $api.domAll('.footer div'),
        index = 0;
    for (var i = 0, len = eFootLis.length; i < len; i++) {
        if (tag == eFootLis) {
            index = i;
            if (index == 0) {
                $api.addCls(eFootLis, 'choose')
                $api.css($api.dom(".footer"), "background:rgba(85,85,85,0)")
            } else {
                $api.addCls(eFootLis, 'chooseT')
                $api.css($api.dom(".footer"), "background:rgba(85,85,85,1)")

            }
        } else {
            $api.removeCls(eFootLis, 'choose');
            $api.removeCls(eFootLis, 'chooseT')
        }
    }

    $api.addCls(eFootLis[index], 'active');
    api.setFrameGroupIndex({
        name: 'group',
        index: index
    });
}
146
帖子
3
勋章
3684
Y币
你寄几检查一下css样式啥的
您需要登录后才可以回帖 登录

本版积分规则