详细问题描述(DCloud产品不会有明显的bug,所以你遇到的问题大都是在特定环境下才能重现的问题,请仔细描述你的环境和重现方式,否则DCloud很难排查解决你的问题)
[内容]
重现步骤
[步骤]在5+SDK生成的页面中,barcode插件加入页面打开中某个中间位置
[结果]barcode并未随页面滚动而移动
[期望]barcode在文档中有position:static时会跟页面滚动
[如果语言难以表述清晰,可以拍一个视频或截图,有图有真相]
IDE运行环境说明
[HBuilder 或 HBuilderX]
[IDE版本号]
[windows版本号]
[mac版本号]
App运行环境说明
[Android版本号]
[iOS版本号]
[手机型号]
[模拟器型号]
附件
[IDE问题请提供HBuilderX运行日志。菜单帮助-查看运行日志,点右键打开文件所在目录,将log文件压缩成zip包上传]
<!--#include file="head.asp"-->
<header class="mui-bar mui-bar-nav">
<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left" id="nav_back"></a>
<h1 class="mui-title">借出</h1>
</header>
<script type="text/javascript" >
var barScan;
// 扩展API加载完毕后调用onPlusReady回调函数
document.addEventListener( "plusready", onPlusReady, false );
// 扩展API加载完毕,现在可以正常调用扩展API
function onPlusReady() {
plus.key.addEventListener("backbutton", onback);
var filter = [plus.barcode.QR];
if(barScan == null)
barScan = new plus.barcode.Barcode("scanArea", filter,{scanbarColor:'#ff0000'});
barScan.onmarked = function(type, code, file) {
// var result = "type"+type+"<br/>code:"+code+"<br/>file:"+file;
barScan.cancel();
// barScan.close();
$("#ProId").val(code);
$("#submit_btn").click();
setTimeout("onPlusReady()", 200);
};
barScan.start(); //开始扫描
}
function onback() {
barScan.cancel();
barScan.close();
}
$("#nav_back").click(function(){
onback();
})
</script>
<div class="mui-content">
<ul class="mui-table-view">
<li class="mui-table-view-cell">
<a style="text-align: center;">
扫描
</a>
</li>
<li class="mui-table-view-cell">
<a >
<input type="text" class="mui-input-clear mui-input" name="ProId" id="ProId" />
</a>
<div class="set-sender-top sign-top">
<div id="scanContainer" style="width:90%; height:300px; border:1px solid red; margin:0 auto;background: #000000;">
<div id="scanArea" style="width:99%; height:99%;"></div>
</div>
</div>
</li>
</ul>
<ul class="mui-table-view con">
<li class="mui-table-view-cell">
<a style="text-align: center;">
需携带工器具
</a>
</li>
<li class="mui-table-view-cell">
<a style="text-align: center;">
<%proSort%>
</a>
</li>
<li class="mui-table-view-cell">
<a style="text-align: center;">
已携带工器具
</a>
</li>
<li class="mui-table-view-cell">
<a style="text-align: center;">
<%=QingDanPro(r_("qdid"))%>
</a>
</li>
</ul>
<ul class="mui-table-view" style="margin-top: 15px;text-align: center;padding: 15px 0;">
<input type="hidden" class="submits" id="submit_btn" value="提交">
<input id="outQingdan" type="button" onclick="location='outQingdan.asp?qdid=<%=r_("qdid")%>'" value="查看清单">
</ul>
</div>
<script type="text/javascript">
$(function(){
out();
$(document).on("click", ".ProIdDel", function(){
var delId=$(this).val();
// alert(delId);
$.post("outProDelAjax.asp", { id:delId, QDid: "<%=int_(r_("qdid"))%>" },function(data){
if(data==1){
out();
}else if(data==2){
alert('不要重复删除');
}else{
alert('无权限');
}
});
});
});
$("#outQingdan").click(function(){
onback();
})
$(".submits").click(function(){
var ProId=$("input[name='ProId']").val();
$.post("outProAjax.asp", { ProId: ProId, QDid: "<%=int_(r_("qdid"))%>",uid: "<%=int_(session("id"))%>" },
function(data){
if(data==1){
out();
}else if(data==2){
alert('无权限');
}else{
alert('不要重复扫描');
}
});
// var ajaxurl; ajaxurl='outProAjax.asp?ProId='+ProId+'&QDid=<%=int_(r_("qdid"))%>&uid=<%=int_(session("id"))%>';
// htmlobj=$.ajax({url:ajaxurl,async:false});
});
function out(){
var ajaxurl;
ajaxurl='outAjax.asp?QDid=<%=r_("qdid")%>';
htmlobj=$.ajax({url:ajaxurl,async:false});
$(".con").html(htmlobj.responseText);
}
var barcode = null;
function onmarked(type, result) {
var text = '未知: ';
switch(type){
case plus.barcode.QR:
text = 'QR: ';
break;
case plus.barcode.EAN13:
text = 'EAN13: ';
break;
case plus.barcode.EAN8:
text = 'EAN8: ';
break;
}
alert( text+result );
}
</script>
<%
function proSort()
dim cxsortid,cxProSortid,cxProSL
cxsortid=openrs_("select cxsortid from cxQingDan where cxid="&r_("qdid"))
cxProSortid=openrs_("select cxProSortid from cxQingDanSort where cxid="&cxsortid)
cxProSL=openrs_("select cxProSL from cxQingDanSort where cxid="&cxsortid)
'Response.Write cxsortid&"<hr>"&cxProSortid&"<hr>"&cxProSL&"<hr>"
Response.Write QingDanList(cxProSortid,cxProSL)
end function
Function QingDanList(ProSortid,ProSL)
dim pid,psl,ProSLi,pid1,psl1,data
data=""
if ProSL<>"" then
pid=qudian(ProSortid)
psl=qudian(ProSL)
if instr(ProSL,",")>0 then
pid1=split(pid,",")
psl1=split(psl,",")
for ProSLi= 0 to ubound(psl1)
Response.Write commonZd("cxsortcn","cxproductsort","cxid="&pid1(ProSLi))&"*"&psl1(ProSLi)&"-----"
if QingDanProCount(pid1(ProSLi),psl1(ProSLi))>=psl1(ProSLi) then
Response.Write "<span Class='mui-icon mui-icon-checkmarkempty'></span>"
Else
Response.Write "<span Class='mui-icon mui-icon-closeempty'></span>"
end if
Response.Write "<br/>"
next
Else
Response.Write commonZd("cxsortcn","cxproductsort","cxid="&pid1)&"*"&psl1&"-----"
if QingDanProCount(pid1,psl1)>=psl1 then
Response.Write "<span Class='mui-icon mui-icon-checkmarkempty'></span>"
Else
Response.Write "<span Class='mui-icon mui-icon-closeempty'></span>"
end if
Response.Write "<br/>"
end if
end if
end Function
function QingDanProCount(pid,psl)
dim rs,sql,data,i:i=1
set rs=server.CreateObject("adodb.recordset")
sql="select * from cxproductsort where cxid="&pid&""
rs.open sql,conn,1,1
if not rs.eof then
dim cxid
do until rs.eof
cxid = openrs__("Select cxid from cxproduct where cxsortid="&rs("cxid")&"")
'Response.Write cxid&"<hr>"
if cxid<>"" then
QingDanProCount=openrs_("Select count(*) from cxQingDanPro where cxProId in ("&qudian(cxid)&") and cxQDid="&r_("qdid")&"")&"<hr>"
Else
QingDanProCount=0
end if
rs.movenext
i=i+1
loop
end if
rs.close
set rs=nothing
end function
function QingDanPro(id)
dim rs,sql,data,i:i=1
set rs=server.CreateObject("adodb.recordset")
sql="select * from cxQingDanPro where cxQDid="&id&""
rs.open sql,conn,1,1
if not rs.eof then
do until rs.eof
data=data&openrs_("Select cxtitlecn from cxproduct where cxid="&rs("cxProId"))&"<button value='"&rs("cxid")&"' type='button' class='mui-btn mui-btn-primary ProIdDel'>删除</button><br>"
rs.movenext
i=i+1
loop
QingDanPro=data
end if
rs.close
set rs=nothing
end function
%>
<script>
</script>
[安装包]
联系方式
[QQ]