PHP扫一扫
发布时间: 2024-06-19 13:25:54
1. PHP网页使用扫一扫功能如何实现
<!DOCTYPEhtml>
<htmlclass="umlandscapemin-width-240pxmin-width-320pxmin-width-480pxmin-width-768pxmin-width-1024px">
<head>
<title></title>
<metacharset="utf-8">
<metaname="viewport"content="target-densitydpi=device-dpi,width=device-width,initial-scale=1,user-scalable=no,minimum-scale=1.0,maximum-scale=1.0">
<linkrel="stylesheet"href="css/fonts/font-awesome.min.css">
<linkrel="stylesheet"href="css/ui-box.css">
<linkrel="stylesheet"href="css/ui-base.css">
<linkrel="stylesheet"href="css/ui-color.css">
<linkrel="stylesheet"href="css/appcan.icon.css">
<linkrel="stylesheet"href="css/appcan.control.css">
</head>
<bodyclass="um-vp"ontouchstart>
<divid="page_0"class="upubub-verbc-bg"tabindex="0">
<!--header开始-->
<divid="header"class="uhbc-text-heabbc-head">
<divclass="nav-btn"id="nav-left">
<divclass="fafa-angle-leftfa-2x"></div>
</div>
<h1class="utub-f1ulev-3ut-stx-c"></h1>
<divclass="nav-btnnav-bt"id="nav-right"></div>
</div>
<!--header结束-->
<!--content开始-->
<divid="content"class="ub-f1tx-l">
<inputtype="hidden"name="hdid"id="hdid"/>
活动名称:<spanid="spnhdmc"></span><br/>
活动内容:<spanid="spnhdnr"></span><br/>
活动时间:<spanid="spnhdsj"></span><br/>
组织单位:<spanid="spnhddw"></span><br/>
<divclass="btnubub-acbc-text-heab-pcbc-btnuc-a1"id="btnintiactive">登记提交</div>
</div>
<!--content结束-->
</div>
<scriptsrc="js/appcan.js"></script>
<scriptsrc="js/appcan.control.js"></script>
</body>
<script>
window.uexOnload=function(){
uexScanner.cbOpen=ScannerSuccessCallBack;
uexScanner.open();
setData();
}
functionsetData(){
varjsonData='{"lineImg":"res://line.png","pickBgImg":"res://pick_bg.png","tipLabel":"对准二维码/条形码,即可自动扫描","title":"扫一下"}';
uexScanner.setJsonData(jsonData);
}
(opCode,dataType,data){
varobj=eval('('+data+')');
//varjsdata=(newFunction("return"+obj.code))();
varjsonitem=eval('('+obj.code+')');
$('#hdid').val(jsonitem.hdid);
$('#spnhdmc').html(jsonitem.hdmc);
$('#spnhdnr').html(jsonitem.hdnr);
$('#spnhdsj').html(jsonitem.hdsj);
$('#spnhddw').html(jsonitem.hddw);
}
/*
appcan.ready(function(opCode,dataType,data){
uexScanner.cbOpen=function(){
varobj=eval('('+data+')');
//varjsdata=(newFunction("return"+obj.code))();
varjsonitem=eval('('+obj.code+')');
$('#hdid').val(jsonitem.hdid);
$('#spnhdmc').html(jsonitem.hdmc);
$('#spnhdnr').html(jsonitem.hdnr);
$('#spnhdsj').html(jsonitem.hdsj);
$('#spnhddw').html(jsonitem.hddw);
}
uexScanner.open();
varjsonData='{"lineImg":"res://line.png","pickBgImg":"res://pick_bg.png","tipLabel":"对准二维码/条形码,即可自动扫描","title":"扫一下"}';
uexScanner.setJsonData(jsonData);
})
*/
</script>
</html>
热点内容