×

注意!页面内容来自https://ask.dcloud.net.cn/question/123836,本站不储存任何内容,为了更好的阅读体验进行在线解析,若有广告出现,请及时反馈。若您觉得侵犯了您的利益,请通知我们进行删除,然后访问 原网页

<> .markdown-body img { display: none; } .center_image { max-width: 800px !important; text-align: center; } .show_span { margin-left: 10px; } .label_show_span { margin-left: 8px; } .new_bug_show { margin-top: 20px; } .label_show_span.markitup-box .label_show_span { font-size: 16px; margin-left: 0; } .markdown-body { margin: 20px 0; } .aw-comment-detail img { max-width: 100%; } <> .markdown-body h2 { border-bottom: none; } .markitup-box a { color: #428bca; } .ai-tag { font-size: 12px; color: #ccc; } .aw-replay-box-control .btn { line-height: normal; } .robot-quick-answer { margin-left: 10px; } .aw-thanks { color: #22ac38; } .aw-thanks .fa.fa-heart { color: #22ac38; } .aw-suspend-panel { position: fixed; top: 200px; margin-left: -70px; } .aw-suspend-panel .aw-panel-btn { padding: 10px; background: #eee; border-radius: 50%; margin-top: 10px; } .aw-suspend-panel .aw-panel-btn a:visited.aw-suspend-panel .aw-panel-btn a:focus.aw-suspend-panel .aw-panel-btn a:hover { text-decoration: none; color: #999; } .content-box { padding: 16px; overflow: auto; font-size: 14px; line-height: 1.45; border-radius: 5px; border: 1px solid #ccc; margin-bottom: 30px; overflow: hidden; } .content-inner-p { width: 50%; line-height: 2; float: left; } .content-inner-p > span:first-child { display: inline-block; width: 200px; color: #333; font-size: 14px; font-weight: bold; } .title-line { position: relative; color: #333; font-size: 14px; padding-left: 40px; margin: 20px 0; /* border-bottom: 1px #dfe6df solid; */ } .title-line::after { content: ''; position: absolute; top: 0; bottom: 0; left: 0; margin: auto 0; height: 1px; width: 100%; background-color: #dfe6df; z-index: -1; } .title-line span { padding: 0 15px; background-color: #fff; z-index: 2; } .aw-mod-body{ word-wrap: break-word; } .paid-tip { color: red; position: relative; font-size: 9px; } .paid-tip .paid-level { width: 10px !important; height: 10px !important; position: relative !important; border-radius: 50% !important; left: 0 !important; top: 0 !important; background-color: red; margin-right: 4px; padding: 2px; } .paid-tip .paid-level.paid-level-3{ background: url("//img-cdn-tc.dcloud.net.cn/static/common/sponsor-3.png") no-repeat; background-size: 100% 100%; /*background-color: #fb6f18;*/ } .paid-tip .paid-level.paid-level-2 { background-color: #ffb400; } .paid-tip .paid-level.paid-level-1{ background-color: #bbc0f0; } .paid-tip .paid-text-1{ color: #bbc0f0; } .paid-tip .paid-text-2{ color: #ffb400; } .paid-tip .paid-text-3{ color: #fb6f18; } .vote-mode a.active .fa-thumbs-down{ color: #c7254e; }
yuntun
yuntun
  • 发布:2021-05-26 10:30
  • 更新:2021-05-26 10:36
  • 阅读:1246

uniapp编译的H5的套壳安卓app问题

分类:uni-app

最近的在做一个uniapp编译的h5嵌套安卓壳子的收银台项目,目前在做称重功能,安卓那边给了两个方法,说称重台上有东西就会给这两个方法返回重量数据,但是我弄了很久都没有接收到重量数据,后来安卓给了两个方法,调用一次就返回重量数据,就是说我这边需要用定时器不断地调用这两个方法,然后给我返回重量数据,我再赋值到data中,这种方法虽然效果立竿见影,解决了之前获取不到重量参数的问题,但是随之而来的负面影响就是页面卡顿的问题,想请问一下这种频繁使用定时器和往data里面赋值导致页面卡顿的问题,到底怎么解决??求帮助,先谢谢了。

2021-05-26 10:30 负责人:无 分享
已邀请:
yuntun

yuntun (作者)

我尝试过用new Worker来写,但是编译成H5之后就几乎没反应了

  • 深海智行

    https://www.npm.com/package/worker-loader

    2021-05-28 17:21

该问题目前已经被锁定无法添加新回复

<> .bdqctloud_div { padding-top: 20px; margin-bottom: 20px; border: 1px dashed #cccccc; position: relative; border-left: none; border-right: none; padding-bottom: 20px; padding-left: 20px; } .bdqctloud_left { position: relative; margin-left: 3vw; width: 500px; } .bdqctloud_articel{ position: relative; margin-left: 2vw; width: 500px; } .dcloud_news { color: #f9f9f9 !important; cursor: default; } .aw-footer .divider { margin-left: 10px; margin-right: 10px; } /*.ad_dev_right{*/ /* position: relative;*/ /* left: 580px;*/ /* top: 25px;*/ /*}*/