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

[云开发] oppo使用openframe打开这个页面卡死,js直接不运行

[复制链接]
发表于 2021-12-22 15:51:04
oppo具体型号为(oppo远程真机上有这个型号)
  • OPPO A57
  • 型号:OPPO A57
  • 分辨率:720x1280
  • 安卓版本:6.0.1
  • Color OS 版本:V3.0

我排除了样式、透明度都不是卡死的原因,还有什么可能引起的......
  1. <!DOCTYPE HTML>
  2. <html>
  3. <!-- 公告弹窗页面 -->
  4. <head>
  5.   <meta charset="utf-8">
  6.   <meta name="viewport"
  7.     content="maximum-scale=1.0, minimum-scale=1.0, user-scalable=0, initial-scale=1.0, width=device-width" />
  8.   <meta name="format-detection" content="telephone=no, email=no, date=no, address=no">
  9.   <title>notice</title>
  10.   <link rel="stylesheet" type="text/css" href="../../css/api.css" />
  11.   <link rel="stylesheet" type="text/css" href="../../css/aui.css" />
  12.   <link rel="stylesheet" type="text/css" href="../../css/common.css" />
  13.   <style>
  14.     body{
  15.       background-color: transparent;
  16.     }
  17.     .privacy_policy_pop {
  18.       position: absolute;
  19.       z-index: 10;
  20.     }

  21.     .privacy_policy_cover {
  22.       position: fixed;
  23.       top: 0;
  24.       left: 0;
  25.       right: 0;
  26.       bottom: 0;
  27.       background-color: rgba(0, 0, 0, .4);
  28.     }

  29.     .privacy_policy_container {
  30.       position: fixed;
  31.       top: 45%;
  32.       left: 50%;
  33.       transform: translate(-50%, -50%);
  34.       width: 80%;
  35.       background-color: #fff;
  36.       border: 1px;
  37.       border-radius: 0.2rem;
  38.       z-index: 11;
  39.     }

  40.     .privacy_policy_container .title {
  41.       text-align: center;
  42.       font-weight: bold;
  43.       font-size: 0.8rem;
  44.       padding: 1rem 0.5rem 0.5rem;
  45.     }

  46.     .privacy_policy_container>.content {
  47.       font-size: 0.7rem;
  48.       padding: 0rem 1rem 0.5rem;
  49.       text-indent: 2em;
  50.     }

  51.     .privacy_policy_container>.btn {
  52.       display: flex;
  53.       text-align: center;
  54.       border-top: 1px solid #dddddd;
  55.     }

  56.     .privacy_policy_container>.btn>div {
  57.       flex: 1;
  58.       font-size: 0.8rem;
  59.       padding: 0.5rem 0;
  60.     }

  61.     .privacy_policy_container>.btn>.success {
  62.       color: #007acc;
  63.       border-left: 1px solid #ddd;
  64.     }
  65.   </style>
  66. </head>

  67. <body>
  68.   <div class="privacy_policy_pop">
  69.     <div class="privacy_policy_cover"></div>
  70.     <div class="privacy_policy_container">
  71.       <div id="notice_title" class="title">
  72.       </div>
  73.       <div id="notice_content" class="content">
  74.       </div>
  75.       <div class="btn">
  76.         <div class="exit" tapmode onclick="exit()">知道了</div>
  77.         <div class="success" tapmode onclick="onNoticeDetail()">详情</div>
  78.       </div>
  79.     </div>
  80.   </div>
  81. </body>
  82. <script type="text/javascript" src="../../script/api.js"></script>
  83. <script type="text/javascript" src="../../script/model.js"></script>
  84. <script type="text/javascript" src="../../script/service.js"></script>
  85. <script type="text/javascript">
  86.   var pageParam, user, data;

  87.   apiready = function () {
  88.     alert('+++')
  89.     pageParam = api.pageParam;
  90.     user = pageParam.user;
  91.     data = pageParam.data;
  92.    
  93.     initKey(getKeyObj(user));
  94.     alert(1)
  95.     $api.html($api.byId('notice_title'),data.title)
  96.     $api.html($api.byId('notice_content'),data.abstract)
  97.     alert(2)
  98.   };

  99.   /** 关闭公告并记录弹窗不再弹出 */
  100.   var exit = function(){
  101.     alert(3)
  102.     var url = me.notice.recordCloseNotice(user.childId || '',user.sellerId || '',user.accountType);
  103.     var callback = new CommonCallback(
  104.       function (ret) {
  105.         api.closeFrame();
  106.       },
  107.       function (ret) {
  108.         api.closeFrame();
  109.         api.toast({msg:ret.msg})
  110.       },
  111.       function (err) {
  112.         api.closeFrame();
  113.         api.toast({msg:err.msg})
  114.       },
  115.     );
  116.     commonGet(url, callback);
  117.     api.refreshHeaderLoadDone();
  118.   }

  119.   /** 详细按钮 */
  120.   var onNoticeDetail = function(){
  121.     var url = me.notice.recordCloseNotice(user.childId || '',user.sellerId || '',user.accountType);
  122.     var callback = new CommonCallback(
  123.       function (ret) {
  124.         api.openWin({
  125.             name: 'mine_notice_detail',
  126.             url: '../mine/mine_notice_detail.html',
  127.             pageParam: {
  128.               user: user,
  129.               id:data.id,
  130.               url:data.url
  131.             }
  132.         });
  133.         api.closeFrame();
  134.       },
  135.       function (ret) {
  136.         api.closeFrame();
  137.         api.toast({msg:ret.msg})
  138.       },
  139.       function (err) {
  140.         api.closeFrame();
  141.         api.toast({msg:err.msg})
  142.       },
  143.     );
  144.     commonGet(url, callback);
  145.     api.refreshHeaderLoadDone();
  146.   }

  147. </script>

  148. </html>
复制代码





380
帖子
4
勋章
6
Y币
js 文件逐个注释排查一下
62
帖子
2
勋章
1233
Y币
js文件也排查过了 不是
技术支持-F · 2021-12-22 15:59js 文件逐个注释排查一下
380
帖子
4
勋章
6
Y币
本页面中的js 排查了吗
mow8 · 2021-12-22 16:04js文件也排查过了 不是
62
帖子
2
勋章
1233
Y币
懒得排查,要疯狂打包去远程真机测试,打包都N次了,改用了api.confirm,从根本性上解决问题
技术支持-F · 2021-12-22 16:37本页面中的js 排查了吗
您需要登录后才可以回帖 登录

本版积分规则