帖子
帖子
用户
博客
课程
显示全部楼层
114
帖子
2
勋章
565
Y币

[多端开发] openFrame can not find file

[复制链接]
发表于 2021-12-24 17:29:35
api.openFrame({
                name: 'c_top',
                url: './c_top.html',
                rect: {
                        x: 0,
                        y: 0,
                        w: api.winWidth,
                        h:  285
                        },
                               
        })
自定义Loader后在ios上显示无误,到安卓上就Error! Can Not Find File:c_top.html,全量了好几遍,都没有效果
这个我们测试一下,应该没问题的
114
帖子
2
勋章
565
Y币
本帖最后由 Cover-L 于 2021-12-27 10:08 编辑

没问题我也不会发帖子的啊,这个页面上我写有两个openFrame,头一个也是提示找不到,全量一遍后就好了,第二个在ios上显示无误,但安卓上就提示找不到了,开始我也以为是全量的问题,紧接着全量了好几遍,还是不行,到别的页面打开这个第二个openFrame也是这样,我想知道openFrame的页面是不是有特别需要注意的,这个页面是一个正常的HTML页面,引用了api.js,下面是页面代码,帮看看是哪里有问题页面代码:

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }

    .img_box {
        width: 100%;
        height: 275px;
    }

    .img {
        width: 100%;
        height: 100%;
        filter: blur(3px);
    }

    .img_cover {
        width: 100%;
        height: 100%;
        padding: 0 15px;
        position: absolute;
        top: 0;
        left: 0;
        z-index: 9;
    }

    .img_top,
    .img_contetnt {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .img_top {
        margin-top: 50px;
    }

    .back_box {
        width: 50px;
        height: 50px;
        position: relative;
    }

    .back {
        width: 30px;
        height: 30px;
        background-color: rgba(0, 0, 0, .3);
        border-radius: 50%;
        position: absolute;
        top: 50%;
        left: 50%;
        margin: -15px 0 0 -15px;
    }

    .back2 {
        width: 30px;
        height: 30px;

        border-radius: 50%;
        position: absolute;
        top: 50%;
        left: 50%;
        margin: -15px 0 0 -15px;
    }

    .back_img {
        width: 30px;

    }

    .img_title {
        font-size: 20px;
        font-weight: bold;
        line-height: 50px;
        color: #FFF9F5;

    }

    .img_contetnt {
        margin-top: 20px;
    }

    .contetnt_img {
        width: 90px;
        height: 130px;
        background: rgba(0, 0, 0, 0);
        box-shadow: 3px 3px 0px #DCD0CF;

        border-radius: 8px;
    }

    .img_desc {
        margin-left: 15px;
        padding-top: 12px;
    }

    .gard_title {
        font-size: 15px;
        font-weight: bold;
        line-height: 20px;
        color: #FFF9F5;

    }

    .gard_name {
        font-size: 18px;
        font-weight: bold;
        line-height: 36px;
        color: #FFF9F5;
        margin-bottom: 5px;
    }

    .gard_desc {
        font-size: 10px;
        font-weight: 400;
        line-height: 15px;
        color: #FFF9F5;

    }
</style>

<body>
    <div class="img_box">
        <img class="img" id="img" src="" alt="">
        <div class="img_cover">
            <div class="img_top">
                <div class="back_box">
                    <div class="back">
                        <img class="back_img" src="../../../images/study/fh@2x.png" alt="">
                    </div>
                </div>
                <span class="img_title">课程详情</span>
                <div class="back_box">
                    <div class="back2">
                        <img class="back_img" src="../../../images/study/kf@2x.png" alt="">
                    </div>
                </div>

            </div>

            <div class="img_contetnt">
                <img class="contetnt_img" id="img2" src="" alt="">

                <div class="img_desc">
                    <div class="gard_title" id="gard_title">

                    </div>

                    <div class="gard_desc"> 能力增加……</div>
                </div>

            </div>
        </div>
    </div>
    <script src="../../../script/api.js"></script>
    <script>
        function apiready() {
            var text = api.pageParam.text
            var img = api.pageParam.img
            document.getElementById('gard_title').innerText= text
            document.getElementById('img').src= img
            document.getElementById('img2').src= img
        }
        function back() {
            api.closeWin()
        }
        function gotokefu() {
            console.log(544554);
            api.openWin({
                name: 'qrcode',
                url: '../../column-user/user-set/qrcode.stml',
            })
        }
    </script>
</body>

</html>
特特法爷 · 2021-12-24 23:06这个我们测试一下,应该没问题的

您需要登录后才可以回帖 登录

本版积分规则