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>
熱點內容