App-Android(使用App+htnl5框架,解决消息推送兼容SignalR问题)
loulijun2021
2022-09-20 eb23a7c7faefe86330a88f9118b8211f6b86e75b
1.点检项目开发( 除提交功能外完成)
已修改22个文件
已添加8个文件
6379 ■■■■ 文件已修改
components/barcode_custom.html 163 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
components/barcode_scan.html 94 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
components/barcode_scan2.html 94 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
css/global.css 71 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
doc/barcode.html 590 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
js/common.js 473 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
js/global.js 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/login/index.html 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/sbgl/rcdj.html 457 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/sbgl/rcdj_back.html 493 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
plus/barcode.html 284 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
plus/barcode_custom.html 269 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
plus/barcode_scan.html 143 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
unpackage/cache/wgt/H5EDA0853/components/barcode_custom.html 163 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
unpackage/cache/wgt/H5EDA0853/components/barcode_scan.html 94 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
unpackage/cache/wgt/H5EDA0853/components/barcode_scan2.html 94 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
unpackage/cache/wgt/H5EDA0853/css/global.css 71 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
unpackage/cache/wgt/H5EDA0853/doc/barcode.html 590 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
unpackage/cache/wgt/H5EDA0853/js/common.js 473 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
unpackage/cache/wgt/H5EDA0853/js/global.js 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
unpackage/cache/wgt/H5EDA0853/pages/login/index.html 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
unpackage/cache/wgt/H5EDA0853/pages/sbgl/dqby.html 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
unpackage/cache/wgt/H5EDA0853/pages/sbgl/rcdj.html 462 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
unpackage/cache/wgt/H5EDA0853/pages/sbgl/rcdj_back.html 493 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
unpackage/cache/wgt/H5EDA0853/pages/sbgl/sbwx.html 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
unpackage/cache/wgt/H5EDA0853/pages/sbgl/wxyz.html 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
unpackage/cache/wgt/H5EDA0853/pages/xtsy/index.html 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
unpackage/cache/wgt/H5EDA0853/plus/barcode.html 284 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
unpackage/cache/wgt/H5EDA0853/plus/barcode_custom.html 269 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
unpackage/cache/wgt/H5EDA0853/plus/barcode_scan.html 143 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
components/barcode_custom.html
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,163 @@
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover" />
        <meta name="HandheldFriendly" content="true" />
        <meta name="MobileOptimized" content="320" />
        <title>Hello H5+</title>
        <script type="text/javascript" src="../js/common.js"></script>
        <script type="text/javascript">
            var ws = null,
                wo = null;
            var scan = null;
            // H5 plus事件处理
            function plusReady() {
                // èŽ·å–çª—å£å¯¹è±¡
                ws = plus.webview.currentWebview();
                nv = ws.getTitleNView();
                wo = ws.opener();
                // å¼€å§‹æ‰«æ
                ws.addEventListener('show', function() {
                    scan = new plus.barcode.Barcode('bcid', [plus.barcode.QR, plus.barcode.EAN8, plus.barcode.EAN13], {
                        frameColor: '#00FF00',
                        scanbarColor: '#00FF00'
                    });
                    scan.onmarked = onmarked;
                    scan.start({
                        conserve: true,
                        filename: '_doc/barcode/'
                    });
                    createSubview();
                }, false);
                // æ˜¾ç¤ºé¡µé¢å¹¶å…³é—­ç­‰å¾…框
                ws.show('pop-in');
            }
            document.addEventListener('plusready', plusReady, false);
            // äºŒç»´ç æ‰«ææˆåŠŸ
            function onmarked(type, result, file) {
                switch (type) {
                    case plus.barcode.QR:
                        type = 'QR';
                        break;
                    case plus.barcode.EAN13:
                        type = 'EAN13';
                        break;
                    case plus.barcode.EAN8:
                        type = 'EAN8';
                        break;
                    default:
                        type = '其它' + type;
                        break;
                }
                result = result.replace(/\r\n/g, '');
                wo.evalJS("scaned('" + type + "','" + result + "','" + file + "');");
                back();
            }
            // åˆ›å»ºå­çª—口
            var view = null;
            function createSubview() {
                view = new plus.nativeObj.View('nbutton', {
                    bottom: '20px',
                    left: '30%',
                    width: '40%',
                    height: '44px'
                }, [{
                    tag: 'rect',
                    id: 'rect',
                    rectStyles: {
                        radius: '8px',
                        color: 'rgba(255,0,0,0.8)'
                    }
                }, {
                    tag: 'font',
                    id: 'text',
                    text: '暂 停',
                    textStyles: {
                        color: '#FFFFFF'
                    }
                }]);
                // å¤„理事件
                view.addEventListener('click', function(e) {
                    switchScan();
                }, false);
                view.addEventListener('touchstart', function(e) {
                    view.drawRect({
                        radius: '8px',
                        color: 'rgba(255,0,0,0.5)'
                    }, {}, 'rect');
                }, false);
                view.addEventListener('touchend', function(e) {
                    view.drawRect({
                        radius: '8px',
                        color: 'rgba(255,0,0,0.8)'
                    }, {}, 'rect');
                }, false);
                ws.append(view);
            }
            // å¼€å…³é—ªå…‰ç¯
            var bFlash = false;
            var AVCaptureDevice = null;
            var Camera = null;
            function switchFlash() {
                bFlash = !bFlash;
                scan.setFlash(bFlash);
                ws.setStyle({
                    titleNView: {
                        buttons: [{
                            fontSrc: '_www/helloh5.ttf',
                            text: (bFlash ? '\ue400' : '\ue401'),
                            fontSize: '18px',
                            onclick: 'javascript:switchFlash()'
                        }]
                    }
                });
            }
            // åˆ‡æ¢æ‰«æ
            var bScan = false;
            function switchScan() {
                if (bScan) {
                    scan.start({
                        conserve: true,
                        filename: '_doc/barcode/'
                    });
                    view && (view.drawText('暂 停', {}, {
                        color: '#FFFFFF'
                    }, 'text'));
                } else {
                    scan.cancel();
                    view && (view.drawText('开 始', {}, {
                        color: '#FFFFFF'
                    }, 'text'));
                }
                bScan = !bScan;
            }
        </script>
        <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
        <style type="text/css">
            #bcid {
                width: 100%;
                position: absolute;
                top: 0px;
                bottom: 0px;
                text-align: center;
            }
            .tip {
                color: #FFFFFF;
                font-weight: bold;
                text-shadow: 0px -1px #103E5C;
            }
        </style>
    </head>
    <body style="background-color:#000000;">
        <div id="bcid">
            <div style="height:40%"></div>
            <p class="tip">...载入中...</p>
        </div>
    </body>
</html>
components/barcode_scan.html
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,94 @@
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover" />
        <meta name="HandheldFriendly" content="true" />
        <meta name="MobileOptimized" content="320" />
        <title>Hello H5+</title>
        <script type="text/javascript" src="../js/common.js"></script>
        <script type="text/javascript">
            var ws = null,
                wo = null;
            var scan = null;
            // H5 plus事件处理
            function plusReady() {
                // èŽ·å–çª—å£å¯¹è±¡
                ws = plus.webview.currentWebview();
                wo = ws.opener();
                // å¼€å§‹æ‰«æ
                ws.addEventListener('show', function() {
                    scan = new plus.barcode.Barcode('bcid');
                    scan.onmarked = onmarked;
                    scan.start({
                        conserve: true,
                        filename: '_doc/barcode/'
                    });
                    createSubview();
                }, false);
                // æ˜¾ç¤ºé¡µé¢å¹¶å…³é—­ç­‰å¾…框
                ws.show('pop-in');
            }
            document.addEventListener('plusready', plusReady, false);
            // äºŒç»´ç æ‰«ææˆåŠŸ
            function onmarked(type, result, file) {
                switch (type) {
                    case plus.barcode.QR:
                        type = 'QR';
                        break;
                    case plus.barcode.EAN13:
                        type = 'EAN13';
                        break;
                    case plus.barcode.EAN8:
                        type = 'EAN8';
                        break;
                    default:
                        type = '其它' + type;
                        break;
                }
                result = result.replace(/\r\n/g, '');
                // wo.evalJS("scaned('" + type + "','" + result + "','" + file + "');");
                wo.evalJS("scaned('" + result + "');");
                back();
            }
            // åˆ›å»ºå­çª—口
            function createSubview() {
                //
            }
            // ä»Žç›¸å†Œä¸­é€‰æ‹©äºŒç»´ç å›¾ç‰‡
            function scanPicture() {
                plus.gallery.pick(function(path) {
                    plus.barcode.scan(path, onmarked, function(error) {
                        plus.nativeUI.alert('无法识别此图片');
                    });
                }, function(err) {
                    console.log('Failed: ' + err.message);
                });
            }
        </script>
        <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
        <style type="text/css">
            #bcid {
                width: 100%;
                position: absolute;
                top: 0px;
                bottom: 0px;
                text-align: center;
            }
            .tip {
                color: #FFFFFF;
                font-weight: bold;
                text-shadow: 0px -1px #103E5C;
            }
        </style>
    </head>
    <body style="background-color:#000000;">
        <div id="bcid">
            <div style="height:40%"></div>
            <p class="tip">...载入中...</p>
        </div>
    </body>
</html>
components/barcode_scan2.html
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,94 @@
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover" />
        <meta name="HandheldFriendly" content="true" />
        <meta name="MobileOptimized" content="320" />
        <title>Hello H5+</title>
        <script type="text/javascript" src="../js/common.js"></script>
        <script type="text/javascript">
            var ws = null,
                wo = null;
            var scan = null;
            // H5 plus事件处理
            function plusReady() {
                // èŽ·å–çª—å£å¯¹è±¡
                ws = plus.webview.currentWebview();
                wo = ws.opener();
                // å¼€å§‹æ‰«æ
                ws.addEventListener('show', function() {
                    scan = new plus.barcode.Barcode('bcid');
                    scan.onmarked = onmarked;
                    scan.start({
                        conserve: true,
                        filename: '_doc/barcode/'
                    });
                    createSubview();
                }, false);
                // æ˜¾ç¤ºé¡µé¢å¹¶å…³é—­ç­‰å¾…框
                ws.show('pop-in');
            }
            document.addEventListener('plusready', plusReady, false);
            // äºŒç»´ç æ‰«ææˆåŠŸ
            function onmarked(type, result, file) {
                switch (type) {
                    case plus.barcode.QR:
                        type = 'QR';
                        break;
                    case plus.barcode.EAN13:
                        type = 'EAN13';
                        break;
                    case plus.barcode.EAN8:
                        type = 'EAN8';
                        break;
                    default:
                        type = '其它' + type;
                        break;
                }
                result = result.replace(/\r\n/g, '');
                // wo.evalJS("scaned('" + type + "','" + result + "','" + file + "');");
                wo.evalJS("scaned2('" + result + "');");
                back();
            }
            // åˆ›å»ºå­çª—口
            function createSubview() {
                //
            }
            // ä»Žç›¸å†Œä¸­é€‰æ‹©äºŒç»´ç å›¾ç‰‡
            function scanPicture() {
                plus.gallery.pick(function(path) {
                    plus.barcode.scan(path, onmarked, function(error) {
                        plus.nativeUI.alert('无法识别此图片');
                    });
                }, function(err) {
                    console.log('Failed: ' + err.message);
                });
            }
        </script>
        <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
        <style type="text/css">
            #bcid {
                width: 100%;
                position: absolute;
                top: 0px;
                bottom: 0px;
                text-align: center;
            }
            .tip {
                color: #FFFFFF;
                font-weight: bold;
                text-shadow: 0px -1px #103E5C;
            }
        </style>
    </head>
    <body style="background-color:#000000;">
        <div id="bcid">
            <div style="height:40%"></div>
            <p class="tip">...载入中...</p>
        </div>
    </body>
</html>
css/global.css
@@ -0,0 +1,71 @@
.head {
    background-color: aliceblue;
    padding-top: 10px;
    padding-bottom: 10px;
    margin: 5px 8px;
    display: flex;
    flex-direction: column;
}
.head_block {
    display: flex;
    justify-content: space-between;
}
.head_left {
    display: flex;
}
.head_bar {
    width: 5px;
    height: 20px;
    background-color: red;
}
.head_title {
    margin-left: 5px;
}
.flex_column {
    display: flex;
    flex-direction: column;
}
.flex_between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.flex_center {
    display: flex;
    align-items: center;
}
.center_title{
    font-weight: bolder;
}
.center_border {
    border: 1px solid #ccc;
    min-height: 50px;
    border-radius: 5px;
    margin: 15px 0 0 0;
    padding: 5px 0px 5px 10px;
}
.footer {
    position: fixed;
    bottom: 0;
    background-color: aliceblue;
    min-height: 100px;
    padding-top: 10px;
    margin: 5px 8px 0;
    width: 96%;
    padding-bottom: 10px;
    display: flex;
    flex-direction: column;
}
doc/barcode.html
@@ -1,81 +1,107 @@
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="HandheldFriendly" content="true">
<meta name="MobileOptimized" content="320">
<title>Barcode Document</title>
<link rel="stylesheet" type="text/css" href="res/doc.css" charset="utf-8">
<link rel="stylesheet" type="text/css" href="res/prettify.sons.css" charset="utf-8">
<script type="text/javascript" src="res/doc.js" charset="utf-8"></script><script type="text/javascript" src="res/prettify.js" charset="utf-8"></script>
</head>
<body><div id="content" class="content">
<h1><a name="plus.barcode">barcode</a></h1>
<p>Barcode模块管理条码(一维码和二维码)扫描识别,支持常见的一维码(如EAN13码)及二维码(如QR码)。通过调用设备的摄像头对条码进行扫描识别,扫描到条码后进行解码并返回码数据内容及码类型。</p>
<h2>常量:</h2>
<ul>
<li>
<a href="#plus.barcode.QR">QR</a>: QR二维码,数值为0</li>
<li>
<a href="#plus.barcode.EAN13">EAN13</a>: EAN条形码标准版,数值为1</li>
<li>
<a href="#plus.barcode.EAN8">EAN8</a>: ENA条形码简版,数值为2</li>
<li>
<a href="#plus.barcode.AZTEC">AZTEC</a>: Aztec二维码,数值为3</li>
<li>
<a href="#plus.barcode.DATAMATRIX">DATAMATRIX</a>: Data Matrix二维码,数值为4</li>
<li>
<a href="#plus.barcode.UPCA">UPCA</a>: UPC条形码标准版,数值为5</li>
<li>
<a href="#plus.barcode.UPCE">UPCE</a>: UPC条形码缩短版,数值为6</li>
<li>
<a href="#plus.barcode.CODABAR">CODABAR</a>: Codabar条形码,数值为7</li>
<li>
<a href="#plus.barcode.CODE39">CODE39</a>: Code39条形码,数值为8</li>
<li>
<a href="#plus.barcode.CODE93">CODE93</a>: Code93条形码,数值为9</li>
<li>
<a href="#plus.barcode.CODE128">CODE128</a>: Code128条形码,数值为10</li>
<li>
<a href="#plus.barcode.ITF">ITF</a>: ITF条形码,数值为11</li>
<li>
<a href="#plus.barcode.MAXICODE">MAXICODE</a>: MaxiCode二维码,数值为12</li>
<li>
<a href="#plus.barcode.PDF417">PDF417</a>: PDF 417二维条码,数值为13</li>
<li>
<a href="#plus.barcode.RSS14">RSS14</a>: RSS 14条形组合码,数值为14</li>
<li>
<a href="#plus.barcode.RSSEXPANDED">RSSEXPANDED</a>: æ‰©å±•式RSS条形组合码,数值为15</li>
</ul>
<h2>方法:</h2>
<ul>
<li>
<a href="#plus.barcode.scan">scan</a>: æ‰«ç è¯†åˆ«å›¾ç‰‡ä¸­çš„æ¡ç </li>
<li>
<a href="#plus.barcode.create">create</a>: åˆ›å»ºæ‰«ç è¯†åˆ«æŽ§ä»¶å¯¹è±¡</li>
<li>
<a href="#plus.barcode.getBarcodeById">getBarcodeById</a>: æŸ¥æ‰¾æ‰«ç è¯†åˆ«æŽ§ä»¶å¯¹è±¡</li>
</ul>
<h2>对象:</h2>
<ul>
<li>
<a href="#plus.barcode.Barcode">Barcode</a>: æ‰«ç è¯†åˆ«æŽ§ä»¶å¯¹è±¡</li>
<li>
<a href="#plus.barcode.BarcodeStyles">BarcodeStyles</a>: Barcode扫码控件样式</li>
<li>
<a href="#plus.barcode.BarcodeOptions">BarcodeOptions</a>: æ¡ç è¯†åˆ«æŽ§ä»¶æ‰«æå‚æ•°</li>
</ul>
<h2>回调方法:</h2>
<ul>
<li>
<a href="#plus.barcode.BarcodeSuccessCallback">BarcodeSuccessCallback</a>: æ‰«ç è¯†åˆ«æˆåŠŸå›žè°ƒå‡½æ•°</li>
<li>
<a href="#plus.barcode.BarcodeErrorCallback">BarcodeErrorCallback</a>: æ‰«ç è¯†åˆ«é”™è¯¯å›žè°ƒå‡½æ•°</li>
</ul>
<h2>权限:</h2>
<p>permissions</p>
<pre class="prettyprint linenums">
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
        <meta name="HandheldFriendly" content="true">
        <meta name="MobileOptimized" content="320">
        <title>Barcode Document</title>
        <link rel="stylesheet" type="text/css" href="res/doc.css" charset="utf-8">
        <link rel="stylesheet" type="text/css" href="res/prettify.sons.css" charset="utf-8">
        <script type="text/javascript" src="res/doc.js" charset="utf-8"></script>
        <script type="text/javascript" src="res/prettify.js" charset="utf-8"></script>
    </head>
    <body>
        <div id="content" class="content">
            <h1><a name="plus.barcode">barcode</a></h1>
            <p>Barcode模块管理条码(一维码和二维码)扫描识别,支持常见的一维码(如EAN13码)及二维码(如QR码)。通过调用设备的摄像头对条码进行扫描识别,扫描到条码后进行解码并返回码数据内容及码类型。</p>
            <h2>常量:</h2>
            <ul>
                <li>
                    <a href="#plus.barcode.QR">QR</a>: QR二维码,数值为0
                </li>
                <li>
                    <a href="#plus.barcode.EAN13">EAN13</a>: EAN条形码标准版,数值为1
                </li>
                <li>
                    <a href="#plus.barcode.EAN8">EAN8</a>: ENA条形码简版,数值为2
                </li>
                <li>
                    <a href="#plus.barcode.AZTEC">AZTEC</a>: Aztec二维码,数值为3
                </li>
                <li>
                    <a href="#plus.barcode.DATAMATRIX">DATAMATRIX</a>: Data Matrix二维码,数值为4
                </li>
                <li>
                    <a href="#plus.barcode.UPCA">UPCA</a>: UPC条形码标准版,数值为5
                </li>
                <li>
                    <a href="#plus.barcode.UPCE">UPCE</a>: UPC条形码缩短版,数值为6
                </li>
                <li>
                    <a href="#plus.barcode.CODABAR">CODABAR</a>: Codabar条形码,数值为7
                </li>
                <li>
                    <a href="#plus.barcode.CODE39">CODE39</a>: Code39条形码,数值为8
                </li>
                <li>
                    <a href="#plus.barcode.CODE93">CODE93</a>: Code93条形码,数值为9
                </li>
                <li>
                    <a href="#plus.barcode.CODE128">CODE128</a>: Code128条形码,数值为10
                </li>
                <li>
                    <a href="#plus.barcode.ITF">ITF</a>: ITF条形码,数值为11
                </li>
                <li>
                    <a href="#plus.barcode.MAXICODE">MAXICODE</a>: MaxiCode二维码,数值为12
                </li>
                <li>
                    <a href="#plus.barcode.PDF417">PDF417</a>: PDF 417二维条码,数值为13
                </li>
                <li>
                    <a href="#plus.barcode.RSS14">RSS14</a>: RSS 14条形组合码,数值为14
                </li>
                <li>
                    <a href="#plus.barcode.RSSEXPANDED">RSSEXPANDED</a>: æ‰©å±•式RSS条形组合码,数值为15
                </li>
            </ul>
            <h2>方法:</h2>
            <ul>
                <li>
                    <a href="#plus.barcode.scan">scan</a>: æ‰«ç è¯†åˆ«å›¾ç‰‡ä¸­çš„æ¡ç 
                </li>
                <li>
                    <a href="#plus.barcode.create">create</a>: åˆ›å»ºæ‰«ç è¯†åˆ«æŽ§ä»¶å¯¹è±¡
                </li>
                <li>
                    <a href="#plus.barcode.getBarcodeById">getBarcodeById</a>: æŸ¥æ‰¾æ‰«ç è¯†åˆ«æŽ§ä»¶å¯¹è±¡
                </li>
            </ul>
            <h2>对象:</h2>
            <ul>
                <li>
                    <a href="#plus.barcode.Barcode">Barcode</a>: æ‰«ç è¯†åˆ«æŽ§ä»¶å¯¹è±¡
                </li>
                <li>
                    <a href="#plus.barcode.BarcodeStyles">BarcodeStyles</a>: Barcode扫码控件样式
                </li>
                <li>
                    <a href="#plus.barcode.BarcodeOptions">BarcodeOptions</a>: æ¡ç è¯†åˆ«æŽ§ä»¶æ‰«æå‚æ•°
                </li>
            </ul>
            <h2>回调方法:</h2>
            <ul>
                <li>
                    <a href="#plus.barcode.BarcodeSuccessCallback">BarcodeSuccessCallback</a>: æ‰«ç è¯†åˆ«æˆåŠŸå›žè°ƒå‡½æ•°
                </li>
                <li>
                    <a href="#plus.barcode.BarcodeErrorCallback">BarcodeErrorCallback</a>: æ‰«ç è¯†åˆ«é”™è¯¯å›žè°ƒå‡½æ•°
                </li>
            </ul>
            <h2>权限:</h2>
            <p>permissions</p>
            <pre class="prettyprint linenums">
{
// ...
"permissions":{
@@ -86,9 +112,9 @@
}
}
            </pre>
<h1><a name="plus.barcode.Barcode">Barcode</a></h1>
<p>扫码识别控件对象</p>
<pre class="prettyprint linenums">
            <h1><a name="plus.barcode.Barcode">Barcode</a></h1>
            <p>扫码识别控件对象</p>
            <pre class="prettyprint linenums">
interface plus.barcode.Barcode {
    // Methods
    function void cancel();
@@ -102,37 +128,48 @@
    function void onmarked();
}
                </pre>
<h2>说明:</h2>
<p class="des">
    å¯é€šè¿‡plus.barcode.create创建,也可通过new plus.barcode.Barcode构造(仅在5+APP中使用)创建。
    æ‰«ç è¯†åˆ«æŽ§ä»¶å°†ä½¿ç”¨è®¾å¤‡çš„æ‘„像头预览扫描内容,在控件中显示扫描基准框等用户交互元素。
                </p>
<h2>构造:</h2>
<ul><li>
<a href="#plus.barcode.Barcode.Barcode.constructor(domId,%20filters,%20styles)">Barcode.constructor(domId, filters, styles)</a>: æž„造扫码识别控件</li></ul>
<h2>方法:</h2>
<ul>
<li>
<a href="#plus.barcode.Barcode.cancel">cancel</a>: å–消扫码识别</li>
<li>
<a href="#plus.barcode.Barcode.close">close</a>: å…³é—­æ¡ç è¯†åˆ«æŽ§ä»¶</li>
<li>
<a href="#plus.barcode.Barcode.setFlash">setFlash</a>: æ“ä½œé—ªå…‰ç¯</li>
<li>
<a href="#plus.barcode.Barcode.setStyle">setStyle</a>: è®¾ç½®æ‰«ç è¯†åˆ«æŽ§ä»¶çš„æ ·å¼</li>
<li>
<a href="#plus.barcode.Barcode.start">start</a>: å¼€å§‹æ‰«ç è¯†åˆ«</li>
</ul>
<h2>事件:</h2>
<ul>
<li>
<a href="#plus.barcode.Barcode.onmarked">onmarked</a>: æ‰«ç è¯†åˆ«æˆåŠŸäº‹ä»¶</li>
<li>
<a href="#plus.barcode.Barcode.onerror">onerror</a>: æ‰«ç è¯†åˆ«é”™è¯¯äº‹ä»¶</li>
</ul>
<h1><a name="plus.barcode.BarcodeStyles">BarcodeStyles</a></h1>
<p>Barcode扫码控件样式</p>
<pre class="prettyprint linenums">
            <h2>说明:</h2>
            <p class="des">
                å¯é€šè¿‡plus.barcode.create创建,也可通过new plus.barcode.Barcode构造(仅在5+APP中使用)创建。
                æ‰«ç è¯†åˆ«æŽ§ä»¶å°†ä½¿ç”¨è®¾å¤‡çš„æ‘„像头预览扫描内容,在控件中显示扫描基准框等用户交互元素。
            </p>
            <h2>构造:</h2>
            <ul>
                <li>
                    <a href="#plus.barcode.Barcode.Barcode.constructor(domId,%20filters,%20styles)">Barcode.constructor(domId,
                        filters, styles)</a>: æž„造扫码识别控件
                </li>
            </ul>
            <h2>方法:</h2>
            <ul>
                <li>
                    <a href="#plus.barcode.Barcode.cancel">cancel</a>: å–消扫码识别
                </li>
                <li>
                    <a href="#plus.barcode.Barcode.close">close</a>: å…³é—­æ¡ç è¯†åˆ«æŽ§ä»¶
                </li>
                <li>
                    <a href="#plus.barcode.Barcode.setFlash">setFlash</a>: æ“ä½œé—ªå…‰ç¯
                </li>
                <li>
                    <a href="#plus.barcode.Barcode.setStyle">setStyle</a>: è®¾ç½®æ‰«ç è¯†åˆ«æŽ§ä»¶çš„æ ·å¼
                </li>
                <li>
                    <a href="#plus.barcode.Barcode.start">start</a>: å¼€å§‹æ‰«ç è¯†åˆ«
                </li>
            </ul>
            <h2>事件:</h2>
            <ul>
                <li>
                    <a href="#plus.barcode.Barcode.onmarked">onmarked</a>: æ‰«ç è¯†åˆ«æˆåŠŸäº‹ä»¶
                </li>
                <li>
                    <a href="#plus.barcode.Barcode.onerror">onerror</a>: æ‰«ç è¯†åˆ«é”™è¯¯äº‹ä»¶
                </li>
            </ul>
            <h1><a name="plus.barcode.BarcodeStyles">BarcodeStyles</a></h1>
            <p>Barcode扫码控件样式</p>
            <pre class="prettyprint linenums">
interface plus.barcode.BarcodeStyles {
    attribute String background;
    attribute String frameColor;
@@ -145,80 +182,88 @@
    attribute String position;
}
                </pre>
<h2>说明:</h2>
<p class="des">
    è®¾ç½®Barcode扫码控件的样式,如扫码框、扫码条的颜色等。
                </p>
<h2>属性:</h2>
<ul>
<li>background: <em>(<font class="type">String</font>
    ç±»åž‹
)</em>条码识别控件背景颜色<br><p>
    é¢œè‰²å€¼æ”¯æŒ(参考CSS颜色规范):颜色名称(参考CSS Color Names)/十六进制值/rgb值,默认值为红色。
                        </p>
</li>
<li>frameColor: <em>(<font class="type">String</font>
    ç±»åž‹
)</em>扫码框颜色<br><p>
    é¢œè‰²å€¼æ”¯æŒ(参考CSS颜色规范):颜色名称(参考CSS Color Names)/十六进制值/rgb值/rgba值,默认值为红色。
                        </p>
</li>
<li>scanbarColor: <em>(<font class="type">String</font>
    ç±»åž‹
)</em>扫码条颜色<br><p>
    é¢œè‰²å€¼æ”¯æŒ(参考CSS颜色规范):颜色名称(参考CSS Color Names)/十六进制值/rgb值/rgba值,默认值为红色。
                        </p>
</li>
<li>top: <em>(<font class="type">String</font>
    ç±»åž‹
)</em>Barcode扫码控件左上角的垂直偏移量<br><p>
    å¯å–值:
        åƒç´ å€¼ï¼Œå¦‚"100px";
        ç™¾åˆ†æ¯”,如"10%",相对于父Webview窗口的高度;
        è‡ªåŠ¨è®¡ç®—ï¼Œå¦‚"auto",根据height值自动计算,相对于父Webview窗口垂直居中。
                        </p>
</li>
<li>left: <em>(<font class="type">String</font>
    ç±»åž‹
)</em>Barcode扫码控件左上角的水平偏移量<br><p>
    å¯å–值:
        åƒç´ å€¼ï¼Œå¦‚"100px";
        ç™¾åˆ†æ¯”,如"10%",相对于父Webview窗口的宽度;
        è‡ªåŠ¨è®¡ç®—ï¼Œå¦‚"auto",根据width值自动计算,相对于父Webview窗口水平居中。
    é»˜è®¤å€¼ä¸º"0px"。
                        </p>
</li>
<li>width: <em>(<font class="type">String</font>
    ç±»åž‹
)</em>Barcode扫码控件的宽度<br><p>
    å¯å–值:
        åƒç´ å€¼ï¼Œå¦‚"100px";
        ç™¾åˆ†æ¯”,如"10%",相对于父Webview窗口的宽度。
    é»˜è®¤å€¼ä¸º"100%"。
                        </p>
</li>
<li>height: <em>(<font class="type">String</font>
    ç±»åž‹
)</em>Barcode扫码控件的高度<br><p>
    å¯å–值:
        åƒç´ å€¼ï¼Œå¦‚"100px";
        ç™¾åˆ†æ¯”,如"10%",相对于父Webview窗口的高度。
    é»˜è®¤å€¼ä¸º"100%"。
                        </p>
</li>
<li>position: <em>(<font class="type">String</font>
    ç±»åž‹
)</em>Barcode扫码控件在Webview窗口的布局模式<br><p>
    å¯å–值:
        "static" - é™æ€å¸ƒå±€æ¨¡å¼ï¼Œå¦‚果页面存在滚动条则随窗口内容滚动;
        "absolute" - ç»å¯¹å¸ƒå±€æ¨¡å¼ï¼Œå¦‚果页面存在滚动条不随窗口内容滚动;
    é»˜è®¤å€¼ä¸º"static"。
                        </p>
</li>
</ul>
<h1><a name="plus.barcode.BarcodeOptions">BarcodeOptions</a></h1>
<p>条码识别控件扫描参数</p>
<pre class="prettyprint linenums">
            <h2>说明:</h2>
            <p class="des">
                è®¾ç½®Barcode扫码控件的样式,如扫码框、扫码条的颜色等。
            </p>
            <h2>属性:</h2>
            <ul>
                <li>background: <em>(<font class="type">String</font>
                        ç±»åž‹
                        )</em>条码识别控件背景颜色<br>
                    <p>
                        é¢œè‰²å€¼æ”¯æŒ(参考CSS颜色规范):颜色名称(参考CSS Color Names)/十六进制值/rgb值,默认值为红色。
                    </p>
                </li>
                <li>frameColor: <em>(<font class="type">String</font>
                        ç±»åž‹
                        )</em>扫码框颜色<br>
                    <p>
                        é¢œè‰²å€¼æ”¯æŒ(参考CSS颜色规范):颜色名称(参考CSS Color Names)/十六进制值/rgb值/rgba值,默认值为红色。
                    </p>
                </li>
                <li>scanbarColor: <em>(<font class="type">String</font>
                        ç±»åž‹
                        )</em>扫码条颜色<br>
                    <p>
                        é¢œè‰²å€¼æ”¯æŒ(参考CSS颜色规范):颜色名称(参考CSS Color Names)/十六进制值/rgb值/rgba值,默认值为红色。
                    </p>
                </li>
                <li>top: <em>(<font class="type">String</font>
                        ç±»åž‹
                        )</em>Barcode扫码控件左上角的垂直偏移量<br>
                    <p>
                        å¯å–值:
                        åƒç´ å€¼ï¼Œå¦‚"100px";
                        ç™¾åˆ†æ¯”,如"10%",相对于父Webview窗口的高度;
                        è‡ªåŠ¨è®¡ç®—ï¼Œå¦‚"auto",根据height值自动计算,相对于父Webview窗口垂直居中。
                    </p>
                </li>
                <li>left: <em>(<font class="type">String</font>
                        ç±»åž‹
                        )</em>Barcode扫码控件左上角的水平偏移量<br>
                    <p>
                        å¯å–值:
                        åƒç´ å€¼ï¼Œå¦‚"100px";
                        ç™¾åˆ†æ¯”,如"10%",相对于父Webview窗口的宽度;
                        è‡ªåŠ¨è®¡ç®—ï¼Œå¦‚"auto",根据width值自动计算,相对于父Webview窗口水平居中。
                        é»˜è®¤å€¼ä¸º"0px"。
                    </p>
                </li>
                <li>width: <em>(<font class="type">String</font>
                        ç±»åž‹
                        )</em>Barcode扫码控件的宽度<br>
                    <p>
                        å¯å–值:
                        åƒç´ å€¼ï¼Œå¦‚"100px";
                        ç™¾åˆ†æ¯”,如"10%",相对于父Webview窗口的宽度。
                        é»˜è®¤å€¼ä¸º"100%"。
                    </p>
                </li>
                <li>height: <em>(<font class="type">String</font>
                        ç±»åž‹
                        )</em>Barcode扫码控件的高度<br>
                    <p>
                        å¯å–值:
                        åƒç´ å€¼ï¼Œå¦‚"100px";
                        ç™¾åˆ†æ¯”,如"10%",相对于父Webview窗口的高度。
                        é»˜è®¤å€¼ä¸º"100%"。
                    </p>
                </li>
                <li>position: <em>(<font class="type">String</font>
                        ç±»åž‹
                        )</em>Barcode扫码控件在Webview窗口的布局模式<br>
                    <p>
                        å¯å–值:
                        "static" - é™æ€å¸ƒå±€æ¨¡å¼ï¼Œå¦‚果页面存在滚动条则随窗口内容滚动;
                        "absolute" - ç»å¯¹å¸ƒå±€æ¨¡å¼ï¼Œå¦‚果页面存在滚动条不随窗口内容滚动;
                        é»˜è®¤å€¼ä¸º"static"。
                    </p>
                </li>
            </ul>
            <h1><a name="plus.barcode.BarcodeOptions">BarcodeOptions</a></h1>
            <p>条码识别控件扫描参数</p>
            <pre class="prettyprint linenums">
interface plus.barcode.BarcodeOptions {
    attribute Boolean conserve;
    attribute String filename;
@@ -226,99 +271,110 @@
    attribute String sound;
}
                </pre>
<h2>说明:</h2>
<p class="des">
    è®¾ç½®Barcode扫码控件的扫码识别参数,如是否保存扫码功时的截图等。
                </p>
<h2>属性:</h2>
<ul>
<li>conserve: <em>(<font class="type">Boolean</font>
    ç±»åž‹
)</em>是否保存扫码成功时的截图<br><p>
    å¦‚果设置为true则在扫码成功时将图片保存,并通过onmarked回调函数的file参数返回保存文件的路径。
    é»˜è®¤å€¼ä¸ºfalse,不保存截图。
                        </p>
</li>
<li>filename: <em>(<font class="type">String</font>
    ç±»åž‹
)</em>保存扫码成功时图片保存路径<br><p>
    å¯é€šè¿‡æ­¤å‚数设置保存截图的路径和名称,如果设置图片文件名称则必须指定文件的后缀名(必须是.png),否则认为是指定目录,文件名称则自动生成。
                        </p>
</li>
<li>vibrate: <em>(<font class="type">Boolean</font>
    ç±»åž‹
)</em>扫码成功时是否需要震动提醒<br><p>
    å¦‚果设置为true则在扫码成功时震动设备,false则不震动。
    é»˜è®¤å€¼ä¸ºtrue。
                        </p>
</li>
<li>sound: <em>(<font class="type">String</font>
    ç±»åž‹
)</em>扫码成功时播放的提示音<br><p>
    å¯å–值:
    "none" - ä¸æ’­æ”¾æç¤ºéŸ³ï¼›
    "default" - æ’­æ”¾é»˜è®¤æç¤ºéŸ³ï¼ˆ5+引擎内置)。
    é»˜è®¤å€¼ä¸º"default"。
                        </p>
</li>
</ul>
<h1><a name="plus.barcode.BarcodeSuccessCallback">BarcodeSuccessCallback</a></h1>
<p>扫码识别成功回调函数</p>
<pre class="prettyprint linenums">
            <h2>说明:</h2>
            <p class="des">
                è®¾ç½®Barcode扫码控件的扫码识别参数,如是否保存扫码功时的截图等。
            </p>
            <h2>属性:</h2>
            <ul>
                <li>conserve: <em>(<font class="type">Boolean</font>
                        ç±»åž‹
                        )</em>是否保存扫码成功时的截图<br>
                    <p>
                        å¦‚果设置为true则在扫码成功时将图片保存,并通过onmarked回调函数的file参数返回保存文件的路径。
                        é»˜è®¤å€¼ä¸ºfalse,不保存截图。
                    </p>
                </li>
                <li>filename: <em>(<font class="type">String</font>
                        ç±»åž‹
                        )</em>保存扫码成功时图片保存路径<br>
                    <p>
                        å¯é€šè¿‡æ­¤å‚数设置保存截图的路径和名称,如果设置图片文件名称则必须指定文件的后缀名(必须是.png),否则认为是指定目录,文件名称则自动生成。
                    </p>
                </li>
                <li>vibrate: <em>(<font class="type">Boolean</font>
                        ç±»åž‹
                        )</em>扫码成功时是否需要震动提醒<br>
                    <p>
                        å¦‚果设置为true则在扫码成功时震动设备,false则不震动。
                        é»˜è®¤å€¼ä¸ºtrue。
                    </p>
                </li>
                <li>sound: <em>(<font class="type">String</font>
                        ç±»åž‹
                        )</em>扫码成功时播放的提示音<br>
                    <p>
                        å¯å–值:
                        "none" - ä¸æ’­æ”¾æç¤ºéŸ³ï¼›
                        "default" - æ’­æ”¾é»˜è®¤æç¤ºéŸ³ï¼ˆ5+引擎内置)。
                        é»˜è®¤å€¼ä¸º"default"。
                    </p>
                </li>
            </ul>
            <h1><a name="plus.barcode.BarcodeSuccessCallback">BarcodeSuccessCallback</a></h1>
            <p>扫码识别成功回调函数</p>
            <pre class="prettyprint linenums">
void BarcodeSuccessCallback(type, code, file){
    // Barcode success code
}
                </pre>
<h2>说明:</h2>
<p class="des">
    å½“Barcode控件扫码成功时的回调函数,返回识别成功的扫码数据。
                </p>
<h2>参数:</h2>
<ul>
<li>type:
        <em>(
            <font class="type">Number</font>
            )
            å¿…选 </em>识别到的条码类型<br>
    Number类型的值,与Barcode对象定义的条码类型常量一致。
                        </li>
<li>code:
        <em>(
            <font class="type">String</font>
            )
            å¿…选 </em>识别到的条码数据<br>
    æ‰«ç è¯†åˆ«å‡ºçš„æ•°æ®å†…容,字符串类型,采用UTF8编码格式。
                        </li>
<li>file:
        <em>(
            <font class="type">String</font>
            )
            å¯é€‰ </em>扫码成功的截图文件路径<br>
    æ‰«ç è¯†åˆ«åˆ°çš„æˆªå›¾ï¼Œpng格式文件,如果设置为不保存截图,则返回undefined。
                        </li>
</ul>
<h2>返回值:</h2>
<font class="type">void</font>
            <h2>说明:</h2>
            <p class="des">
                å½“Barcode控件扫码成功时的回调函数,返回识别成功的扫码数据。
            </p>
            <h2>参数:</h2>
            <ul>
                <li>type:
                    <em>(
                        <font class="type">Number</font>
                        )
                        å¿…选
                    </em>识别到的条码类型<br>
                    Number类型的值,与Barcode对象定义的条码类型常量一致。
                </li>
                <li>code:
                    <em>(
                        <font class="type">String</font>
                        )
                        å¿…选
                    </em>识别到的条码数据<br>
                    æ‰«ç è¯†åˆ«å‡ºçš„æ•°æ®å†…容,字符串类型,采用UTF8编码格式。
                </li>
                <li>file:
                    <em>(
                        <font class="type">String</font>
                        )
                        å¯é€‰
                    </em>扫码成功的截图文件路径<br>
                    æ‰«ç è¯†åˆ«åˆ°çš„æˆªå›¾ï¼Œpng格式文件,如果设置为不保存截图,则返回undefined。
                </li>
            </ul>
            <h2>返回值:</h2>
            <font class="type">void</font>
            : æ— <h1><a name="plus.barcode.BarcodeErrorCallback">BarcodeErrorCallback</a></h1>
<p>扫码识别错误回调函数</p>
<pre class="prettyprint linenums">
            <p>扫码识别错误回调函数</p>
            <pre class="prettyprint linenums">
void BarcodeErrorCallback(error){
    // Error 
    var code = error.code;             // é”™è¯¯ç¼–码
    var message = error.message;    // é”™è¯¯æè¿°ä¿¡æ¯
}
                </pre>
<h2>参数:</h2>
<ul><li>error:
        <em>(
            <font class="type">DOMException</font>
            )
            å¿…选 </em>扫码识别的错误信息<br>
    å¯é€šè¿‡error.code(Number类型)获取错误编码;
    å¯é€šè¿‡error.message(String类型)获取错误描述信息。
                        </li></ul>
<h2>返回值:</h2>
<font class="type">void</font>
            <h2>参数:</h2>
            <ul>
                <li>error:
                    <em>(
                        <font class="type">DOMException</font>
                        )
                        å¿…选
                    </em>扫码识别的错误信息<br>
                    å¯é€šè¿‡error.code(Number类型)获取错误编码;
                    å¯é€šè¿‡error.message(String类型)获取错误描述信息。
                </li>
            </ul>
            <h2>返回值:</h2>
            <font class="type">void</font>
            : æ— <br><br>
</div></body>
        </div>
    </body>
</html>
js/common.js
@@ -1,178 +1,189 @@
(function(w){
// ç©ºå‡½æ•°
function shield(){
    return false;
}
document.addEventListener('touchstart', shield, false);//取消浏览器的所有事件,使得active的样式在手机上正常生效
document.oncontextmenu=shield;//屏蔽选择函数
// H5 plus事件处理
var ws=null,as='pop-in';
function plusReady(){
    ws=plus.webview.currentWebview();
    plus.key.addEventListener('backbutton', function(){
        back();
    },false);
}
if(w.plus){
    plusReady();
}else{
    document.addEventListener('plusready', plusReady, false);
}
// DOMContentLoaded事件处理
document.addEventListener('DOMContentLoaded', function(){
    gInit();
    document.body.onselectstart=shield;
},false);
// è¿”回
w.back=function(hide){
    if(w.plus){
        ws||(ws=plus.webview.currentWebview());
        (hide||ws.preate)?ws.hide('auto'):ws.close('auto');
    }else if(history.length>1){
        history.back();
    }else{
        w.close();
(function(w) {
    // ç©ºå‡½æ•°
    function shield() {
        return false;
    }
};
// å¤„理点击事件
var openw=null;
/**
 * æ‰“开新窗口
 * @param {URIString} id : è¦æ‰“开页面url
 * @param {String} t : é¡µé¢æ ‡é¢˜åç§°
 * @param {JSON} ws : Webview窗口属性
 */
w.clicked=function(id, t, ws){
    if(openw){//避免多次打开同一个页面
        return null;
    }
    if(w.plus){
        ws=ws||{};
        ws.scrollIndicator||(ws.scrollIndicator='none');
        ws.scalable||(ws.scalable=false);
        ws.backButtonAutoControl||(ws.backButtonAutoControl='close');
        ws.titleNView=ws.titleNView||{autoBackButton:true};
        ws.titleNView.backgroundColor = '#D74B28';
        ws.titleNView.titleColor = '#CCCCCC';
        ws.doc&&(ws.titleNView.buttons=ws.titleNView.buttons||[],ws.titleNView.buttons.push({fontSrc:'_www/helloh5.ttf',text:'\ue301',fontSize:'20px',onclick:'javascript:openDoc()'}));
        t&&(ws.titleNView.titleText=t);
        openw = plus.webview.create(id, id, ws);
        openw.addEventListener('loaded', function(){
            openw.show(as);
    document.addEventListener('touchstart', shield, false); //取消浏览器的所有事件,使得active的样式在手机上正常生效
    document.oncontextmenu = shield; //屏蔽选择函数
    // H5 plus事件处理
    var ws = null,
        as = 'pop-in';
    function plusReady() {
        ws = plus.webview.currentWebview();
        plus.key.addEventListener('backbutton', function() {
            back();
        }, false);
        openw.addEventListener('close', function(){
            openw=null;
        }, false);
        return openw;
    }else{
        w.open(id);
    }
    return null;
};
/**
 * åˆ›å»ºæ–°çª—口(无原始标题栏),
 * @param {URIString} id : è¦æ‰“开页面url
 * @param {JSON} ws : Webview窗口属性
 */
w.createWithoutTitle=function(id, ws){
    if(openw){//避免多次打开同一个页面
        return null;
    if (w.plus) {
        plusReady();
    } else {
        document.addEventListener('plusready', plusReady, false);
    }
    if(w.plus){
        ws=ws||{};
        ws.scrollIndicator||(ws.scrollIndicator='none');
        ws.scalable||(ws.scalable=false);
        ws.backButtonAutoControl||(ws.backButtonAutoControl='close');
        openw = plus.webview.create(id, id, ws);
        openw.addEventListener('close', function(){
            openw=null;
        }, false);
        return openw;
    }else{
        w.open(id);
    }
    return null;
};
/**
 * æ‰“开文档页面
 * @param {URIString} c : è¦æ‰“开页面url
 */
w.openDoc=function(c){
    plus.webview.create(c, 'document', {
        titleNView:{
            autoBackButton:true,
            backgroundColor:'#D74B28',
            titleColor:'#CCCCCC'
        },
        backButtonAutoControl:'close',
        scalable:false
    }).show('pop-in');
};
/**
 * å…¼å®¹æç¤º
 */
w.compatibleConfirm=function(){
    plus.nativeUI.confirm('本OS原生层面不提供该控件,需使用mui框架实现类似效果。请点击“确定”下载Hello mui示例',function(e){
        if(0==e.index){
            plus.runtime.openURL("http://www.dcloud.io/hellomui/");
    // DOMContentLoaded事件处理
    document.addEventListener('DOMContentLoaded', function() {
        gInit();
        document.body.onselectstart = shield;
    }, false);
    // è¿”回
    w.back = function(hide) {
        if (w.plus) {
            ws || (ws = plus.webview.currentWebview());
            (hide || ws.preate) ? ws.hide('auto'): ws.close('auto');
        } else if (history.length > 1) {
            history.back();
        } else {
            w.close();
        }
    },"",["确定","取消"]);
}
// é€šç”¨å…ƒç´ å¯¹è±¡
var _dout_=null;
w.gInit=function(){
    _dout_=document.getElementById("output");
};
// æ¸…空输出内容
w.outClean=function(){
    _dout_.innerText="";
    _dout_.scrollTop=0;//在iOS8存在不滚动的现象
};
// è¾“出内容
w.outSet=function(s){
    console.log(s);
    _dout_.innerText=s+"\n";
    (0==_dout_.scrollTop)&&(_dout_.scrollTop=1);//在iOS8存在不滚动的现象
};
// è¾“出行内容
w.outLine=function(s){
    console.log(s);
    _dout_.innerText+=s+"\n";
    (0==_dout_.scrollTop)&&(_dout_.scrollTop=1);//在iOS8存在不滚动的现象
};
// æ ¼å¼åŒ–时长字符串,格式为"HH:MM:SS"
w.timeToStr=function(ts){
    if(isNaN(ts)){
        return "--:--:--";
    };
    // å¤„理点击事件
    var openw = null;
    /**
     * æ‰“开新窗口
     * @param {URIString} id : è¦æ‰“开页面url
     * @param {String} t : é¡µé¢æ ‡é¢˜åç§°
     * @param {JSON} ws : Webview窗口属性
     */
    w.clicked = function(id, t, ws) {
        if (openw) { //避免多次打开同一个页面
            return null;
        }
        if (w.plus) {
            ws = ws || {};
            ws.scrollIndicator || (ws.scrollIndicator = 'none');
            ws.scalable || (ws.scalable = false);
            ws.backButtonAutoControl || (ws.backButtonAutoControl = 'close');
            ws.titleNView = ws.titleNView || {
                autoBackButton: true
            };
            ws.titleNView.backgroundColor = '#D74B28';
            ws.titleNView.titleColor = '#CCCCCC';
            ws.doc && (ws.titleNView.buttons = ws.titleNView.buttons || [], ws.titleNView.buttons.push({
                fontSrc: '_www/helloh5.ttf',
                text: '\ue301',
                fontSize: '20px',
                onclick: 'javascript:openDoc()'
            }));
            t && (ws.titleNView.titleText = t);
            openw = plus.webview.create(id, id, ws);
            openw.addEventListener('loaded', function() {
                openw.show(as);
            }, false);
            openw.addEventListener('close', function() {
                openw = null;
            }, false);
            return openw;
        } else {
            w.open(id);
        }
        return null;
    };
    /**
     * åˆ›å»ºæ–°çª—口(无原始标题栏),
     * @param {URIString} id : è¦æ‰“开页面url
     * @param {JSON} ws : Webview窗口属性
     */
    w.createWithoutTitle = function(id, ws) {
        if (openw) { //避免多次打开同一个页面
            return null;
        }
        if (w.plus) {
            ws = ws || {};
            ws.scrollIndicator || (ws.scrollIndicator = 'none');
            ws.scalable || (ws.scalable = false);
            ws.backButtonAutoControl || (ws.backButtonAutoControl = 'close');
            openw = plus.webview.create(id, id, ws);
            openw.addEventListener('close', function() {
                openw = null;
            }, false);
            return openw;
        } else {
            w.open(id);
        }
        return null;
    };
    /**
     * æ‰“开文档页面
     * @param {URIString} c : è¦æ‰“开页面url
     */
    w.openDoc = function(c) {
        plus.webview.create(c, 'document', {
            titleNView: {
                autoBackButton: true,
                backgroundColor: '#D74B28',
                titleColor: '#CCCCCC'
            },
            backButtonAutoControl: 'close',
            scalable: false
        }).show('pop-in');
    };
    /**
     * å…¼å®¹æç¤º
     */
    w.compatibleConfirm = function() {
        plus.nativeUI.confirm('本OS原生层面不提供该控件,需使用mui框架实现类似效果。请点击“确定”下载Hello mui示例', function(e) {
            if (0 == e.index) {
                plus.runtime.openURL("http://www.dcloud.io/hellomui/");
            }
        }, "", ["确定", "取消"]);
    }
    var h=parseInt(ts/3600);
    var m=parseInt((ts%3600)/60);
    var s=parseInt(ts%60);
    return (ultZeroize(h)+":"+ultZeroize(m)+":"+ultZeroize(s));
};
// æ ¼å¼åŒ–日期时间字符串,格式为"YYYY-MM-DD HH:MM:SS"
w.dateToStr=function(d){
    return (d.getFullYear()+"-"+ultZeroize(d.getMonth()+1)+"-"+ultZeroize(d.getDate())+" "+ultZeroize(d.getHours())+":"+ultZeroize(d.getMinutes())+":"+ultZeroize(d.getSeconds()));
};
/**
 * zeroize value with length(default is 2).
 * @param {Object} v
 * @param {Number} l
 * @return {String}
 */
w.ultZeroize=function(v,l){
    var z="";
    l=l||2;
    v=String(v);
    for(var i=0;i<l-v.length;i++){
        z+="0";
    }
    return z+v;
};
    // é€šç”¨å…ƒç´ å¯¹è±¡
    var _dout_ = null;
    w.gInit = function() {
        _dout_ = document.getElementById("output");
    };
    // æ¸…空输出内容
    w.outClean = function() {
        _dout_.innerText = "";
        _dout_.scrollTop = 0; //在iOS8存在不滚动的现象
    };
    // è¾“出内容
    w.outSet = function(s) {
        console.log(s);
        _dout_.innerText = s + "\n";
        (0 == _dout_.scrollTop) && (_dout_.scrollTop = 1); //在iOS8存在不滚动的现象
    };
    // è¾“出行内容
    w.outLine = function(s) {
        console.log(s);
        _dout_.innerText += s + "\n";
        (0 == _dout_.scrollTop) && (_dout_.scrollTop = 1); //在iOS8存在不滚动的现象
    };
    // æ ¼å¼åŒ–时长字符串,格式为"HH:MM:SS"
    w.timeToStr = function(ts) {
        if (isNaN(ts)) {
            return "--:--:--";
        }
        var h = parseInt(ts / 3600);
        var m = parseInt((ts % 3600) / 60);
        var s = parseInt(ts % 60);
        return (ultZeroize(h) + ":" + ultZeroize(m) + ":" + ultZeroize(s));
    };
    // æ ¼å¼åŒ–日期时间字符串,格式为"YYYY-MM-DD HH:MM:SS"
    w.dateToStr = function(d) {
        return (d.getFullYear() + "-" + ultZeroize(d.getMonth() + 1) + "-" + ultZeroize(d.getDate()) + " " +
            ultZeroize(d.getHours()) + ":" + ultZeroize(d.getMinutes()) + ":" + ultZeroize(d.getSeconds()));
    };
    /**
     * zeroize value with length(default is 2).
     * @param {Object} v
     * @param {Number} l
     * @return {String}
     */
    w.ultZeroize = function(v, l) {
        var z = "";
        l = l || 2;
        v = String(v);
        for (var i = 0; i < l - v.length; i++) {
            z += "0";
        }
        return z + v;
    };
})(window);
// fast click 
;(function () {
;
(function() {
    'use strict';
    /**
@@ -282,7 +293,9 @@
        // Some old versions of Android don't have Function.prototype.bind
        function bind(method, context) {
            return function() { return method.apply(context, arguments); };
            return function() {
                return method.apply(context, arguments);
            };
        }
@@ -348,10 +361,10 @@
    }
    /**
    * Windows Phone 8.1 fakes user agent string to look like Android and iPhone.
    *
    * @type boolean
    */
     * Windows Phone 8.1 fakes user agent string to look like Android and iPhone.
     *
     * @type boolean
     */
    var deviceIsWindowsPhone = navigator.userAgent.indexOf("Windows Phone") >= 0;
    /**
@@ -401,27 +414,27 @@
    FastClick.prototype.needsClick = function(target) {
        switch (target.nodeName.toLowerCase()) {
        // Don't send a synthetic click to disabled inputs (issue #62)
        case 'button':
        case 'select':
        case 'textarea':
            if (target.disabled) {
            // Don't send a synthetic click to disabled inputs (issue #62)
            case 'button':
            case 'select':
            case 'textarea':
                if (target.disabled) {
                    return true;
                }
                break;
            case 'input':
                // File inputs need real clicks on iOS 6 due to a browser bug (issue #68)
                if ((deviceIsIOS && target.type === 'file') || target.disabled) {
                    return true;
                }
                break;
            case 'label':
            case 'iframe': // iOS8 homescreen apps can prevent events bubbling into frames
            case 'video':
                return true;
            }
            break;
        case 'input':
            // File inputs need real clicks on iOS 6 due to a browser bug (issue #68)
            if ((deviceIsIOS && target.type === 'file') || target.disabled) {
                return true;
            }
            break;
        case 'label':
        case 'iframe': // iOS8 homescreen apps can prevent events bubbling into frames
        case 'video':
            return true;
        }
        return (/\bneedsclick\b/).test(target.className);
@@ -436,25 +449,25 @@
     */
    FastClick.prototype.needsFocus = function(target) {
        switch (target.nodeName.toLowerCase()) {
        case 'textarea':
            return true;
        case 'select':
            return !deviceIsAndroid;
        case 'input':
            switch (target.type) {
            case 'button':
            case 'checkbox':
            case 'file':
            case 'image':
            case 'radio':
            case 'submit':
                return false;
            }
            case 'textarea':
                return true;
            case 'select':
                return !deviceIsAndroid;
            case 'input':
                switch (target.type) {
                    case 'button':
                    case 'checkbox':
                    case 'file':
                    case 'image':
                    case 'radio':
                    case 'submit':
                        return false;
                }
            // No point in attempting to focus disabled inputs
            return !target.disabled && !target.readOnly;
        default:
            return (/\bneedsfocus\b/).test(target.className);
                // No point in attempting to focus disabled inputs
                return !target.disabled && !target.readOnly;
            default:
                return (/\bneedsfocus\b/).test(target.className);
        }
    };
@@ -477,7 +490,8 @@
        // Synthesise a click event, with an extra attribute so it can be tracked
        clickEvent = document.createEvent('MouseEvents');
        clickEvent.initMouseEvent(this.determineEventType(targetElement), true, true, window, 1, touch.screenX, touch.screenY, touch.clientX, touch.clientY, false, false, false, false, 0, null);
        clickEvent.initMouseEvent(this.determineEventType(targetElement), true, true, window, 1, touch.screenX,
            touch.screenY, touch.clientX, touch.clientY, false, false, false, false, 0, null);
        clickEvent.forwardedTouchEvent = true;
        targetElement.dispatchEvent(clickEvent);
    };
@@ -500,7 +514,8 @@
        var length;
        // Issue #160: on iOS 7, some input elements (e.g. date datetime month) throw a vague TypeError on setSelectionRange. These elements don't have an integer value for the selectionStart and selectionEnd properties, but unfortunately that can't be used for detection because accessing the properties also throws a TypeError. Just check the type instead. Filed as Apple bug #15122724.
        if (deviceIsIOS && targetElement.setSelectionRange && targetElement.type.indexOf('date') !== 0 && targetElement.type !== 'time' && targetElement.type !== 'month') {
        if (deviceIsIOS && targetElement.setSelectionRange && targetElement.type.indexOf('date') !== 0 &&
            targetElement.type !== 'time' && targetElement.type !== 'month') {
            length = targetElement.value.length;
            targetElement.setSelectionRange(length, length);
        } else {
@@ -631,9 +646,11 @@
     * @returns {boolean}
     */
    FastClick.prototype.touchHasMoved = function(event) {
        var touch = event.changedTouches[0], boundary = this.touchBoundary;
        var touch = event.changedTouches[0],
            boundary = this.touchBoundary;
        if (Math.abs(touch.pageX - this.touchStartX) > boundary || Math.abs(touch.pageY - this.touchStartY) > boundary) {
        if (Math.abs(touch.pageX - this.touchStartX) > boundary || Math.abs(touch.pageY - this.touchStartY) >
            boundary) {
            return true;
        }
@@ -653,7 +670,8 @@
        }
        // If the touch has moved, cancel the click tracking
        if (this.targetElement !== this.getTargetElementFromEventTarget(event.target) || this.touchHasMoved(event)) {
        if (this.targetElement !== this.getTargetElementFromEventTarget(event.target) || this.touchHasMoved(
                event)) {
            this.trackingClick = false;
            this.targetElement = null;
        }
@@ -682,7 +700,8 @@
        // If no for attribute exists, attempt to retrieve the first labellable descendant element
        // the list of which is defined here: http://www.w3.org/TR/html5/forms.html#category-label
        return labelElement.querySelector('button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea');
        return labelElement.querySelector(
            'button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea');
    };
@@ -693,7 +712,8 @@
     * @returns {boolean}
     */
    FastClick.prototype.onTouchEnd = function(event) {
        var forElement, trackingClickStart, targetTagName, scrollParent, touch, targetElement = this.targetElement;
        var forElement, trackingClickStart, targetTagName, scrollParent, touch, targetElement = this
            .targetElement;
        if (!this.trackingClick) {
            return true;
@@ -726,7 +746,8 @@
            touch = event.changedTouches[0];
            // In certain cases arguments of elementFromPoint can be negative, so prevent setting targetElement to null
            targetElement = document.elementFromPoint(touch.pageX - window.pageXOffset, touch.pageY - window.pageYOffset) || targetElement;
            targetElement = document.elementFromPoint(touch.pageX - window.pageXOffset, touch.pageY - window
                .pageYOffset) || targetElement;
            targetElement.fastClickScrollParent = this.targetElement.fastClickScrollParent;
        }
@@ -745,7 +766,8 @@
            // Case 1: If the touch started a while ago (best guess is 100ms based on tests for issue #36) then focus will be triggered anyway. Return early and unset the target element reference so that the subsequent click will be allowed through.
            // Case 2: Without this exception for input elements tapped when the document is contained in an iframe, then any inputted text won't be visible even though the value attribute is updated as the user types (issue #37).
            if ((event.timeStamp - trackingClickStart) > 100 || (deviceIsIOS && window.top !== window && targetTagName === 'input')) {
            if ((event.timeStamp - trackingClickStart) > 100 || (deviceIsIOS && window.top !== window &&
                    targetTagName === 'input')) {
                this.targetElement = null;
                return false;
            }
@@ -917,7 +939,7 @@
        }
        // Chrome version - zero for other browsers
        chromeVersion = +(/Chrome\/([0-9]+)/.exec(navigator.userAgent) || [,0])[1];
        chromeVersion = +(/Chrome\/([0-9]+)/.exec(navigator.userAgent) || [, 0])[1];
        if (chromeVersion) {
@@ -935,7 +957,7 @@
                    }
                }
            // Chrome desktop doesn't need FastClick (issue #15)
                // Chrome desktop doesn't need FastClick (issue #15)
            } else {
                return true;
            }
@@ -968,13 +990,14 @@
        }
        // Firefox version - zero for other browsers
        firefoxVersion = +(/Firefox\/([0-9]+)/.exec(navigator.userAgent) || [,0])[1];
        firefoxVersion = +(/Firefox\/([0-9]+)/.exec(navigator.userAgent) || [, 0])[1];
        if (firefoxVersion >= 27) {
            // Firefox 27+ does not have tap delay if the content is not zoomable - https://bugzilla.mozilla.org/show_bug.cgi?id=922896
            metaViewport = document.querySelector('meta[name=viewport]');
            if (metaViewport && (metaViewport.content.indexOf('user-scalable=no') !== -1 || document.documentElement.scrollWidth <= window.outerWidth)) {
            if (metaViewport && (metaViewport.content.indexOf('user-scalable=no') !== -1 || document
                    .documentElement.scrollWidth <= window.outerWidth)) {
                return true;
            }
        }
@@ -1013,8 +1036,8 @@
        window.FastClick = FastClick;
    }
document.addEventListener('DOMContentLoaded', function() {
    FastClick.attach(document.body);
}, false);
    document.addEventListener('DOMContentLoaded', function() {
        FastClick.attach(document.body);
    }, false);
}());
js/global.js
@@ -1,16 +1,14 @@
// // æ ¼å¼åŒ–地址栏参数    å°†å¯¹è±¡è‡ªåŠ¨æ‹¼æŽ¥æˆåœ°å€æ ä¼ å‚å½¢å¼
// export   formatParams() {
//     const data = {
//         userid: 33,
//         usercode: '002',
//         username: '张三',
//         usertype: 'APP'
//     }
//     return data
// }
// export const value=1
(function(w) {
     // æ ¼å¼åŒ–地址栏参数    å°†å¯¹è±¡è‡ªåŠ¨æ‹¼æŽ¥æˆåœ°å€æ ä¼ å‚å½¢å¼
     w.formatParams = function() {
            const data = {
                userid: 33,
                usercode: '002',
                username: '张三',
                usertype: 'APP'
            }
        return data;
    }
})(window);
pages/login/index.html
@@ -19,8 +19,8 @@
        <script type="text/javascript" src="../../js/http.js"></script>
        <!-- å¯¼å…¥è‡ªå®šä¹‰js文件 -->
        <!-- <script type="module" src="../../js/global.js"></script> -->
        <!-- å¯¼å…¥è‡ªå®šä¹‰å…¨å±€js文件 -->
        <script type="text/javascript" src="../../js/global.js"></script>
@@ -73,7 +73,7 @@
            },
            mounted() {
                console.log(formatParams(),1)
            },
            methods: {
                loginClick() {
pages/sbgl/rcdj.html
@@ -6,7 +6,7 @@
        <meta name="HandheldFriendly" content="true" />
        <meta name="MobileOptimized" content="320" />
        <title>新凯迪制造云平台</title>
        <!-- å¼•入样式文件 -->
        <link rel="stylesheet" href="../../css/vant.css" />
        <!-- å¼•å…¥ Vue å’Œ Vant çš„ JS æ–‡ä»¶ -->
@@ -17,10 +17,150 @@
        <script type="text/javascript" src="../../js/axios.min.js"></script>
        <script type="text/javascript" src="../../js/http.js"></script>
        <script type="text/javascript" src="../../js/common.js"></script>
        <link rel="stylesheet" href="../css/global.css" type="text/css" charset="utf-8" />
        <!-- <link rel="stylesheet" href="../../css/global.css" type="text/css" charset="utf-8" /> -->
        <script type="text/javascript">
            var topContent = [
                // {
                //     code: 'SB001',
                //     name: '齿轮箱组',
                //     wksp_code: "CJ002",
                //     wksp_name: '装配车间',
                //     eqpchkmain_code: "djbz002"
                // },
                // {
                //     code: 'SB003',
                //     name: '齿轮箱组',
                //     wksp_code: "CJ002",
                //     wksp_name: '装配车间',
                //     eqpchkmain_code: "djbz002"
                // },
            ];
            var centerContent = [
                //     {
                //     checkdesc: '气压正常10帕,最高不超过10.5帕,最低不低于9.7',
                //     code: 'BW003',
                //     name: '部位3',
                //     seq: 2,
                //     cycle: 'D',
                //     isscan: 'N',
                //     isOK: 'OK',
                //     inputValue: '',
                //     isDisabled: false,
                // },
            ]
            let radioValue = ''
            let resultValue = ''
            let bwcode = ''
            let number = []
            function scaned(r) {
                let flag = false
                topContent.forEach((item, index) => {
                    if (item.code === r) {
                        flag = true
                    }
                })
                if (flag) {
                    vant.Notify({
                        type: 'danger',
                        message: '此条码已扫描,已在列表中!'
                    });
                } else {
                    get('AppDeviceManage/CheckScanDeviceQrCodeData', {
                        eqpcode: r
                    }).then(res => {
                        if (res.code === '200' && res.data[0].eqpchkmain_code !== null) {
                            topContent.unshift(res.data[0])
                            topContentClcik(topContent[0].code)
                        }
                        if (res.code === '200' && res.data[0].eqpchkmain_code === null) {
                            vant.Notify({
                                type: 'danger',
                                message: '当前设备未设置点检标准绑定点检项目!'
                            });
                        }
                    })
                }
            }
            function scaned2(r) {
                if (bwcode === r) {
                    centerContent.forEach(item => {
                        if (item.code === bwcode) {
                            item.isDisabled = false
                            item.isOK = 'OK'
                            if (centerContent.every(r => r.isOK === 'OK')) {
                                resultValue = 'OK'
                            }
                            if (centerContent.some(r => r.isOK === 'NG')) {
                                resultValue = 'NG'
                            }
                            if (centerContent.some(r => r.isOK === '')) {
                                resultValue = ''
                            }
                            number.push({
                                id: '1'
                            })
                        }
                    })
                } else {
                    vant.Notify({
                        type: 'danger',
                        message: '扫描的二维码未与此点检项目相匹配!'
                    });
                }
            }
            function topContentClcik(code) {
                radioValue = code
                get('AppDeviceManage/SelectScanDeviceQrCodeItem', {
                    eqpcode: code
                }).then(res => {
                    if (res.code === '200') {
                        centerContent = res.data
                        centerContent = JSON.parse(JSON.stringify(centerContent))
                        centerContent.forEach(item => {
                            item.isDisabled = item.isscan === 'Y'
                            item.inputValue = ''
                            item.isOK = item.isscan !== 'Y' ? 'OK' : ''
                        })
                        if (centerContent.every(r => r.isOK === 'OK')) {
                            resultValue = 'OK'
                        }
                        if (centerContent.some(r => r.isOK === 'NG')) {
                            resultValue = 'NG'
                        }
                        if (centerContent.some(r => r.isOK === '')) {
                            resultValue = ''
                        }
                    }
                })
            }
        </script>
    </head>
    <!-- <body onload="loadNodes()"> -->
    <body>
        <div id="app">
@@ -28,7 +168,7 @@
                <van-nav-bar title="日常点检" @click-right="onClickRight" left-arrow @click-left="onClickleft">
                    <template #right>
                        <van-popover style="" placement="bottom-end" :offset="[13,8]" v-model="showPopover"
                        <van-popover style="" placement="bottom-end" :offset="[13,8]" v-model="showPopover"
                            trigger="click" :actions="actions" @select="onSelect">
                            <template #reference>
                                <van-icon name="bars" size='20' color='#fff' />
@@ -37,8 +177,129 @@
                    </template>
                </van-nav-bar>
            </div>
                <div class="head">
                    <div class="head_block">
                        <div class="head_left">
                            <div class="head_bar"></div>
                            <div class="head_title">
                                æ‰«æç‚¹æ£€å·¥ä½
                            </div>
                        </div>
                        <div style="margin-right: 10px;">
                            <van-icon name="scan" color='red' size='24' @click='topScanClick()' />
                        </div>
                    </div>
                    <div class="flex_between" style="">
                        <div id="contentLeft" style="width: 100%;margin-top: 10px;">
                            <div id="topContentID" v-for="item in topContent" :key="item.code"
                                style="margin-bottom: 10px;margin-left: 20px;" @click="topContentClcik(item.code)">
                                <div style="display: flex;align-items: center;">
                                    <div>
                                        <div>工位编码:</div>
                                        <div>工位名称:</div>
                                        <div>生产车间:</div>
                                    </div>
                                    <div>
                                        <div>{{item.code}}</div>
                                        <div>{{item.name}}</div>
                                        <div>{{item.wksp_name}}</div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div id="contentRight">
                            <van-radio-group v-model="radioValue" style="padding-right: 12px;">
                                <van-radio checked-color='red' icon-size="18px"
                                    style="height: 63px;margin-bottom: 10px;" v-for="item in topContent"
                                    :key="item.code" :name="item.code"></van-radio>
                            </van-radio-group>
                        </div>
                    </div>
                </div>
                <div class="head"
                    :style="{marginTop:topContent.length===0?'100px':'0',minHeight:topContent.length===0?'0':'220px'}"
                    style="margin-bottom: 130px;padding-bottom: 10px;overflow-y: ;"
                    :style="{marginTop:topContent.length===0?'78px':'0'}">
                    <div class="head_block" style="margin-bottom:10px;">
                        <div class="head_left">
                            <div class="head_bar"></div>
                            <div class="head_title">
                                ç‚¹æ£€é¡¹ç›®å†…容
                            </div>
                        </div>
                    </div>
                    <div class="center_border flex_column" style="margin:  5px;" v-for="item in centerContent"
                        :key="item.code">
                        <div class="flex_between">
                            <div class="center_title">{{item.name}}</div>
                            <div style="margin-right: 10px;" v-if="item.isscan==='Y'">
                                <van-icon name="scan" color='red' size='24' @click='centerScanClick(item.code)' />
                            </div>
                        </div>
                        <div class="flex_between ">
                            <div class='flex_between' style="width: 90%;">
                                <van-field class="vanFieldInput" :disabled="item.isDisabled" v-model="item.inputValue"
                                    placeholder="请输入" />
                            </div>
                            <div class="" style="width: 40%;display: flex;justify-content: space-around;">
                                <van-button class="buttonSmall" :disabled='item.isDisabled' size="small"
                                    :plain="item.isOK!=='OK'" @click="bwClick(item,'OK')" type="primary">正常</van-button>
                                <van-button class="buttonSmall" size="small" :plain="item.isOK!=='NG'"
                                    @click="bwClick(item,'NG')" :disabled='item.isDisabled' type="danger">异常
                                </van-button>
                            </div>
                        </div>
                        <div style="font-weight: lighter;font-size: 14px;padding-right: 5px">
                            {{item.checkdesc}}
                        </div>
                    </div>
                </div>
                <div style="">
                    <div class="footer">
                        <div class="head_block" style="margin-bottom: 20rpx;align-items: center;">
                            <div class="head_left">
                                <div class="head_bar"></div>
                                <div class="head_title">
                                    ç‚¹æ£€ç»“æžœ
                                </div>
                            </div>
                            <div class="flex_center" style="width: 30%;display: flex;justify-content: space-around;">
                                <van-button class="buttonSmall"
                                    :disabled="centerContent.some(item=>item.isDisabled===true)||centerContent.length===0"
                                    size="small" :plain="resultValue!=='OK'" @click="resultClick('OK')" type="primary">
                                    æ­£å¸¸</van-button>
                                <van-button class="buttonSmall" size="small" :plain="resultValue!=='NG'"
                                    :disabled="centerContent.some(item=>item.isDisabled===true)||centerContent.length===0"
                                    @click="resultClick('NG')" type="danger">异常</van-button>
                            </div>
                        </div>
                        <div
                            style="position:fixed;bottom: 0;width: 96%;display: flex;justify-content: center;flex-direction: column;align-items: center">
                            <van-button class="vanButtonInfo" :disabled="resultValue===''" @click="submit" type="info">
                                ç¡®è®¤æäº¤</van-button>
                        </div>
                    </div>
                </div>
            </div>
            <van-overlay :show="overlayShow" @click="overlayShow=false" />
@@ -62,17 +323,150 @@
                        icon: 'revoke',
                        text: '退出登录'
                    }],
                    topContent2: topContent,
                    centerContent2: centerContent,
                    number2: number
                }
            },
            created() {
            watch: {
                'topContent2.length': {
                    handler(newValue, oldValue) {
                        if (newValue !== oldValue) {
                            // this.topContent2 = topContent
                            // this.$forceUpdate()
                            if (topContent[0] && topContent[0].code) {
                                this.$forceUpdate()
                                this.topContentClcik(topContent[0].code)
                            }
                        }
                    },
                    deep: true,
                    immediate: true,
                },
                'topContent.length': {
                    handler(newValue, oldValue) {
                        if (newValue !== oldValue) {
                            this.$forceUpdate()
                            // if (topContent[0]&&topContent[0].code) {
                            //     this.$forceUpdate()
                            //     this.topContentClcik(topContent[0].code)
                            // }
                        }
                    },
                    deep: true,
                    immediate: true,
                },
                'number2.length': {
                    handler(newValue, oldValue) {
                        this.$forceUpdate()
                    },
                    deep: true,
                    immediate: true,
                },
                'number.length': {
                    handler(newValue, oldValue) {
                        this.$forceUpdate()
                    },
                    deep: true,
                    immediate: true,
                },
            },
            mounted() {
            },
            created() {},
            mounted() {},
            methods: {
                onClickleft(){
                submit() {
                    vant.Toast('xxx1')
                },
                topContentClcik(code) {
                    radioValue = code
                    this.$forceUpdate()
                    get('AppDeviceManage/SelectScanDeviceQrCodeItem', {
                        eqpcode: code
                    }).then(res => {
                        if (res.code === '200') {
                            centerContent = res.data
                            centerContent.forEach(item => {
                                item.isDisabled = item.isscan === 'Y'
                                item.inputValue = ''
                                item.isOK = item.isscan !== 'Y' ? 'OK' : ''
                            })
                            if (centerContent.every(r => r.isOK === 'OK')) {
                                resultValue = 'OK'
                            }
                            if (centerContent.some(r => r.isOK === 'NG')) {
                                resultValue = 'NG'
                            }
                            if (centerContent.some(r => r.isOK === '')) {
                                resultValue = ''
                            }
                            this.$forceUpdate()
                        }
                    })
                },
                resultClick(val) {
                    resultValue = val
                    this.$forceUpdate()
                },
                selected(id) {
                    alert(id)
                },
                // æ‰«æç‚¹æ£€å·¥ä½æ‰«æ
                topScanClick() {
                    createWithoutTitle('../../components/barcode_scan.html', {
                        titleNView: {
                            type: 'float',
                            backgroundColor: 'rgba(215,75,40,0.3)',
                            titleText: '扫一扫',
                            titleColor: '#FFFFFF',
                            autoBackButton: true,
                            buttons: [{
                                fontSrc: '_www/helloh5.ttf',
                                text: '\ue302',
                                fontSize: '18px',
                                onclick: 'javascript:scanPicture()'
                            }]
                        }
                    });
                },
                // ç‚¹æ£€é¡¹ç›®å†…容扫描
                centerScanClick(code) {
                    bwcode = code
                    createWithoutTitle('../../components/barcode_scan2.html', {
                        titleNView: {
                            type: 'float',
                            backgroundColor: 'rgba(215,75,40,0.3)',
                            titleText: '扫一扫',
                            titleColor: '#FFFFFF',
                            autoBackButton: true,
                            buttons: [{
                                fontSrc: '_www/helloh5.ttf',
                                text: '\ue302',
                                fontSize: '18px',
                                onclick: 'javascript:scanPicture()'
                            }]
                        }
                    });
                },
                // éƒ¨ä½æ­£å¸¸ å¼‚常按钮点击
                bwClick(item, val) {
                    item.isOK = val
                    if (centerContent.every(item => item.isOK !== '')) {
                        if (centerContent.every(item => item.isOK === 'OK')) {
                            resultValue = 'OK'
                        } else {
                            resultValue = 'NG'
                        }
                    }
                    this.$forceUpdate() //强制视图更新
                },
                onClickleft() {
                    history.back()
                },
                onClickRight() {
@@ -86,16 +480,18 @@
        })
    </script>
    <style type="text/css">
        @import url('../../css/global.css');
        body {
            background-color: #fff;
        }
        .body {
            height: 600px;
            min-height: 600px;
            background-color: grey;
            margin-top: 0px;
            background-color: #fff;
            position: relative;
            position: relative;
        }
        .van-nav-bar__content {
@@ -107,8 +503,43 @@
            color: #fff;
            letter-spacing: 2px;
        }
        .van-nav-bar__arrow{
        .van-nav-bar__arrow {
            color: #fff !important;
        }
        .createElementDiv {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
            margin-left: 20px;
        }
        .vanFieldInput {
            height: 36px;
            line-height: 36px;
            align-items: center;
            /* width: 200px; */
            padding: 0;
            padding-left: 10px;
            /* border-radius: 5px; */
            margin: 5px 0;
            /* background-color: #fff; */
        }
        .buttonSmall {
            /* border-radius: 5px; */
        }
        .vanButtonInfo {
            width: 100%;
            letter-spacing: 2px;
            height: 50px;
            font-size: 18px;
            /* margin-left: 0; */
        }
    </style>
</html>
pages/sbgl/rcdj_back.html
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,493 @@
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
        <meta name="HandheldFriendly" content="true" />
        <meta name="MobileOptimized" content="320" />
        <title>新凯迪制造云平台</title>
        <!-- å¼•入样式文件 -->
        <link rel="stylesheet" href="../../css/vant.css" />
        <!-- å¼•å…¥ Vue å’Œ Vant çš„ JS æ–‡ä»¶ -->
        <script src="../../js/vue.min.js"></script>
        <script src="../../js/vant.min.js"></script>
        <script type="text/javascript" src="../../js/jquery-1.6.4.min.js"></script>
        <script type="text/javascript" src="../../js/axios.min.js"></script>
        <script type="text/javascript" src="../../js/http.js"></script>
        <script type="text/javascript" src="../../js/common.js"></script>
        <!-- <link rel="stylesheet" href="../../css/global.css" type="text/css" charset="utf-8" /> -->
        <script type="text/javascript">
            var topContent = [{
                code: 'SB001',
                name: '12312',
                wksp_code: "CJ002",
                wksp_name: '12321321',
                eqpchkmain_code: "djbz002"
            }, ];
            var centerContent = [{
                    checkdesc: '1234',
                    code: 'BW001',
                    name: '部位22222',
                    seq: 1,
                    cycle: 'D',
                    isscan: 'N',
                    inputValue: '',
                    isOK: 'OK',
                    isDisabled: false,
                },
                {
                    checkdesc: '气压正常10帕,最高不超过10.5帕,最低不低于9.7',
                    code: 'BW003',
                    name: '部位3',
                    seq: 2,
                    cycle: 'D',
                    isscan: 'N',
                    isOK: 'OK',
                    inputValue: '',
                    isDisabled: true,
                },
            ]
            let radioValue = ''
            let resultValue = ''
            function loadNodes() {
                let li = null
                hl = document.getElementById('contentLeft');
                topContent.forEach((item, index) => {
                    li = document.createElement('div');
                    li.code = item.code
                    li.id = item.code
                    let html = '<div class="createElementDiv">'
                    html += '<div style="">' +
                        '工位编码:' + item.code + '</br>' + '工位名称:' + item.name + '</br>' + '生产车间:' + item.wksp_name +
                        '</div><input  type="radio" class="radioClass" style="margin-right:16px;background-color:red !important;color:red !important;"  name="radioValue"></input>'
                    html += '</div>'
                    li.setAttribute('onclick', 'createElementDivClick(code)')
                    li.innerHTML = html;
                    hl.insertBefore(li, hl.childNodes[index]);
                })
                if (hl.querySelectorAll("div")[1]) {
                    hl.querySelectorAll("div")[1].querySelectorAll("input")[0].checked = true
                    // createElementDivClick(topContent[0].code)
                }
            }
            function createElementDivClick(code) {
                let node = document.getElementById(code)
                node.querySelectorAll("div.createElementDiv>input")[0].checked = true
                get('AppDeviceManage/SelectScanDeviceQrCodeItem', {
                    eqpcode: code
                }).then(res => {
                    vant.Toast(JSON.stringify(res.data))
                })
            }
            function scaned(r) {
                get('AppDeviceManage/CheckScanDeviceQrCodeData', {
                    eqpcode: r
                }).then(res => {
                    if (res.code === '200' && res.data[0].eqpchkmain_code !== null) {
                        // alert(JSON.stringify(res.data))
                        // alert(JSON.stringify(res.data))
                        let li = null
                        hl = document.getElementById('contentLeft');
                        li = document.createElement('div');
                        li.code = res.data[0].code
                        li.id = res.data[0].code
                        let html = '<div class="createElementDiv">'
                        html += '<div style="">' +
                            '工位编码:' + res.data[0].code + '</br>' + '工位名称:' + res.data[0].name + '</br>' + '生产车间:' + res
                            .data[0]
                            .wksp_name +
                            '</div><input  style="margin-right:16px;background-color:red !important;color:red !important;" type="radio"   name="radioValue"></input>'
                        html += '</div>'
                        li.setAttribute('onclick', 'createElementDivClick(code)')
                        li.innerHTML = html;
                        hl.insertBefore(li, hl.childNodes[0]);
                        if (hl.querySelectorAll("div")[1]) {
                            hl.querySelectorAll("div")[1].querySelectorAll("input")[0].checked = true
                            createElementDivClick(res.data[0].code)
                        }
                        topContent.unshift({
                            code: res.data[0].code,
                            name: res.data[0].name,
                            wksp_name: res[0].data.wksp_name
                        })
                    }
                    if (res.code === '200' && res.data[0].eqpchkmain_code === null) {
                        vant.Notify({
                            type: 'danger',
                            message: res.Message
                        });
                    }
                })
            }
            function scaned2(r) {
                alert(r)
            }
            function del() {
                let node = document.getElementById('contentLeft')
                node.removeChild(document.getElementById('SB001'))
            }
        </script>
    </head>
    <body onload="loadNodes()">
        <!-- <body> -->
        <div id="app">
            <div class="body">
                <van-nav-bar title="日常点检" @click-right="onClickRight" left-arrow @click-left="onClickleft">
                    <template #right>
                        <van-popover style="" placement="bottom-end" :offset="[13,8]" v-model="showPopover"
                            trigger="click" :actions="actions" @select="onSelect">
                            <template #reference>
                                <van-icon name="bars" size='20' color='#fff' />
                            </template>
                        </van-popover>
                    </template>
                </van-nav-bar>
                <div class="head">
                    <div class="head_block">
                        <div class="head_left">
                            <div class="head_bar"></div>
                            <div class="head_title">
                                æ‰«æç‚¹æ£€å·¥ä½
                            </div>
                        </div>
                        <div style="margin-right: 10px;">
                            <van-icon name="scan" color='red' size='24' @click='topScanClick()' />
                        </div>
                    </div>
                    <div class="flex_between" style="">
                        <div id="contentLeft" style="width: 100%;">
                        </div>
                        <div id="contentRight">
                        </div>
                    </div>
                </div>
                <div class="head" style="margin-bottom: 15px;padding-bottom: 10px;"
                    :style="{marginTop:topContent.length===0?'78px':'0'}">
                    <div class="head_block" style="margin-bottom:10px;">
                        <div class="head_left">
                            <div class="head_bar"></div>
                            <div class="head_title">
                                ç‚¹æ£€é¡¹ç›®å†…容
                            </div>
                        </div>
                    </div>
                    <div class="center_border flex_column" style="margin:  5px;" v-for="item in centerContent"
                        :key="item.code">
                        <div class="flex_between">
                            <div class="center_title">{{item.name}}</div>
                            <!-- v-if="item.isscan==='Y'" -->
                            <div style="margin-right: 10px;">
                                <van-icon name="scan" color='red' size='24' @click='centerScanClick(item.code)' />
                            </div>
                        </div>
                        <div class="flex_between ">
                            <div class='flex_between'>
                                <van-field class="vanFieldInput" style="" border v-model="item.inputValue"
                                    label="请输入" />
                            </div>
                            <div class="" style="width: 40%;display: flex;justify-content: space-around;">
                                <van-button class="buttonSmall" size="small" :plain="item.isOK!=='OK'"
                                    @click="bwClick(item,'OK')" type="primary">正常</van-button>
                                <van-button class="buttonSmall" size="small" :plain="item.isOK!=='NG'"
                                    @click="bwClick(item,'NG')" type="danger">异常</van-button>
                            </div>
                        </div>
                        <div style="font-weight: lighter;font-size: 14px;padding-right: 5px">
                            {{item.checkdesc}}
                        </div>
                    </div>
                </div>
                <!--
                <div style="position:fixed;bottom: 0;width: 100%;display: flex;justify-content: center;flex-direction: column;align-items: center">
                    <div style="display: flex;float: left;">
                        111
                    </div>
                    <van-button class="vanButtonInfo"  type="info">确认提交</van-button>
                </div> -->
                <div style="">
                    <div class="footer">
                        <div class="head_block" style="margin-bottom: 20rpx;align-items: center;">
                            <div class="head_left">
                                <div class="head_bar"></div>
                                <div class="head_title">
                                    ç‚¹æ£€ç»“æžœ
                                </div>
                            </div>
                            <div class="flex_center" style="width: 30%;display: flex;justify-content: space-around;">
                                <van-button class="buttonSmall" size="small" :plain="resultValue!=='OK'"
                                    @click="resultClick('OK')" type="primary">正常</van-button>
                                <van-button class="buttonSmall" size="small" :plain="resultValue!=='NG'"
                                    @click="resultClick('NG')" type="danger">异常</van-button>
                            </div>
                        </div>
                        <div
                            style="position:fixed;bottom: 0;width: 96%;display: flex;justify-content: center;flex-direction: column;align-items: center">
                            <van-button class="vanButtonInfo" type="info">确认提交</van-button>
                        </div>
                    </div>
                </div>
            </div>
            <!-- <button @click="del">删除节点</button> -->
            <van-overlay :show="overlayShow" @click="overlayShow=false" />
        </div>
    </body>
    <script>
        var app = new Vue({
            el: '#app',
            data: function() {
                return {
                    overlayShow: false,
                    showPopover: false,
                    actions: [{
                        icon: 'description',
                        text: '操作指导'
                    }, {
                        icon: 'award-o',
                        text: '成品追溯'
                    }, {
                        icon: 'revoke',
                        text: '退出登录'
                    }],
                    radioValue: '',
                }
            },
            watch: {
            },
            created() {
            },
            mounted() {
            },
            methods: {
                resultClick(val) {
                    resultValue = val
                    this.$forceUpdate()
                },
                selected(id) {
                    alert(id)
                },
                // æ‰«æç‚¹æ£€å·¥ä½æ‰«æ
                topScanClick() {
                    createWithoutTitle('../../components/barcode_scan.html', {
                        titleNView: {
                            type: 'float',
                            backgroundColor: 'rgba(215,75,40,0.3)',
                            titleText: '扫一扫',
                            titleColor: '#FFFFFF',
                            autoBackButton: true,
                            buttons: [{
                                fontSrc: '_www/helloh5.ttf',
                                text: '\ue302',
                                fontSize: '18px',
                                onclick: 'javascript:scanPicture()'
                            }]
                        }
                    });
                },
                // ç‚¹æ£€é¡¹ç›®å†…容扫描
                centerScanClick() {
                    createWithoutTitle('../../components/barcode_scan2.html', {
                        titleNView: {
                            type: 'float',
                            backgroundColor: 'rgba(215,75,40,0.3)',
                            titleText: '扫一扫',
                            titleColor: '#FFFFFF',
                            autoBackButton: true,
                            buttons: [{
                                fontSrc: '_www/helloh5.ttf',
                                text: '\ue302',
                                fontSize: '18px',
                                onclick: 'javascript:scanPicture()'
                            }]
                        }
                    });
                },
                // éƒ¨ä½æ­£å¸¸ å¼‚常按钮点击
                bwClick(item, val) {
                    item.isOK = val
                    if (centerContent.every(item => item.isOK !== '')) {
                        // if (centerContent.every(item => item.isOK === 'OK')) {
                        //     this.resultValue = 'OK'
                        // } else {
                        //     this.resultValue = 'NG'
                        // }
                    }
                    this.$forceUpdate() //强制视图更新
                },
                groupChange(code) {
                },
                onClickleft() {
                    history.back()
                },
                onClickRight() {
                    this.overlayShow = true
                },
                onSelect(action) {
                    vant.Toast(action.text);
                    this.overlayShow = false
                },
            }
        })
    </script>
    <style type="text/css">
        @import url('../../css/global.css');
        body {
            background-color: #fff;
        }
        .body {
            min-height: 600px;
            background-color: grey;
            margin-top: 0px;
            background-color: #fff;
            position: relative;
        }
        .van-nav-bar__content {
            background-color: #2651d8;
            height: 44px;
        }
        .van-nav-bar__title {
            color: #fff;
            letter-spacing: 2px;
        }
        .van-nav-bar__arrow {
            color: #fff !important;
        }
        .createElementDiv {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
            margin-left: 20px;
        }
        .vanFieldInput {
            height: 36px;
            line-height: 36px;
            align-items: center;
            width: 90%;
            /* border-radius: 5px; */
            margin: 5px 0;
            /* background-color: #fff; */
        }
        .buttonSmall {
            /* border-radius: 5px; */
        }
        .vanButtonInfo {
            width: 100%;
            letter-spacing: 2px;
            height: 50px;
            font-size: 18px;
            /* margin-left: 0; */
        }
        /*
        ::v-deep input[type="radio"] {
            background-color: red !important;
            color: red !important;
            position: absolute !important;
        }
        ::v-deep .radioClass {
            background-color: red !important;
            color: red !important;
                position: absolute !important;
        } */
        /*     input[type="radio"]+label ::before {
            content: '';
            display: inline-block;
            vertical-align: middle;
            width: 15px;
            height: 15px;
            margin-right: 5px;
            box-sizing: border-box;
            border-radius: 50%;
            margin-bottom: 4px;
            border: 1px solid #bfcbd9;
        } */
    </style>
</html>
plus/barcode.html
@@ -1,151 +1,173 @@
<!DOCTYPE HTML>
<html>
    <head>
        <meta charset="utf-8"/>
        <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
        <meta name="HandheldFriendly" content="true"/>
        <meta name="MobileOptimized" content="320"/>
        <meta charset="utf-8" />
        <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
        <meta name="HandheldFriendly" content="true" />
        <meta name="MobileOptimized" content="320" />
        <title>Hello H5+</title>
        <script type="text/javascript" src="../js/common.js"></script>
        <script type="text/javascript">
var img = null;
var blist = [];
function scaned(t, r, f){
    var d = new Date();
    var h=d.getHours(),m=d.getMinutes(),s=d.getSeconds(),ms=d.getMilliseconds();
    if(h < 10){ h='0'+h; }
    if(m < 10){ m='0'+m; }
    if(s < 10){ s='0'+s; }
    if(ms < 10){ ms='00'+ms; }
    else if(ms < 100){ ms='0'+ms; }
    var ts = '['+h+':'+m+':'+s+'.'+ms+']';
    var li=null,hl = document.getElementById('history');
    if(blist.length > 0){
        li = document.createElement('li');
        li.className = 'ditem';
        hl.insertBefore(li, hl.childNodes[0]);
    } else{
        li = document.getElementById('nohistory');
    }
    li.id = blist.length;
    var html = '['+h+':'+m+':'+s+'.'+ms+']'+'  '+t+'码<div class="hdata">';
    html += r;
    html += '</div>';
    li.innerHTML = html;
    li.setAttribute('onclick', 'selected(id)');
    blist[blist.length] = {type:t,result:r,file:f};
    update(t, r, f);
}
function selected(id){
    var h = blist[id];
    update( h.type, h.result, h.file );
    if(h.result.indexOf('http://')==0  || h.result.indexOf('https://')==0){
        plus.nativeUI.confirm(h.result, function(i){
            if(i.index == 0){
                plus.runtime.openURL(h.result);
            var img = null;
            var blist = [];
            function scaned(t, r, f) {
                var d = new Date();
                var h = d.getHours(),
                    m = d.getMinutes(),
                    s = d.getSeconds(),
                    ms = d.getMilliseconds();
                if (h < 10) {
                    h = '0' + h;
                }
                if (m < 10) {
                    m = '0' + m;
                }
                if (s < 10) {
                    s = '0' + s;
                }
                if (ms < 10) {
                    ms = '00' + ms;
                } else if (ms < 100) {
                    ms = '0' + ms;
                }
                var ts = '[' + h + ':' + m + ':' + s + '.' + ms + ']';
                var li = null,
                    hl = document.getElementById('history');
                if (blist.length > 0) {
                    li = document.createElement('li');
                    li.className = 'ditem';
                    hl.insertBefore(li, hl.childNodes[0]);
                } else {
                    li = document.getElementById('nohistory');
                }
                li.id = blist.length;
                var html = '[' + h + ':' + m + ':' + s + '.' + ms + ']' + '  ' + t + '码<div class="hdata">';
                html += r;
                html += '</div>';
                li.innerHTML = html;
                li.setAttribute('onclick', 'selected(id)');
                blist[blist.length] = {
                    type: t,
                    result: r,
                    file: f
                };
                update(t, r, f);
            }
        }, '', ['打开', '取消']);
    } else{
        plus.nativeUI.alert(h.result);
    }
}
function update(t, r, f){
    outSet('扫描成功:');
    outLine(t);
    outLine(r);
    outLine('\n图片地址:'+f);
    if(!f || f=='null'){
        img.src = '../img/barcode.png';
    } else{
        plus.io.resolveLocalFileSystemURL(f, function(entry){
            img.src=entry.toLocalURL();
        });
        //img.src = 'http://localhost:13131/'+f;
    }
}
function onempty(){
    if(window.plus){
        plus.nativeUI.alert('无扫描记录');
    } else {
        alert('无扫描记录');
    }
}
function cleanHistroy(){
    if(blist.length > 0){
        var hl = document.getElementById('history');
        hl.innerHTML = '<li id="nohistory" class="ditem" onclick="onempty();">无历史记录    </li>';
    }
    plus.io.resolveLocalFileSystemURL('_doc/barcode/', function(entry){
        entry.removeRecursively(function(){
            // Success
        }, function(e){
            //alert( "failed"+e.message );
        });
    });
}
// æ‰“开二维码扫描界面
function openBarcode(){
    createWithoutTitle('barcode_scan.html', {
        titleNView:{
            type: 'float',
            backgroundColor: 'rgba(215,75,40,0.3)',
            titleText: '扫一扫',
            titleColor: '#FFFFFF',
            autoBackButton: true,
            buttons: [{
                fontSrc: '_www/helloh5.ttf',
                text: '\ue302',
                fontSize: '18px',
                onclick: 'javascript:scanPicture()'
            }]
        }
    });
}
// æ‰“开自定义扫描界面
function openBarcodeCustom(){
    createWithoutTitle('barcode_custom.html', {
        titleNView:{
            type: 'float',
            backgroundColor: 'rgba(215,75,40,0.3)',
            titleText: '扫一扫',
            titleColor: '#FFFFFF',
            autoBackButton: true,
            buttons: [{
                fontSrc: '_www/helloh5.ttf',
                text: '\ue401',
                fontSize: '18px',
                onclick: 'javascript:switchFlash()'
            }]
        }
    });
}
            function selected(id) {
                var h = blist[id];
                update(h.type, h.result, h.file);
                if (h.result.indexOf('http://') == 0 || h.result.indexOf('https://') == 0) {
                    plus.nativeUI.confirm(h.result, function(i) {
                        if (i.index == 0) {
                            plus.runtime.openURL(h.result);
                        }
                    }, '', ['打开', '取消']);
                } else {
                    plus.nativeUI.alert(h.result);
                }
            }
            function update(t, r, f) {
                outSet('扫描成功:');
                outLine(t);
                outLine(r);
                outLine('\n图片地址:' + f);
                if (!f || f == 'null') {
                    img.src = '../img/barcode.png';
                } else {
                    plus.io.resolveLocalFileSystemURL(f, function(entry) {
                        img.src = entry.toLocalURL();
                    });
                    //img.src = 'http://localhost:13131/'+f;
                }
            }
            function onempty() {
                if (window.plus) {
                    plus.nativeUI.alert('无扫描记录');
                } else {
                    alert('无扫描记录');
                }
            }
            function cleanHistroy() {
                if (blist.length > 0) {
                    var hl = document.getElementById('history');
                    hl.innerHTML = '<li id="nohistory" class="ditem" onclick="onempty();">无历史记录    </li>';
                }
                plus.io.resolveLocalFileSystemURL('_doc/barcode/', function(entry) {
                    entry.removeRecursively(function() {
                        // Success
                    }, function(e) {
                        //alert( "failed"+e.message );
                    });
                });
            }
            // æ‰“开二维码扫描界面
            function openBarcode() {
                createWithoutTitle('barcode_scan.html', {
                    titleNView: {
                        type: 'float',
                        backgroundColor: 'rgba(215,75,40,0.3)',
                        titleText: '扫一扫',
                        titleColor: '#FFFFFF',
                        autoBackButton: true,
                        buttons: [{
                            fontSrc: '_www/helloh5.ttf',
                            text: '\ue302',
                            fontSize: '18px',
                            onclick: 'javascript:scanPicture()'
                        }]
                    }
                });
            }
            // æ‰“开自定义扫描界面
            function openBarcodeCustom() {
                createWithoutTitle('barcode_custom.html', {
                    titleNView: {
                        type: 'float',
                        backgroundColor: 'rgba(215,75,40,0.3)',
                        titleText: '扫一扫',
                        titleColor: '#FFFFFF',
                        autoBackButton: true,
                        buttons: [{
                            fontSrc: '_www/helloh5.ttf',
                            text: '\ue401',
                            fontSize: '18px',
                            onclick: 'javascript:switchFlash()'
                        }]
                    }
                });
            }
        </script>
        <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8"/>
        <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
        <style type="text/css" media="screen">
.hdata {
    color: #e1673e;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
            .hdata {
                color: #e1673e;
                font-size: 14px;
                overflow: hidden;
                text-overflow: ellipsis;
                white-space: nowrap;
            }
        </style>
    </head>
    <body onload="img=document.getElementById('bimg')">
        <br/>
        <img style="width:40%" id="bimg" src="../img/barcode.png"/>
        <br/>
        <br />
        <img style="width:40%" id="bimg" src="../img/barcode.png" />
        <br />
        <div class="button" onclick="openBarcode()">扫一扫</div>
        <div class="button" onclick="openBarcodeCustom()">扫一扫(自定义)</div>
        <br/>
        <br />
        <ul id="history" class="dlist" style="text-align:left;">
            <li id="nohistory" class="ditem" onclick="onempty()">无历史记录    </li>
            <li id="nohistory" class="ditem" onclick="onempty()">无历史记录 </li>
        </ul>
        <br/>
        <br />
        <div class="button button-waring" onclick="cleanHistroy()">清空历史记录</div>
        <div id="outpos"/>
        <div id="outpos" />
        <div id="output">
Barcode提供二维码扫描识别功能,支持调用摄像头即时扫描二维码,也可直接输入图片进行扫描识别。
            Barcode提供二维码扫描识别功能,支持调用摄像头即时扫描二维码,也可直接输入图片进行扫描识别。
        </div>
    </body>
</html>
</html>
plus/barcode_custom.html
@@ -1,136 +1,157 @@
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8"/>
        <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover"/>
        <meta name="HandheldFriendly" content="true"/>
        <meta name="MobileOptimized" content="320"/>
        <meta charset="utf-8" />
        <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover" />
        <meta name="HandheldFriendly" content="true" />
        <meta name="MobileOptimized" content="320" />
        <title>Hello H5+</title>
        <script type="text/javascript" src="../js/common.js"></script>
        <script type="text/javascript">
var ws=null,wo=null;
var scan=null;
// H5 plus事件处理
function plusReady(){
    // èŽ·å–çª—å£å¯¹è±¡
    ws=plus.webview.currentWebview();
    nv=ws.getTitleNView();
    wo=ws.opener();
    // å¼€å§‹æ‰«æ
    ws.addEventListener('show', function(){
        scan=new plus.barcode.Barcode('bcid',[plus.barcode.QR,plus.barcode.EAN8,plus.barcode.EAN13],{frameColor:'#00FF00',scanbarColor:'#00FF00'});
        scan.onmarked=onmarked;
        scan.start({conserve:true,filename:'_doc/barcode/'});
        createSubview();
    }, false);
    // æ˜¾ç¤ºé¡µé¢å¹¶å…³é—­ç­‰å¾…框
    ws.show('pop-in');
}
document.addEventListener('plusready', plusReady, false);
            var ws = null,
                wo = null;
            var scan = null;
            // H5 plus事件处理
            function plusReady() {
                // èŽ·å–çª—å£å¯¹è±¡
                ws = plus.webview.currentWebview();
                nv = ws.getTitleNView();
                wo = ws.opener();
                // å¼€å§‹æ‰«æ
                ws.addEventListener('show', function() {
                    scan = new plus.barcode.Barcode('bcid', [plus.barcode.QR, plus.barcode.EAN8, plus.barcode.EAN13], {
                        frameColor: '#00FF00',
                        scanbarColor: '#00FF00'
                    });
                    scan.onmarked = onmarked;
                    scan.start({
                        conserve: true,
                        filename: '_doc/barcode/'
                    });
                    createSubview();
                }, false);
                // æ˜¾ç¤ºé¡µé¢å¹¶å…³é—­ç­‰å¾…框
                ws.show('pop-in');
            }
            document.addEventListener('plusready', plusReady, false);
// äºŒç»´ç æ‰«ææˆåŠŸ
function onmarked(type, result, file){
    switch(type){
        case plus.barcode.QR:
        type = 'QR';
        break;
        case plus.barcode.EAN13:
        type = 'EAN13';
        break;
        case plus.barcode.EAN8:
        type = 'EAN8';
        break;
        default:
        type = '其它'+type;
        break;
    }
    result = result.replace(/\r\n/g, '');
    wo.evalJS("scaned('"+ type +"','"+ result +"','"+ file +"');");
    back();
}
// åˆ›å»ºå­çª—口
var view = null;
function createSubview(){
    view = new plus.nativeObj.View('nbutton', {
        bottom: '20px',
        left: '30%',
        width: '40%',
        height: '44px'
    }, [{
        tag: 'rect',
        id: 'rect',
        rectStyles: {
            radius: '8px',
            color: 'rgba(255,0,0,0.8)'
        }},{
        tag: 'font',
        id: 'text',
        text: '暂 停',
        textStyles: {
            color: '#FFFFFF'
        }
    }]);
    // å¤„理事件
    view.addEventListener('click', function(e){
        switchScan();
    }, false);
    view.addEventListener('touchstart', function(e){
        view.drawRect({
            radius: '8px',
            color: 'rgba(255,0,0,0.5)'
        }, {}, 'rect');
    }, false);
    view.addEventListener('touchend', function(e){
        view.drawRect({
            radius: '8px',
            color: 'rgba(255,0,0,0.8)'
        }, {}, 'rect');
    }, false);
    ws.append(view);
}
// å¼€å…³é—ªå…‰ç¯
var bFlash = false;
var AVCaptureDevice=null;
var Camera=null;
function switchFlash(){
    bFlash = !bFlash;
    scan.setFlash(bFlash);
    ws.setStyle({titleNView: {
        buttons: [{
            fontSrc: '_www/helloh5.ttf',
            text: (bFlash?'\ue400':'\ue401'),
            fontSize: '18px',
            onclick: 'javascript:switchFlash()'
        }]
    }});
}
// åˆ‡æ¢æ‰«æ
var bScan = false;
function switchScan(){
    if(bScan){
        scan.start({conserve:true, filename:'_doc/barcode/'});
        view&&(view.drawText('暂 停', {}, {color:'#FFFFFF'}, 'text'));
    }else{
        scan.cancel();
        view&&(view.drawText('开 始', {}, {color:'#FFFFFF'}, 'text'));
    }
    bScan=!bScan;
}
            // äºŒç»´ç æ‰«ææˆåŠŸ
            function onmarked(type, result, file) {
                switch (type) {
                    case plus.barcode.QR:
                        type = 'QR';
                        break;
                    case plus.barcode.EAN13:
                        type = 'EAN13';
                        break;
                    case plus.barcode.EAN8:
                        type = 'EAN8';
                        break;
                    default:
                        type = '其它' + type;
                        break;
                }
                result = result.replace(/\r\n/g, '');
                wo.evalJS("scaned('" + type + "','" + result + "','" + file + "');");
                back();
            }
            // åˆ›å»ºå­çª—口
            var view = null;
            function createSubview() {
                view = new plus.nativeObj.View('nbutton', {
                    bottom: '20px',
                    left: '30%',
                    width: '40%',
                    height: '44px'
                }, [{
                    tag: 'rect',
                    id: 'rect',
                    rectStyles: {
                        radius: '8px',
                        color: 'rgba(255,0,0,0.8)'
                    }
                }, {
                    tag: 'font',
                    id: 'text',
                    text: '暂 停',
                    textStyles: {
                        color: '#FFFFFF'
                    }
                }]);
                // å¤„理事件
                view.addEventListener('click', function(e) {
                    switchScan();
                }, false);
                view.addEventListener('touchstart', function(e) {
                    view.drawRect({
                        radius: '8px',
                        color: 'rgba(255,0,0,0.5)'
                    }, {}, 'rect');
                }, false);
                view.addEventListener('touchend', function(e) {
                    view.drawRect({
                        radius: '8px',
                        color: 'rgba(255,0,0,0.8)'
                    }, {}, 'rect');
                }, false);
                ws.append(view);
            }
            // å¼€å…³é—ªå…‰ç¯
            var bFlash = false;
            var AVCaptureDevice = null;
            var Camera = null;
            function switchFlash() {
                bFlash = !bFlash;
                scan.setFlash(bFlash);
                ws.setStyle({
                    titleNView: {
                        buttons: [{
                            fontSrc: '_www/helloh5.ttf',
                            text: (bFlash ? '\ue400' : '\ue401'),
                            fontSize: '18px',
                            onclick: 'javascript:switchFlash()'
                        }]
                    }
                });
            }
            // åˆ‡æ¢æ‰«æ
            var bScan = false;
            function switchScan() {
                if (bScan) {
                    scan.start({
                        conserve: true,
                        filename: '_doc/barcode/'
                    });
                    view && (view.drawText('暂 停', {}, {
                        color: '#FFFFFF'
                    }, 'text'));
                } else {
                    scan.cancel();
                    view && (view.drawText('开 始', {}, {
                        color: '#FFFFFF'
                    }, 'text'));
                }
                bScan = !bScan;
            }
        </script>
        <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8"/>
        <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
        <style type="text/css">
#bcid {
    width: 100%;
    position: absolute;
    top: 0px;
    bottom: 0px;
    text-align: center;
}
.tip {
    color: #FFFFFF;
    font-weight: bold;
    text-shadow: 0px -1px #103E5C;
}
            #bcid {
                width: 100%;
                position: absolute;
                top: 0px;
                bottom: 0px;
                text-align: center;
            }
            .tip {
                color: #FFFFFF;
                font-weight: bold;
                text-shadow: 0px -1px #103E5C;
            }
        </style>
    </head>
    <body style="background-color:#000000;">
plus/barcode_scan.html
@@ -1,81 +1,86 @@
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8"/>
        <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover"/>
        <meta name="HandheldFriendly" content="true"/>
        <meta name="MobileOptimized" content="320"/>
        <meta charset="utf-8" />
        <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover" />
        <meta name="HandheldFriendly" content="true" />
        <meta name="MobileOptimized" content="320" />
        <title>Hello H5+</title>
        <script type="text/javascript" src="../js/common.js"></script>
        <script type="text/javascript">
var ws=null,wo=null;
var scan=null;
// H5 plus事件处理
function plusReady(){
    // èŽ·å–çª—å£å¯¹è±¡
    ws=plus.webview.currentWebview();
    wo=ws.opener();
    // å¼€å§‹æ‰«æ
    ws.addEventListener('show', function(){
        scan=new plus.barcode.Barcode('bcid');
        scan.onmarked=onmarked;
        scan.start({conserve:true,filename:'_doc/barcode/'});
        createSubview();
    }, false);
    // æ˜¾ç¤ºé¡µé¢å¹¶å…³é—­ç­‰å¾…框
    ws.show('pop-in');
}
document.addEventListener('plusready', plusReady, false);
            var ws = null,
                wo = null;
            var scan = null;
            // H5 plus事件处理
            function plusReady() {
                // èŽ·å–çª—å£å¯¹è±¡
                ws = plus.webview.currentWebview();
                wo = ws.opener();
                // å¼€å§‹æ‰«æ
                ws.addEventListener('show', function() {
                    scan = new plus.barcode.Barcode('bcid');
                    scan.onmarked = onmarked;
                    scan.start({
                        conserve: true,
                        filename: '_doc/barcode/'
                    });
                    createSubview();
                }, false);
                // æ˜¾ç¤ºé¡µé¢å¹¶å…³é—­ç­‰å¾…框
                ws.show('pop-in');
            }
            document.addEventListener('plusready', plusReady, false);
// äºŒç»´ç æ‰«ææˆåŠŸ
function onmarked(type, result, file){
    switch(type){
        case plus.barcode.QR:
        type = 'QR';
        break;
        case plus.barcode.EAN13:
        type = 'EAN13';
        break;
        case plus.barcode.EAN8:
        type = 'EAN8';
        break;
        default:
        type = '其它'+type;
        break;
    }
    result = result.replace(/\r\n/g, '');
    wo.evalJS("scaned('"+ type +"','"+ result +"','"+ file +"');");
    back();
}
// åˆ›å»ºå­çª—口
function createSubview(){
    //
}
// ä»Žç›¸å†Œä¸­é€‰æ‹©äºŒç»´ç å›¾ç‰‡
function scanPicture(){
    plus.gallery.pick(function(path){
        plus.barcode.scan(path,onmarked,function(error){
            plus.nativeUI.alert('无法识别此图片');
        });
    }, function(err){
        console.log('Failed: '+err.message);
    });
}
            // äºŒç»´ç æ‰«ææˆåŠŸ
            function onmarked(type, result, file) {
                switch (type) {
                    case plus.barcode.QR:
                        type = 'QR';
                        break;
                    case plus.barcode.EAN13:
                        type = 'EAN13';
                        break;
                    case plus.barcode.EAN8:
                        type = 'EAN8';
                        break;
                    default:
                        type = '其它' + type;
                        break;
                }
                result = result.replace(/\r\n/g, '');
                wo.evalJS("scaned('" + type + "','" + result + "','" + file + "');");
                back();
            }
            // åˆ›å»ºå­çª—口
            function createSubview() {
                //
            }
            // ä»Žç›¸å†Œä¸­é€‰æ‹©äºŒç»´ç å›¾ç‰‡
            function scanPicture() {
                plus.gallery.pick(function(path) {
                    plus.barcode.scan(path, onmarked, function(error) {
                        plus.nativeUI.alert('无法识别此图片');
                    });
                }, function(err) {
                    console.log('Failed: ' + err.message);
                });
            }
        </script>
        <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8"/>
        <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
        <style type="text/css">
#bcid {
    width: 100%;
    position: absolute;
    top: 0px;
    bottom: 0px;
    text-align: center;
}
.tip {
    color: #FFFFFF;
    font-weight: bold;
    text-shadow: 0px -1px #103E5C;
}
            #bcid {
                width: 100%;
                position: absolute;
                top: 0px;
                bottom: 0px;
                text-align: center;
            }
            .tip {
                color: #FFFFFF;
                font-weight: bold;
                text-shadow: 0px -1px #103E5C;
            }
        </style>
    </head>
    <body style="background-color:#000000;">
unpackage/cache/wgt/H5EDA0853/components/barcode_custom.html
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,163 @@
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover" />
        <meta name="HandheldFriendly" content="true" />
        <meta name="MobileOptimized" content="320" />
        <title>Hello H5+</title>
        <script type="text/javascript" src="../js/common.js"></script>
        <script type="text/javascript">
            var ws = null,
                wo = null;
            var scan = null;
            // H5 plus事件处理
            function plusReady() {
                // èŽ·å–çª—å£å¯¹è±¡
                ws = plus.webview.currentWebview();
                nv = ws.getTitleNView();
                wo = ws.opener();
                // å¼€å§‹æ‰«æ
                ws.addEventListener('show', function() {
                    scan = new plus.barcode.Barcode('bcid', [plus.barcode.QR, plus.barcode.EAN8, plus.barcode.EAN13], {
                        frameColor: '#00FF00',
                        scanbarColor: '#00FF00'
                    });
                    scan.onmarked = onmarked;
                    scan.start({
                        conserve: true,
                        filename: '_doc/barcode/'
                    });
                    createSubview();
                }, false);
                // æ˜¾ç¤ºé¡µé¢å¹¶å…³é—­ç­‰å¾…框
                ws.show('pop-in');
            }
            document.addEventListener('plusready', plusReady, false);
            // äºŒç»´ç æ‰«ææˆåŠŸ
            function onmarked(type, result, file) {
                switch (type) {
                    case plus.barcode.QR:
                        type = 'QR';
                        break;
                    case plus.barcode.EAN13:
                        type = 'EAN13';
                        break;
                    case plus.barcode.EAN8:
                        type = 'EAN8';
                        break;
                    default:
                        type = '其它' + type;
                        break;
                }
                result = result.replace(/\r\n/g, '');
                wo.evalJS("scaned('" + type + "','" + result + "','" + file + "');");
                back();
            }
            // åˆ›å»ºå­çª—口
            var view = null;
            function createSubview() {
                view = new plus.nativeObj.View('nbutton', {
                    bottom: '20px',
                    left: '30%',
                    width: '40%',
                    height: '44px'
                }, [{
                    tag: 'rect',
                    id: 'rect',
                    rectStyles: {
                        radius: '8px',
                        color: 'rgba(255,0,0,0.8)'
                    }
                }, {
                    tag: 'font',
                    id: 'text',
                    text: '暂 停',
                    textStyles: {
                        color: '#FFFFFF'
                    }
                }]);
                // å¤„理事件
                view.addEventListener('click', function(e) {
                    switchScan();
                }, false);
                view.addEventListener('touchstart', function(e) {
                    view.drawRect({
                        radius: '8px',
                        color: 'rgba(255,0,0,0.5)'
                    }, {}, 'rect');
                }, false);
                view.addEventListener('touchend', function(e) {
                    view.drawRect({
                        radius: '8px',
                        color: 'rgba(255,0,0,0.8)'
                    }, {}, 'rect');
                }, false);
                ws.append(view);
            }
            // å¼€å…³é—ªå…‰ç¯
            var bFlash = false;
            var AVCaptureDevice = null;
            var Camera = null;
            function switchFlash() {
                bFlash = !bFlash;
                scan.setFlash(bFlash);
                ws.setStyle({
                    titleNView: {
                        buttons: [{
                            fontSrc: '_www/helloh5.ttf',
                            text: (bFlash ? '\ue400' : '\ue401'),
                            fontSize: '18px',
                            onclick: 'javascript:switchFlash()'
                        }]
                    }
                });
            }
            // åˆ‡æ¢æ‰«æ
            var bScan = false;
            function switchScan() {
                if (bScan) {
                    scan.start({
                        conserve: true,
                        filename: '_doc/barcode/'
                    });
                    view && (view.drawText('暂 停', {}, {
                        color: '#FFFFFF'
                    }, 'text'));
                } else {
                    scan.cancel();
                    view && (view.drawText('开 始', {}, {
                        color: '#FFFFFF'
                    }, 'text'));
                }
                bScan = !bScan;
            }
        </script>
        <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
        <style type="text/css">
            #bcid {
                width: 100%;
                position: absolute;
                top: 0px;
                bottom: 0px;
                text-align: center;
            }
            .tip {
                color: #FFFFFF;
                font-weight: bold;
                text-shadow: 0px -1px #103E5C;
            }
        </style>
    </head>
    <body style="background-color:#000000;">
        <div id="bcid">
            <div style="height:40%"></div>
            <p class="tip">...载入中...</p>
        </div>
    </body>
</html>
unpackage/cache/wgt/H5EDA0853/components/barcode_scan.html
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,94 @@
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover" />
        <meta name="HandheldFriendly" content="true" />
        <meta name="MobileOptimized" content="320" />
        <title>Hello H5+</title>
        <script type="text/javascript" src="../js/common.js"></script>
        <script type="text/javascript">
            var ws = null,
                wo = null;
            var scan = null;
            // H5 plus事件处理
            function plusReady() {
                // èŽ·å–çª—å£å¯¹è±¡
                ws = plus.webview.currentWebview();
                wo = ws.opener();
                // å¼€å§‹æ‰«æ
                ws.addEventListener('show', function() {
                    scan = new plus.barcode.Barcode('bcid');
                    scan.onmarked = onmarked;
                    scan.start({
                        conserve: true,
                        filename: '_doc/barcode/'
                    });
                    createSubview();
                }, false);
                // æ˜¾ç¤ºé¡µé¢å¹¶å…³é—­ç­‰å¾…框
                ws.show('pop-in');
            }
            document.addEventListener('plusready', plusReady, false);
            // äºŒç»´ç æ‰«ææˆåŠŸ
            function onmarked(type, result, file) {
                switch (type) {
                    case plus.barcode.QR:
                        type = 'QR';
                        break;
                    case plus.barcode.EAN13:
                        type = 'EAN13';
                        break;
                    case plus.barcode.EAN8:
                        type = 'EAN8';
                        break;
                    default:
                        type = '其它' + type;
                        break;
                }
                result = result.replace(/\r\n/g, '');
                // wo.evalJS("scaned('" + type + "','" + result + "','" + file + "');");
                wo.evalJS("scaned('" + result + "');");
                back();
            }
            // åˆ›å»ºå­çª—口
            function createSubview() {
                //
            }
            // ä»Žç›¸å†Œä¸­é€‰æ‹©äºŒç»´ç å›¾ç‰‡
            function scanPicture() {
                plus.gallery.pick(function(path) {
                    plus.barcode.scan(path, onmarked, function(error) {
                        plus.nativeUI.alert('无法识别此图片');
                    });
                }, function(err) {
                    console.log('Failed: ' + err.message);
                });
            }
        </script>
        <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
        <style type="text/css">
            #bcid {
                width: 100%;
                position: absolute;
                top: 0px;
                bottom: 0px;
                text-align: center;
            }
            .tip {
                color: #FFFFFF;
                font-weight: bold;
                text-shadow: 0px -1px #103E5C;
            }
        </style>
    </head>
    <body style="background-color:#000000;">
        <div id="bcid">
            <div style="height:40%"></div>
            <p class="tip">...载入中...</p>
        </div>
    </body>
</html>
unpackage/cache/wgt/H5EDA0853/components/barcode_scan2.html
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,94 @@
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover" />
        <meta name="HandheldFriendly" content="true" />
        <meta name="MobileOptimized" content="320" />
        <title>Hello H5+</title>
        <script type="text/javascript" src="../js/common.js"></script>
        <script type="text/javascript">
            var ws = null,
                wo = null;
            var scan = null;
            // H5 plus事件处理
            function plusReady() {
                // èŽ·å–çª—å£å¯¹è±¡
                ws = plus.webview.currentWebview();
                wo = ws.opener();
                // å¼€å§‹æ‰«æ
                ws.addEventListener('show', function() {
                    scan = new plus.barcode.Barcode('bcid');
                    scan.onmarked = onmarked;
                    scan.start({
                        conserve: true,
                        filename: '_doc/barcode/'
                    });
                    createSubview();
                }, false);
                // æ˜¾ç¤ºé¡µé¢å¹¶å…³é—­ç­‰å¾…框
                ws.show('pop-in');
            }
            document.addEventListener('plusready', plusReady, false);
            // äºŒç»´ç æ‰«ææˆåŠŸ
            function onmarked(type, result, file) {
                switch (type) {
                    case plus.barcode.QR:
                        type = 'QR';
                        break;
                    case plus.barcode.EAN13:
                        type = 'EAN13';
                        break;
                    case plus.barcode.EAN8:
                        type = 'EAN8';
                        break;
                    default:
                        type = '其它' + type;
                        break;
                }
                result = result.replace(/\r\n/g, '');
                // wo.evalJS("scaned('" + type + "','" + result + "','" + file + "');");
                wo.evalJS("scaned2('" + result + "');");
                back();
            }
            // åˆ›å»ºå­çª—口
            function createSubview() {
                //
            }
            // ä»Žç›¸å†Œä¸­é€‰æ‹©äºŒç»´ç å›¾ç‰‡
            function scanPicture() {
                plus.gallery.pick(function(path) {
                    plus.barcode.scan(path, onmarked, function(error) {
                        plus.nativeUI.alert('无法识别此图片');
                    });
                }, function(err) {
                    console.log('Failed: ' + err.message);
                });
            }
        </script>
        <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
        <style type="text/css">
            #bcid {
                width: 100%;
                position: absolute;
                top: 0px;
                bottom: 0px;
                text-align: center;
            }
            .tip {
                color: #FFFFFF;
                font-weight: bold;
                text-shadow: 0px -1px #103E5C;
            }
        </style>
    </head>
    <body style="background-color:#000000;">
        <div id="bcid">
            <div style="height:40%"></div>
            <p class="tip">...载入中...</p>
        </div>
    </body>
</html>
unpackage/cache/wgt/H5EDA0853/css/global.css
@@ -0,0 +1,71 @@
.head {
    background-color: aliceblue;
    padding-top: 10px;
    padding-bottom: 10px;
    margin: 5px 8px;
    display: flex;
    flex-direction: column;
}
.head_block {
    display: flex;
    justify-content: space-between;
}
.head_left {
    display: flex;
}
.head_bar {
    width: 5px;
    height: 20px;
    background-color: red;
}
.head_title {
    margin-left: 5px;
}
.flex_column {
    display: flex;
    flex-direction: column;
}
.flex_between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.flex_center {
    display: flex;
    align-items: center;
}
.center_title{
    font-weight: bolder;
}
.center_border {
    border: 1px solid #ccc;
    min-height: 50px;
    border-radius: 5px;
    margin: 15px 0 0 0;
    padding: 5px 0px 5px 10px;
}
.footer {
    position: fixed;
    bottom: 0;
    background-color: aliceblue;
    min-height: 100px;
    padding-top: 10px;
    margin: 5px 8px 0;
    width: 96%;
    padding-bottom: 10px;
    display: flex;
    flex-direction: column;
}
unpackage/cache/wgt/H5EDA0853/doc/barcode.html
@@ -1,81 +1,107 @@
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="HandheldFriendly" content="true">
<meta name="MobileOptimized" content="320">
<title>Barcode Document</title>
<link rel="stylesheet" type="text/css" href="res/doc.css" charset="utf-8">
<link rel="stylesheet" type="text/css" href="res/prettify.sons.css" charset="utf-8">
<script type="text/javascript" src="res/doc.js" charset="utf-8"></script><script type="text/javascript" src="res/prettify.js" charset="utf-8"></script>
</head>
<body><div id="content" class="content">
<h1><a name="plus.barcode">barcode</a></h1>
<p>Barcode模块管理条码(一维码和二维码)扫描识别,支持常见的一维码(如EAN13码)及二维码(如QR码)。通过调用设备的摄像头对条码进行扫描识别,扫描到条码后进行解码并返回码数据内容及码类型。</p>
<h2>常量:</h2>
<ul>
<li>
<a href="#plus.barcode.QR">QR</a>: QR二维码,数值为0</li>
<li>
<a href="#plus.barcode.EAN13">EAN13</a>: EAN条形码标准版,数值为1</li>
<li>
<a href="#plus.barcode.EAN8">EAN8</a>: ENA条形码简版,数值为2</li>
<li>
<a href="#plus.barcode.AZTEC">AZTEC</a>: Aztec二维码,数值为3</li>
<li>
<a href="#plus.barcode.DATAMATRIX">DATAMATRIX</a>: Data Matrix二维码,数值为4</li>
<li>
<a href="#plus.barcode.UPCA">UPCA</a>: UPC条形码标准版,数值为5</li>
<li>
<a href="#plus.barcode.UPCE">UPCE</a>: UPC条形码缩短版,数值为6</li>
<li>
<a href="#plus.barcode.CODABAR">CODABAR</a>: Codabar条形码,数值为7</li>
<li>
<a href="#plus.barcode.CODE39">CODE39</a>: Code39条形码,数值为8</li>
<li>
<a href="#plus.barcode.CODE93">CODE93</a>: Code93条形码,数值为9</li>
<li>
<a href="#plus.barcode.CODE128">CODE128</a>: Code128条形码,数值为10</li>
<li>
<a href="#plus.barcode.ITF">ITF</a>: ITF条形码,数值为11</li>
<li>
<a href="#plus.barcode.MAXICODE">MAXICODE</a>: MaxiCode二维码,数值为12</li>
<li>
<a href="#plus.barcode.PDF417">PDF417</a>: PDF 417二维条码,数值为13</li>
<li>
<a href="#plus.barcode.RSS14">RSS14</a>: RSS 14条形组合码,数值为14</li>
<li>
<a href="#plus.barcode.RSSEXPANDED">RSSEXPANDED</a>: æ‰©å±•式RSS条形组合码,数值为15</li>
</ul>
<h2>方法:</h2>
<ul>
<li>
<a href="#plus.barcode.scan">scan</a>: æ‰«ç è¯†åˆ«å›¾ç‰‡ä¸­çš„æ¡ç </li>
<li>
<a href="#plus.barcode.create">create</a>: åˆ›å»ºæ‰«ç è¯†åˆ«æŽ§ä»¶å¯¹è±¡</li>
<li>
<a href="#plus.barcode.getBarcodeById">getBarcodeById</a>: æŸ¥æ‰¾æ‰«ç è¯†åˆ«æŽ§ä»¶å¯¹è±¡</li>
</ul>
<h2>对象:</h2>
<ul>
<li>
<a href="#plus.barcode.Barcode">Barcode</a>: æ‰«ç è¯†åˆ«æŽ§ä»¶å¯¹è±¡</li>
<li>
<a href="#plus.barcode.BarcodeStyles">BarcodeStyles</a>: Barcode扫码控件样式</li>
<li>
<a href="#plus.barcode.BarcodeOptions">BarcodeOptions</a>: æ¡ç è¯†åˆ«æŽ§ä»¶æ‰«æå‚æ•°</li>
</ul>
<h2>回调方法:</h2>
<ul>
<li>
<a href="#plus.barcode.BarcodeSuccessCallback">BarcodeSuccessCallback</a>: æ‰«ç è¯†åˆ«æˆåŠŸå›žè°ƒå‡½æ•°</li>
<li>
<a href="#plus.barcode.BarcodeErrorCallback">BarcodeErrorCallback</a>: æ‰«ç è¯†åˆ«é”™è¯¯å›žè°ƒå‡½æ•°</li>
</ul>
<h2>权限:</h2>
<p>permissions</p>
<pre class="prettyprint linenums">
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
        <meta name="HandheldFriendly" content="true">
        <meta name="MobileOptimized" content="320">
        <title>Barcode Document</title>
        <link rel="stylesheet" type="text/css" href="res/doc.css" charset="utf-8">
        <link rel="stylesheet" type="text/css" href="res/prettify.sons.css" charset="utf-8">
        <script type="text/javascript" src="res/doc.js" charset="utf-8"></script>
        <script type="text/javascript" src="res/prettify.js" charset="utf-8"></script>
    </head>
    <body>
        <div id="content" class="content">
            <h1><a name="plus.barcode">barcode</a></h1>
            <p>Barcode模块管理条码(一维码和二维码)扫描识别,支持常见的一维码(如EAN13码)及二维码(如QR码)。通过调用设备的摄像头对条码进行扫描识别,扫描到条码后进行解码并返回码数据内容及码类型。</p>
            <h2>常量:</h2>
            <ul>
                <li>
                    <a href="#plus.barcode.QR">QR</a>: QR二维码,数值为0
                </li>
                <li>
                    <a href="#plus.barcode.EAN13">EAN13</a>: EAN条形码标准版,数值为1
                </li>
                <li>
                    <a href="#plus.barcode.EAN8">EAN8</a>: ENA条形码简版,数值为2
                </li>
                <li>
                    <a href="#plus.barcode.AZTEC">AZTEC</a>: Aztec二维码,数值为3
                </li>
                <li>
                    <a href="#plus.barcode.DATAMATRIX">DATAMATRIX</a>: Data Matrix二维码,数值为4
                </li>
                <li>
                    <a href="#plus.barcode.UPCA">UPCA</a>: UPC条形码标准版,数值为5
                </li>
                <li>
                    <a href="#plus.barcode.UPCE">UPCE</a>: UPC条形码缩短版,数值为6
                </li>
                <li>
                    <a href="#plus.barcode.CODABAR">CODABAR</a>: Codabar条形码,数值为7
                </li>
                <li>
                    <a href="#plus.barcode.CODE39">CODE39</a>: Code39条形码,数值为8
                </li>
                <li>
                    <a href="#plus.barcode.CODE93">CODE93</a>: Code93条形码,数值为9
                </li>
                <li>
                    <a href="#plus.barcode.CODE128">CODE128</a>: Code128条形码,数值为10
                </li>
                <li>
                    <a href="#plus.barcode.ITF">ITF</a>: ITF条形码,数值为11
                </li>
                <li>
                    <a href="#plus.barcode.MAXICODE">MAXICODE</a>: MaxiCode二维码,数值为12
                </li>
                <li>
                    <a href="#plus.barcode.PDF417">PDF417</a>: PDF 417二维条码,数值为13
                </li>
                <li>
                    <a href="#plus.barcode.RSS14">RSS14</a>: RSS 14条形组合码,数值为14
                </li>
                <li>
                    <a href="#plus.barcode.RSSEXPANDED">RSSEXPANDED</a>: æ‰©å±•式RSS条形组合码,数值为15
                </li>
            </ul>
            <h2>方法:</h2>
            <ul>
                <li>
                    <a href="#plus.barcode.scan">scan</a>: æ‰«ç è¯†åˆ«å›¾ç‰‡ä¸­çš„æ¡ç 
                </li>
                <li>
                    <a href="#plus.barcode.create">create</a>: åˆ›å»ºæ‰«ç è¯†åˆ«æŽ§ä»¶å¯¹è±¡
                </li>
                <li>
                    <a href="#plus.barcode.getBarcodeById">getBarcodeById</a>: æŸ¥æ‰¾æ‰«ç è¯†åˆ«æŽ§ä»¶å¯¹è±¡
                </li>
            </ul>
            <h2>对象:</h2>
            <ul>
                <li>
                    <a href="#plus.barcode.Barcode">Barcode</a>: æ‰«ç è¯†åˆ«æŽ§ä»¶å¯¹è±¡
                </li>
                <li>
                    <a href="#plus.barcode.BarcodeStyles">BarcodeStyles</a>: Barcode扫码控件样式
                </li>
                <li>
                    <a href="#plus.barcode.BarcodeOptions">BarcodeOptions</a>: æ¡ç è¯†åˆ«æŽ§ä»¶æ‰«æå‚æ•°
                </li>
            </ul>
            <h2>回调方法:</h2>
            <ul>
                <li>
                    <a href="#plus.barcode.BarcodeSuccessCallback">BarcodeSuccessCallback</a>: æ‰«ç è¯†åˆ«æˆåŠŸå›žè°ƒå‡½æ•°
                </li>
                <li>
                    <a href="#plus.barcode.BarcodeErrorCallback">BarcodeErrorCallback</a>: æ‰«ç è¯†åˆ«é”™è¯¯å›žè°ƒå‡½æ•°
                </li>
            </ul>
            <h2>权限:</h2>
            <p>permissions</p>
            <pre class="prettyprint linenums">
{
// ...
"permissions":{
@@ -86,9 +112,9 @@
}
}
            </pre>
<h1><a name="plus.barcode.Barcode">Barcode</a></h1>
<p>扫码识别控件对象</p>
<pre class="prettyprint linenums">
            <h1><a name="plus.barcode.Barcode">Barcode</a></h1>
            <p>扫码识别控件对象</p>
            <pre class="prettyprint linenums">
interface plus.barcode.Barcode {
    // Methods
    function void cancel();
@@ -102,37 +128,48 @@
    function void onmarked();
}
                </pre>
<h2>说明:</h2>
<p class="des">
    å¯é€šè¿‡plus.barcode.create创建,也可通过new plus.barcode.Barcode构造(仅在5+APP中使用)创建。
    æ‰«ç è¯†åˆ«æŽ§ä»¶å°†ä½¿ç”¨è®¾å¤‡çš„æ‘„像头预览扫描内容,在控件中显示扫描基准框等用户交互元素。
                </p>
<h2>构造:</h2>
<ul><li>
<a href="#plus.barcode.Barcode.Barcode.constructor(domId,%20filters,%20styles)">Barcode.constructor(domId, filters, styles)</a>: æž„造扫码识别控件</li></ul>
<h2>方法:</h2>
<ul>
<li>
<a href="#plus.barcode.Barcode.cancel">cancel</a>: å–消扫码识别</li>
<li>
<a href="#plus.barcode.Barcode.close">close</a>: å…³é—­æ¡ç è¯†åˆ«æŽ§ä»¶</li>
<li>
<a href="#plus.barcode.Barcode.setFlash">setFlash</a>: æ“ä½œé—ªå…‰ç¯</li>
<li>
<a href="#plus.barcode.Barcode.setStyle">setStyle</a>: è®¾ç½®æ‰«ç è¯†åˆ«æŽ§ä»¶çš„æ ·å¼</li>
<li>
<a href="#plus.barcode.Barcode.start">start</a>: å¼€å§‹æ‰«ç è¯†åˆ«</li>
</ul>
<h2>事件:</h2>
<ul>
<li>
<a href="#plus.barcode.Barcode.onmarked">onmarked</a>: æ‰«ç è¯†åˆ«æˆåŠŸäº‹ä»¶</li>
<li>
<a href="#plus.barcode.Barcode.onerror">onerror</a>: æ‰«ç è¯†åˆ«é”™è¯¯äº‹ä»¶</li>
</ul>
<h1><a name="plus.barcode.BarcodeStyles">BarcodeStyles</a></h1>
<p>Barcode扫码控件样式</p>
<pre class="prettyprint linenums">
            <h2>说明:</h2>
            <p class="des">
                å¯é€šè¿‡plus.barcode.create创建,也可通过new plus.barcode.Barcode构造(仅在5+APP中使用)创建。
                æ‰«ç è¯†åˆ«æŽ§ä»¶å°†ä½¿ç”¨è®¾å¤‡çš„æ‘„像头预览扫描内容,在控件中显示扫描基准框等用户交互元素。
            </p>
            <h2>构造:</h2>
            <ul>
                <li>
                    <a href="#plus.barcode.Barcode.Barcode.constructor(domId,%20filters,%20styles)">Barcode.constructor(domId,
                        filters, styles)</a>: æž„造扫码识别控件
                </li>
            </ul>
            <h2>方法:</h2>
            <ul>
                <li>
                    <a href="#plus.barcode.Barcode.cancel">cancel</a>: å–消扫码识别
                </li>
                <li>
                    <a href="#plus.barcode.Barcode.close">close</a>: å…³é—­æ¡ç è¯†åˆ«æŽ§ä»¶
                </li>
                <li>
                    <a href="#plus.barcode.Barcode.setFlash">setFlash</a>: æ“ä½œé—ªå…‰ç¯
                </li>
                <li>
                    <a href="#plus.barcode.Barcode.setStyle">setStyle</a>: è®¾ç½®æ‰«ç è¯†åˆ«æŽ§ä»¶çš„æ ·å¼
                </li>
                <li>
                    <a href="#plus.barcode.Barcode.start">start</a>: å¼€å§‹æ‰«ç è¯†åˆ«
                </li>
            </ul>
            <h2>事件:</h2>
            <ul>
                <li>
                    <a href="#plus.barcode.Barcode.onmarked">onmarked</a>: æ‰«ç è¯†åˆ«æˆåŠŸäº‹ä»¶
                </li>
                <li>
                    <a href="#plus.barcode.Barcode.onerror">onerror</a>: æ‰«ç è¯†åˆ«é”™è¯¯äº‹ä»¶
                </li>
            </ul>
            <h1><a name="plus.barcode.BarcodeStyles">BarcodeStyles</a></h1>
            <p>Barcode扫码控件样式</p>
            <pre class="prettyprint linenums">
interface plus.barcode.BarcodeStyles {
    attribute String background;
    attribute String frameColor;
@@ -145,80 +182,88 @@
    attribute String position;
}
                </pre>
<h2>说明:</h2>
<p class="des">
    è®¾ç½®Barcode扫码控件的样式,如扫码框、扫码条的颜色等。
                </p>
<h2>属性:</h2>
<ul>
<li>background: <em>(<font class="type">String</font>
    ç±»åž‹
)</em>条码识别控件背景颜色<br><p>
    é¢œè‰²å€¼æ”¯æŒ(参考CSS颜色规范):颜色名称(参考CSS Color Names)/十六进制值/rgb值,默认值为红色。
                        </p>
</li>
<li>frameColor: <em>(<font class="type">String</font>
    ç±»åž‹
)</em>扫码框颜色<br><p>
    é¢œè‰²å€¼æ”¯æŒ(参考CSS颜色规范):颜色名称(参考CSS Color Names)/十六进制值/rgb值/rgba值,默认值为红色。
                        </p>
</li>
<li>scanbarColor: <em>(<font class="type">String</font>
    ç±»åž‹
)</em>扫码条颜色<br><p>
    é¢œè‰²å€¼æ”¯æŒ(参考CSS颜色规范):颜色名称(参考CSS Color Names)/十六进制值/rgb值/rgba值,默认值为红色。
                        </p>
</li>
<li>top: <em>(<font class="type">String</font>
    ç±»åž‹
)</em>Barcode扫码控件左上角的垂直偏移量<br><p>
    å¯å–值:
        åƒç´ å€¼ï¼Œå¦‚"100px";
        ç™¾åˆ†æ¯”,如"10%",相对于父Webview窗口的高度;
        è‡ªåŠ¨è®¡ç®—ï¼Œå¦‚"auto",根据height值自动计算,相对于父Webview窗口垂直居中。
                        </p>
</li>
<li>left: <em>(<font class="type">String</font>
    ç±»åž‹
)</em>Barcode扫码控件左上角的水平偏移量<br><p>
    å¯å–值:
        åƒç´ å€¼ï¼Œå¦‚"100px";
        ç™¾åˆ†æ¯”,如"10%",相对于父Webview窗口的宽度;
        è‡ªåŠ¨è®¡ç®—ï¼Œå¦‚"auto",根据width值自动计算,相对于父Webview窗口水平居中。
    é»˜è®¤å€¼ä¸º"0px"。
                        </p>
</li>
<li>width: <em>(<font class="type">String</font>
    ç±»åž‹
)</em>Barcode扫码控件的宽度<br><p>
    å¯å–值:
        åƒç´ å€¼ï¼Œå¦‚"100px";
        ç™¾åˆ†æ¯”,如"10%",相对于父Webview窗口的宽度。
    é»˜è®¤å€¼ä¸º"100%"。
                        </p>
</li>
<li>height: <em>(<font class="type">String</font>
    ç±»åž‹
)</em>Barcode扫码控件的高度<br><p>
    å¯å–值:
        åƒç´ å€¼ï¼Œå¦‚"100px";
        ç™¾åˆ†æ¯”,如"10%",相对于父Webview窗口的高度。
    é»˜è®¤å€¼ä¸º"100%"。
                        </p>
</li>
<li>position: <em>(<font class="type">String</font>
    ç±»åž‹
)</em>Barcode扫码控件在Webview窗口的布局模式<br><p>
    å¯å–值:
        "static" - é™æ€å¸ƒå±€æ¨¡å¼ï¼Œå¦‚果页面存在滚动条则随窗口内容滚动;
        "absolute" - ç»å¯¹å¸ƒå±€æ¨¡å¼ï¼Œå¦‚果页面存在滚动条不随窗口内容滚动;
    é»˜è®¤å€¼ä¸º"static"。
                        </p>
</li>
</ul>
<h1><a name="plus.barcode.BarcodeOptions">BarcodeOptions</a></h1>
<p>条码识别控件扫描参数</p>
<pre class="prettyprint linenums">
            <h2>说明:</h2>
            <p class="des">
                è®¾ç½®Barcode扫码控件的样式,如扫码框、扫码条的颜色等。
            </p>
            <h2>属性:</h2>
            <ul>
                <li>background: <em>(<font class="type">String</font>
                        ç±»åž‹
                        )</em>条码识别控件背景颜色<br>
                    <p>
                        é¢œè‰²å€¼æ”¯æŒ(参考CSS颜色规范):颜色名称(参考CSS Color Names)/十六进制值/rgb值,默认值为红色。
                    </p>
                </li>
                <li>frameColor: <em>(<font class="type">String</font>
                        ç±»åž‹
                        )</em>扫码框颜色<br>
                    <p>
                        é¢œè‰²å€¼æ”¯æŒ(参考CSS颜色规范):颜色名称(参考CSS Color Names)/十六进制值/rgb值/rgba值,默认值为红色。
                    </p>
                </li>
                <li>scanbarColor: <em>(<font class="type">String</font>
                        ç±»åž‹
                        )</em>扫码条颜色<br>
                    <p>
                        é¢œè‰²å€¼æ”¯æŒ(参考CSS颜色规范):颜色名称(参考CSS Color Names)/十六进制值/rgb值/rgba值,默认值为红色。
                    </p>
                </li>
                <li>top: <em>(<font class="type">String</font>
                        ç±»åž‹
                        )</em>Barcode扫码控件左上角的垂直偏移量<br>
                    <p>
                        å¯å–值:
                        åƒç´ å€¼ï¼Œå¦‚"100px";
                        ç™¾åˆ†æ¯”,如"10%",相对于父Webview窗口的高度;
                        è‡ªåŠ¨è®¡ç®—ï¼Œå¦‚"auto",根据height值自动计算,相对于父Webview窗口垂直居中。
                    </p>
                </li>
                <li>left: <em>(<font class="type">String</font>
                        ç±»åž‹
                        )</em>Barcode扫码控件左上角的水平偏移量<br>
                    <p>
                        å¯å–值:
                        åƒç´ å€¼ï¼Œå¦‚"100px";
                        ç™¾åˆ†æ¯”,如"10%",相对于父Webview窗口的宽度;
                        è‡ªåŠ¨è®¡ç®—ï¼Œå¦‚"auto",根据width值自动计算,相对于父Webview窗口水平居中。
                        é»˜è®¤å€¼ä¸º"0px"。
                    </p>
                </li>
                <li>width: <em>(<font class="type">String</font>
                        ç±»åž‹
                        )</em>Barcode扫码控件的宽度<br>
                    <p>
                        å¯å–值:
                        åƒç´ å€¼ï¼Œå¦‚"100px";
                        ç™¾åˆ†æ¯”,如"10%",相对于父Webview窗口的宽度。
                        é»˜è®¤å€¼ä¸º"100%"。
                    </p>
                </li>
                <li>height: <em>(<font class="type">String</font>
                        ç±»åž‹
                        )</em>Barcode扫码控件的高度<br>
                    <p>
                        å¯å–值:
                        åƒç´ å€¼ï¼Œå¦‚"100px";
                        ç™¾åˆ†æ¯”,如"10%",相对于父Webview窗口的高度。
                        é»˜è®¤å€¼ä¸º"100%"。
                    </p>
                </li>
                <li>position: <em>(<font class="type">String</font>
                        ç±»åž‹
                        )</em>Barcode扫码控件在Webview窗口的布局模式<br>
                    <p>
                        å¯å–值:
                        "static" - é™æ€å¸ƒå±€æ¨¡å¼ï¼Œå¦‚果页面存在滚动条则随窗口内容滚动;
                        "absolute" - ç»å¯¹å¸ƒå±€æ¨¡å¼ï¼Œå¦‚果页面存在滚动条不随窗口内容滚动;
                        é»˜è®¤å€¼ä¸º"static"。
                    </p>
                </li>
            </ul>
            <h1><a name="plus.barcode.BarcodeOptions">BarcodeOptions</a></h1>
            <p>条码识别控件扫描参数</p>
            <pre class="prettyprint linenums">
interface plus.barcode.BarcodeOptions {
    attribute Boolean conserve;
    attribute String filename;
@@ -226,99 +271,110 @@
    attribute String sound;
}
                </pre>
<h2>说明:</h2>
<p class="des">
    è®¾ç½®Barcode扫码控件的扫码识别参数,如是否保存扫码功时的截图等。
                </p>
<h2>属性:</h2>
<ul>
<li>conserve: <em>(<font class="type">Boolean</font>
    ç±»åž‹
)</em>是否保存扫码成功时的截图<br><p>
    å¦‚果设置为true则在扫码成功时将图片保存,并通过onmarked回调函数的file参数返回保存文件的路径。
    é»˜è®¤å€¼ä¸ºfalse,不保存截图。
                        </p>
</li>
<li>filename: <em>(<font class="type">String</font>
    ç±»åž‹
)</em>保存扫码成功时图片保存路径<br><p>
    å¯é€šè¿‡æ­¤å‚数设置保存截图的路径和名称,如果设置图片文件名称则必须指定文件的后缀名(必须是.png),否则认为是指定目录,文件名称则自动生成。
                        </p>
</li>
<li>vibrate: <em>(<font class="type">Boolean</font>
    ç±»åž‹
)</em>扫码成功时是否需要震动提醒<br><p>
    å¦‚果设置为true则在扫码成功时震动设备,false则不震动。
    é»˜è®¤å€¼ä¸ºtrue。
                        </p>
</li>
<li>sound: <em>(<font class="type">String</font>
    ç±»åž‹
)</em>扫码成功时播放的提示音<br><p>
    å¯å–值:
    "none" - ä¸æ’­æ”¾æç¤ºéŸ³ï¼›
    "default" - æ’­æ”¾é»˜è®¤æç¤ºéŸ³ï¼ˆ5+引擎内置)。
    é»˜è®¤å€¼ä¸º"default"。
                        </p>
</li>
</ul>
<h1><a name="plus.barcode.BarcodeSuccessCallback">BarcodeSuccessCallback</a></h1>
<p>扫码识别成功回调函数</p>
<pre class="prettyprint linenums">
            <h2>说明:</h2>
            <p class="des">
                è®¾ç½®Barcode扫码控件的扫码识别参数,如是否保存扫码功时的截图等。
            </p>
            <h2>属性:</h2>
            <ul>
                <li>conserve: <em>(<font class="type">Boolean</font>
                        ç±»åž‹
                        )</em>是否保存扫码成功时的截图<br>
                    <p>
                        å¦‚果设置为true则在扫码成功时将图片保存,并通过onmarked回调函数的file参数返回保存文件的路径。
                        é»˜è®¤å€¼ä¸ºfalse,不保存截图。
                    </p>
                </li>
                <li>filename: <em>(<font class="type">String</font>
                        ç±»åž‹
                        )</em>保存扫码成功时图片保存路径<br>
                    <p>
                        å¯é€šè¿‡æ­¤å‚数设置保存截图的路径和名称,如果设置图片文件名称则必须指定文件的后缀名(必须是.png),否则认为是指定目录,文件名称则自动生成。
                    </p>
                </li>
                <li>vibrate: <em>(<font class="type">Boolean</font>
                        ç±»åž‹
                        )</em>扫码成功时是否需要震动提醒<br>
                    <p>
                        å¦‚果设置为true则在扫码成功时震动设备,false则不震动。
                        é»˜è®¤å€¼ä¸ºtrue。
                    </p>
                </li>
                <li>sound: <em>(<font class="type">String</font>
                        ç±»åž‹
                        )</em>扫码成功时播放的提示音<br>
                    <p>
                        å¯å–值:
                        "none" - ä¸æ’­æ”¾æç¤ºéŸ³ï¼›
                        "default" - æ’­æ”¾é»˜è®¤æç¤ºéŸ³ï¼ˆ5+引擎内置)。
                        é»˜è®¤å€¼ä¸º"default"。
                    </p>
                </li>
            </ul>
            <h1><a name="plus.barcode.BarcodeSuccessCallback">BarcodeSuccessCallback</a></h1>
            <p>扫码识别成功回调函数</p>
            <pre class="prettyprint linenums">
void BarcodeSuccessCallback(type, code, file){
    // Barcode success code
}
                </pre>
<h2>说明:</h2>
<p class="des">
    å½“Barcode控件扫码成功时的回调函数,返回识别成功的扫码数据。
                </p>
<h2>参数:</h2>
<ul>
<li>type:
        <em>(
            <font class="type">Number</font>
            )
            å¿…选 </em>识别到的条码类型<br>
    Number类型的值,与Barcode对象定义的条码类型常量一致。
                        </li>
<li>code:
        <em>(
            <font class="type">String</font>
            )
            å¿…选 </em>识别到的条码数据<br>
    æ‰«ç è¯†åˆ«å‡ºçš„æ•°æ®å†…容,字符串类型,采用UTF8编码格式。
                        </li>
<li>file:
        <em>(
            <font class="type">String</font>
            )
            å¯é€‰ </em>扫码成功的截图文件路径<br>
    æ‰«ç è¯†åˆ«åˆ°çš„æˆªå›¾ï¼Œpng格式文件,如果设置为不保存截图,则返回undefined。
                        </li>
</ul>
<h2>返回值:</h2>
<font class="type">void</font>
            <h2>说明:</h2>
            <p class="des">
                å½“Barcode控件扫码成功时的回调函数,返回识别成功的扫码数据。
            </p>
            <h2>参数:</h2>
            <ul>
                <li>type:
                    <em>(
                        <font class="type">Number</font>
                        )
                        å¿…选
                    </em>识别到的条码类型<br>
                    Number类型的值,与Barcode对象定义的条码类型常量一致。
                </li>
                <li>code:
                    <em>(
                        <font class="type">String</font>
                        )
                        å¿…选
                    </em>识别到的条码数据<br>
                    æ‰«ç è¯†åˆ«å‡ºçš„æ•°æ®å†…容,字符串类型,采用UTF8编码格式。
                </li>
                <li>file:
                    <em>(
                        <font class="type">String</font>
                        )
                        å¯é€‰
                    </em>扫码成功的截图文件路径<br>
                    æ‰«ç è¯†åˆ«åˆ°çš„æˆªå›¾ï¼Œpng格式文件,如果设置为不保存截图,则返回undefined。
                </li>
            </ul>
            <h2>返回值:</h2>
            <font class="type">void</font>
            : æ— <h1><a name="plus.barcode.BarcodeErrorCallback">BarcodeErrorCallback</a></h1>
<p>扫码识别错误回调函数</p>
<pre class="prettyprint linenums">
            <p>扫码识别错误回调函数</p>
            <pre class="prettyprint linenums">
void BarcodeErrorCallback(error){
    // Error 
    var code = error.code;             // é”™è¯¯ç¼–码
    var message = error.message;    // é”™è¯¯æè¿°ä¿¡æ¯
}
                </pre>
<h2>参数:</h2>
<ul><li>error:
        <em>(
            <font class="type">DOMException</font>
            )
            å¿…选 </em>扫码识别的错误信息<br>
    å¯é€šè¿‡error.code(Number类型)获取错误编码;
    å¯é€šè¿‡error.message(String类型)获取错误描述信息。
                        </li></ul>
<h2>返回值:</h2>
<font class="type">void</font>
            <h2>参数:</h2>
            <ul>
                <li>error:
                    <em>(
                        <font class="type">DOMException</font>
                        )
                        å¿…选
                    </em>扫码识别的错误信息<br>
                    å¯é€šè¿‡error.code(Number类型)获取错误编码;
                    å¯é€šè¿‡error.message(String类型)获取错误描述信息。
                </li>
            </ul>
            <h2>返回值:</h2>
            <font class="type">void</font>
            : æ— <br><br>
</div></body>
        </div>
    </body>
</html>
unpackage/cache/wgt/H5EDA0853/js/common.js
@@ -1,178 +1,189 @@
(function(w){
// ç©ºå‡½æ•°
function shield(){
    return false;
}
document.addEventListener('touchstart', shield, false);//取消浏览器的所有事件,使得active的样式在手机上正常生效
document.oncontextmenu=shield;//屏蔽选择函数
// H5 plus事件处理
var ws=null,as='pop-in';
function plusReady(){
    ws=plus.webview.currentWebview();
    plus.key.addEventListener('backbutton', function(){
        back();
    },false);
}
if(w.plus){
    plusReady();
}else{
    document.addEventListener('plusready', plusReady, false);
}
// DOMContentLoaded事件处理
document.addEventListener('DOMContentLoaded', function(){
    gInit();
    document.body.onselectstart=shield;
},false);
// è¿”回
w.back=function(hide){
    if(w.plus){
        ws||(ws=plus.webview.currentWebview());
        (hide||ws.preate)?ws.hide('auto'):ws.close('auto');
    }else if(history.length>1){
        history.back();
    }else{
        w.close();
(function(w) {
    // ç©ºå‡½æ•°
    function shield() {
        return false;
    }
};
// å¤„理点击事件
var openw=null;
/**
 * æ‰“开新窗口
 * @param {URIString} id : è¦æ‰“开页面url
 * @param {String} t : é¡µé¢æ ‡é¢˜åç§°
 * @param {JSON} ws : Webview窗口属性
 */
w.clicked=function(id, t, ws){
    if(openw){//避免多次打开同一个页面
        return null;
    }
    if(w.plus){
        ws=ws||{};
        ws.scrollIndicator||(ws.scrollIndicator='none');
        ws.scalable||(ws.scalable=false);
        ws.backButtonAutoControl||(ws.backButtonAutoControl='close');
        ws.titleNView=ws.titleNView||{autoBackButton:true};
        ws.titleNView.backgroundColor = '#D74B28';
        ws.titleNView.titleColor = '#CCCCCC';
        ws.doc&&(ws.titleNView.buttons=ws.titleNView.buttons||[],ws.titleNView.buttons.push({fontSrc:'_www/helloh5.ttf',text:'\ue301',fontSize:'20px',onclick:'javascript:openDoc()'}));
        t&&(ws.titleNView.titleText=t);
        openw = plus.webview.create(id, id, ws);
        openw.addEventListener('loaded', function(){
            openw.show(as);
    document.addEventListener('touchstart', shield, false); //取消浏览器的所有事件,使得active的样式在手机上正常生效
    document.oncontextmenu = shield; //屏蔽选择函数
    // H5 plus事件处理
    var ws = null,
        as = 'pop-in';
    function plusReady() {
        ws = plus.webview.currentWebview();
        plus.key.addEventListener('backbutton', function() {
            back();
        }, false);
        openw.addEventListener('close', function(){
            openw=null;
        }, false);
        return openw;
    }else{
        w.open(id);
    }
    return null;
};
/**
 * åˆ›å»ºæ–°çª—口(无原始标题栏),
 * @param {URIString} id : è¦æ‰“开页面url
 * @param {JSON} ws : Webview窗口属性
 */
w.createWithoutTitle=function(id, ws){
    if(openw){//避免多次打开同一个页面
        return null;
    if (w.plus) {
        plusReady();
    } else {
        document.addEventListener('plusready', plusReady, false);
    }
    if(w.plus){
        ws=ws||{};
        ws.scrollIndicator||(ws.scrollIndicator='none');
        ws.scalable||(ws.scalable=false);
        ws.backButtonAutoControl||(ws.backButtonAutoControl='close');
        openw = plus.webview.create(id, id, ws);
        openw.addEventListener('close', function(){
            openw=null;
        }, false);
        return openw;
    }else{
        w.open(id);
    }
    return null;
};
/**
 * æ‰“开文档页面
 * @param {URIString} c : è¦æ‰“开页面url
 */
w.openDoc=function(c){
    plus.webview.create(c, 'document', {
        titleNView:{
            autoBackButton:true,
            backgroundColor:'#D74B28',
            titleColor:'#CCCCCC'
        },
        backButtonAutoControl:'close',
        scalable:false
    }).show('pop-in');
};
/**
 * å…¼å®¹æç¤º
 */
w.compatibleConfirm=function(){
    plus.nativeUI.confirm('本OS原生层面不提供该控件,需使用mui框架实现类似效果。请点击“确定”下载Hello mui示例',function(e){
        if(0==e.index){
            plus.runtime.openURL("http://www.dcloud.io/hellomui/");
    // DOMContentLoaded事件处理
    document.addEventListener('DOMContentLoaded', function() {
        gInit();
        document.body.onselectstart = shield;
    }, false);
    // è¿”回
    w.back = function(hide) {
        if (w.plus) {
            ws || (ws = plus.webview.currentWebview());
            (hide || ws.preate) ? ws.hide('auto'): ws.close('auto');
        } else if (history.length > 1) {
            history.back();
        } else {
            w.close();
        }
    },"",["确定","取消"]);
}
// é€šç”¨å…ƒç´ å¯¹è±¡
var _dout_=null;
w.gInit=function(){
    _dout_=document.getElementById("output");
};
// æ¸…空输出内容
w.outClean=function(){
    _dout_.innerText="";
    _dout_.scrollTop=0;//在iOS8存在不滚动的现象
};
// è¾“出内容
w.outSet=function(s){
    console.log(s);
    _dout_.innerText=s+"\n";
    (0==_dout_.scrollTop)&&(_dout_.scrollTop=1);//在iOS8存在不滚动的现象
};
// è¾“出行内容
w.outLine=function(s){
    console.log(s);
    _dout_.innerText+=s+"\n";
    (0==_dout_.scrollTop)&&(_dout_.scrollTop=1);//在iOS8存在不滚动的现象
};
// æ ¼å¼åŒ–时长字符串,格式为"HH:MM:SS"
w.timeToStr=function(ts){
    if(isNaN(ts)){
        return "--:--:--";
    };
    // å¤„理点击事件
    var openw = null;
    /**
     * æ‰“开新窗口
     * @param {URIString} id : è¦æ‰“开页面url
     * @param {String} t : é¡µé¢æ ‡é¢˜åç§°
     * @param {JSON} ws : Webview窗口属性
     */
    w.clicked = function(id, t, ws) {
        if (openw) { //避免多次打开同一个页面
            return null;
        }
        if (w.plus) {
            ws = ws || {};
            ws.scrollIndicator || (ws.scrollIndicator = 'none');
            ws.scalable || (ws.scalable = false);
            ws.backButtonAutoControl || (ws.backButtonAutoControl = 'close');
            ws.titleNView = ws.titleNView || {
                autoBackButton: true
            };
            ws.titleNView.backgroundColor = '#D74B28';
            ws.titleNView.titleColor = '#CCCCCC';
            ws.doc && (ws.titleNView.buttons = ws.titleNView.buttons || [], ws.titleNView.buttons.push({
                fontSrc: '_www/helloh5.ttf',
                text: '\ue301',
                fontSize: '20px',
                onclick: 'javascript:openDoc()'
            }));
            t && (ws.titleNView.titleText = t);
            openw = plus.webview.create(id, id, ws);
            openw.addEventListener('loaded', function() {
                openw.show(as);
            }, false);
            openw.addEventListener('close', function() {
                openw = null;
            }, false);
            return openw;
        } else {
            w.open(id);
        }
        return null;
    };
    /**
     * åˆ›å»ºæ–°çª—口(无原始标题栏),
     * @param {URIString} id : è¦æ‰“开页面url
     * @param {JSON} ws : Webview窗口属性
     */
    w.createWithoutTitle = function(id, ws) {
        if (openw) { //避免多次打开同一个页面
            return null;
        }
        if (w.plus) {
            ws = ws || {};
            ws.scrollIndicator || (ws.scrollIndicator = 'none');
            ws.scalable || (ws.scalable = false);
            ws.backButtonAutoControl || (ws.backButtonAutoControl = 'close');
            openw = plus.webview.create(id, id, ws);
            openw.addEventListener('close', function() {
                openw = null;
            }, false);
            return openw;
        } else {
            w.open(id);
        }
        return null;
    };
    /**
     * æ‰“开文档页面
     * @param {URIString} c : è¦æ‰“开页面url
     */
    w.openDoc = function(c) {
        plus.webview.create(c, 'document', {
            titleNView: {
                autoBackButton: true,
                backgroundColor: '#D74B28',
                titleColor: '#CCCCCC'
            },
            backButtonAutoControl: 'close',
            scalable: false
        }).show('pop-in');
    };
    /**
     * å…¼å®¹æç¤º
     */
    w.compatibleConfirm = function() {
        plus.nativeUI.confirm('本OS原生层面不提供该控件,需使用mui框架实现类似效果。请点击“确定”下载Hello mui示例', function(e) {
            if (0 == e.index) {
                plus.runtime.openURL("http://www.dcloud.io/hellomui/");
            }
        }, "", ["确定", "取消"]);
    }
    var h=parseInt(ts/3600);
    var m=parseInt((ts%3600)/60);
    var s=parseInt(ts%60);
    return (ultZeroize(h)+":"+ultZeroize(m)+":"+ultZeroize(s));
};
// æ ¼å¼åŒ–日期时间字符串,格式为"YYYY-MM-DD HH:MM:SS"
w.dateToStr=function(d){
    return (d.getFullYear()+"-"+ultZeroize(d.getMonth()+1)+"-"+ultZeroize(d.getDate())+" "+ultZeroize(d.getHours())+":"+ultZeroize(d.getMinutes())+":"+ultZeroize(d.getSeconds()));
};
/**
 * zeroize value with length(default is 2).
 * @param {Object} v
 * @param {Number} l
 * @return {String}
 */
w.ultZeroize=function(v,l){
    var z="";
    l=l||2;
    v=String(v);
    for(var i=0;i<l-v.length;i++){
        z+="0";
    }
    return z+v;
};
    // é€šç”¨å…ƒç´ å¯¹è±¡
    var _dout_ = null;
    w.gInit = function() {
        _dout_ = document.getElementById("output");
    };
    // æ¸…空输出内容
    w.outClean = function() {
        _dout_.innerText = "";
        _dout_.scrollTop = 0; //在iOS8存在不滚动的现象
    };
    // è¾“出内容
    w.outSet = function(s) {
        console.log(s);
        _dout_.innerText = s + "\n";
        (0 == _dout_.scrollTop) && (_dout_.scrollTop = 1); //在iOS8存在不滚动的现象
    };
    // è¾“出行内容
    w.outLine = function(s) {
        console.log(s);
        _dout_.innerText += s + "\n";
        (0 == _dout_.scrollTop) && (_dout_.scrollTop = 1); //在iOS8存在不滚动的现象
    };
    // æ ¼å¼åŒ–时长字符串,格式为"HH:MM:SS"
    w.timeToStr = function(ts) {
        if (isNaN(ts)) {
            return "--:--:--";
        }
        var h = parseInt(ts / 3600);
        var m = parseInt((ts % 3600) / 60);
        var s = parseInt(ts % 60);
        return (ultZeroize(h) + ":" + ultZeroize(m) + ":" + ultZeroize(s));
    };
    // æ ¼å¼åŒ–日期时间字符串,格式为"YYYY-MM-DD HH:MM:SS"
    w.dateToStr = function(d) {
        return (d.getFullYear() + "-" + ultZeroize(d.getMonth() + 1) + "-" + ultZeroize(d.getDate()) + " " +
            ultZeroize(d.getHours()) + ":" + ultZeroize(d.getMinutes()) + ":" + ultZeroize(d.getSeconds()));
    };
    /**
     * zeroize value with length(default is 2).
     * @param {Object} v
     * @param {Number} l
     * @return {String}
     */
    w.ultZeroize = function(v, l) {
        var z = "";
        l = l || 2;
        v = String(v);
        for (var i = 0; i < l - v.length; i++) {
            z += "0";
        }
        return z + v;
    };
})(window);
// fast click 
;(function () {
;
(function() {
    'use strict';
    /**
@@ -282,7 +293,9 @@
        // Some old versions of Android don't have Function.prototype.bind
        function bind(method, context) {
            return function() { return method.apply(context, arguments); };
            return function() {
                return method.apply(context, arguments);
            };
        }
@@ -348,10 +361,10 @@
    }
    /**
    * Windows Phone 8.1 fakes user agent string to look like Android and iPhone.
    *
    * @type boolean
    */
     * Windows Phone 8.1 fakes user agent string to look like Android and iPhone.
     *
     * @type boolean
     */
    var deviceIsWindowsPhone = navigator.userAgent.indexOf("Windows Phone") >= 0;
    /**
@@ -401,27 +414,27 @@
    FastClick.prototype.needsClick = function(target) {
        switch (target.nodeName.toLowerCase()) {
        // Don't send a synthetic click to disabled inputs (issue #62)
        case 'button':
        case 'select':
        case 'textarea':
            if (target.disabled) {
            // Don't send a synthetic click to disabled inputs (issue #62)
            case 'button':
            case 'select':
            case 'textarea':
                if (target.disabled) {
                    return true;
                }
                break;
            case 'input':
                // File inputs need real clicks on iOS 6 due to a browser bug (issue #68)
                if ((deviceIsIOS && target.type === 'file') || target.disabled) {
                    return true;
                }
                break;
            case 'label':
            case 'iframe': // iOS8 homescreen apps can prevent events bubbling into frames
            case 'video':
                return true;
            }
            break;
        case 'input':
            // File inputs need real clicks on iOS 6 due to a browser bug (issue #68)
            if ((deviceIsIOS && target.type === 'file') || target.disabled) {
                return true;
            }
            break;
        case 'label':
        case 'iframe': // iOS8 homescreen apps can prevent events bubbling into frames
        case 'video':
            return true;
        }
        return (/\bneedsclick\b/).test(target.className);
@@ -436,25 +449,25 @@
     */
    FastClick.prototype.needsFocus = function(target) {
        switch (target.nodeName.toLowerCase()) {
        case 'textarea':
            return true;
        case 'select':
            return !deviceIsAndroid;
        case 'input':
            switch (target.type) {
            case 'button':
            case 'checkbox':
            case 'file':
            case 'image':
            case 'radio':
            case 'submit':
                return false;
            }
            case 'textarea':
                return true;
            case 'select':
                return !deviceIsAndroid;
            case 'input':
                switch (target.type) {
                    case 'button':
                    case 'checkbox':
                    case 'file':
                    case 'image':
                    case 'radio':
                    case 'submit':
                        return false;
                }
            // No point in attempting to focus disabled inputs
            return !target.disabled && !target.readOnly;
        default:
            return (/\bneedsfocus\b/).test(target.className);
                // No point in attempting to focus disabled inputs
                return !target.disabled && !target.readOnly;
            default:
                return (/\bneedsfocus\b/).test(target.className);
        }
    };
@@ -477,7 +490,8 @@
        // Synthesise a click event, with an extra attribute so it can be tracked
        clickEvent = document.createEvent('MouseEvents');
        clickEvent.initMouseEvent(this.determineEventType(targetElement), true, true, window, 1, touch.screenX, touch.screenY, touch.clientX, touch.clientY, false, false, false, false, 0, null);
        clickEvent.initMouseEvent(this.determineEventType(targetElement), true, true, window, 1, touch.screenX,
            touch.screenY, touch.clientX, touch.clientY, false, false, false, false, 0, null);
        clickEvent.forwardedTouchEvent = true;
        targetElement.dispatchEvent(clickEvent);
    };
@@ -500,7 +514,8 @@
        var length;
        // Issue #160: on iOS 7, some input elements (e.g. date datetime month) throw a vague TypeError on setSelectionRange. These elements don't have an integer value for the selectionStart and selectionEnd properties, but unfortunately that can't be used for detection because accessing the properties also throws a TypeError. Just check the type instead. Filed as Apple bug #15122724.
        if (deviceIsIOS && targetElement.setSelectionRange && targetElement.type.indexOf('date') !== 0 && targetElement.type !== 'time' && targetElement.type !== 'month') {
        if (deviceIsIOS && targetElement.setSelectionRange && targetElement.type.indexOf('date') !== 0 &&
            targetElement.type !== 'time' && targetElement.type !== 'month') {
            length = targetElement.value.length;
            targetElement.setSelectionRange(length, length);
        } else {
@@ -631,9 +646,11 @@
     * @returns {boolean}
     */
    FastClick.prototype.touchHasMoved = function(event) {
        var touch = event.changedTouches[0], boundary = this.touchBoundary;
        var touch = event.changedTouches[0],
            boundary = this.touchBoundary;
        if (Math.abs(touch.pageX - this.touchStartX) > boundary || Math.abs(touch.pageY - this.touchStartY) > boundary) {
        if (Math.abs(touch.pageX - this.touchStartX) > boundary || Math.abs(touch.pageY - this.touchStartY) >
            boundary) {
            return true;
        }
@@ -653,7 +670,8 @@
        }
        // If the touch has moved, cancel the click tracking
        if (this.targetElement !== this.getTargetElementFromEventTarget(event.target) || this.touchHasMoved(event)) {
        if (this.targetElement !== this.getTargetElementFromEventTarget(event.target) || this.touchHasMoved(
                event)) {
            this.trackingClick = false;
            this.targetElement = null;
        }
@@ -682,7 +700,8 @@
        // If no for attribute exists, attempt to retrieve the first labellable descendant element
        // the list of which is defined here: http://www.w3.org/TR/html5/forms.html#category-label
        return labelElement.querySelector('button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea');
        return labelElement.querySelector(
            'button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea');
    };
@@ -693,7 +712,8 @@
     * @returns {boolean}
     */
    FastClick.prototype.onTouchEnd = function(event) {
        var forElement, trackingClickStart, targetTagName, scrollParent, touch, targetElement = this.targetElement;
        var forElement, trackingClickStart, targetTagName, scrollParent, touch, targetElement = this
            .targetElement;
        if (!this.trackingClick) {
            return true;
@@ -726,7 +746,8 @@
            touch = event.changedTouches[0];
            // In certain cases arguments of elementFromPoint can be negative, so prevent setting targetElement to null
            targetElement = document.elementFromPoint(touch.pageX - window.pageXOffset, touch.pageY - window.pageYOffset) || targetElement;
            targetElement = document.elementFromPoint(touch.pageX - window.pageXOffset, touch.pageY - window
                .pageYOffset) || targetElement;
            targetElement.fastClickScrollParent = this.targetElement.fastClickScrollParent;
        }
@@ -745,7 +766,8 @@
            // Case 1: If the touch started a while ago (best guess is 100ms based on tests for issue #36) then focus will be triggered anyway. Return early and unset the target element reference so that the subsequent click will be allowed through.
            // Case 2: Without this exception for input elements tapped when the document is contained in an iframe, then any inputted text won't be visible even though the value attribute is updated as the user types (issue #37).
            if ((event.timeStamp - trackingClickStart) > 100 || (deviceIsIOS && window.top !== window && targetTagName === 'input')) {
            if ((event.timeStamp - trackingClickStart) > 100 || (deviceIsIOS && window.top !== window &&
                    targetTagName === 'input')) {
                this.targetElement = null;
                return false;
            }
@@ -917,7 +939,7 @@
        }
        // Chrome version - zero for other browsers
        chromeVersion = +(/Chrome\/([0-9]+)/.exec(navigator.userAgent) || [,0])[1];
        chromeVersion = +(/Chrome\/([0-9]+)/.exec(navigator.userAgent) || [, 0])[1];
        if (chromeVersion) {
@@ -935,7 +957,7 @@
                    }
                }
            // Chrome desktop doesn't need FastClick (issue #15)
                // Chrome desktop doesn't need FastClick (issue #15)
            } else {
                return true;
            }
@@ -968,13 +990,14 @@
        }
        // Firefox version - zero for other browsers
        firefoxVersion = +(/Firefox\/([0-9]+)/.exec(navigator.userAgent) || [,0])[1];
        firefoxVersion = +(/Firefox\/([0-9]+)/.exec(navigator.userAgent) || [, 0])[1];
        if (firefoxVersion >= 27) {
            // Firefox 27+ does not have tap delay if the content is not zoomable - https://bugzilla.mozilla.org/show_bug.cgi?id=922896
            metaViewport = document.querySelector('meta[name=viewport]');
            if (metaViewport && (metaViewport.content.indexOf('user-scalable=no') !== -1 || document.documentElement.scrollWidth <= window.outerWidth)) {
            if (metaViewport && (metaViewport.content.indexOf('user-scalable=no') !== -1 || document
                    .documentElement.scrollWidth <= window.outerWidth)) {
                return true;
            }
        }
@@ -1013,8 +1036,8 @@
        window.FastClick = FastClick;
    }
document.addEventListener('DOMContentLoaded', function() {
    FastClick.attach(document.body);
}, false);
    document.addEventListener('DOMContentLoaded', function() {
        FastClick.attach(document.body);
    }, false);
}());
unpackage/cache/wgt/H5EDA0853/js/global.js
@@ -1,16 +1,14 @@
// // æ ¼å¼åŒ–地址栏参数    å°†å¯¹è±¡è‡ªåŠ¨æ‹¼æŽ¥æˆåœ°å€æ ä¼ å‚å½¢å¼
// export   formatParams() {
//     const data = {
//         userid: 33,
//         usercode: '002',
//         username: '张三',
//         usertype: 'APP'
//     }
//     return data
// }
// export const value=1
(function(w) {
     // æ ¼å¼åŒ–地址栏参数    å°†å¯¹è±¡è‡ªåŠ¨æ‹¼æŽ¥æˆåœ°å€æ ä¼ å‚å½¢å¼
     w.formatParams = function() {
            const data = {
                userid: 33,
                usercode: '002',
                username: '张三',
                usertype: 'APP'
            }
        return data;
    }
})(window);
unpackage/cache/wgt/H5EDA0853/pages/login/index.html
@@ -3,8 +3,8 @@
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
        <!-- <meta name="HandheldFriendly" content="true" /> -->
        <!-- <meta name="MobileOptimized" content="320" /> -->
        <meta name="HandheldFriendly" content="true" />
        <meta name="MobileOptimized" content="320" />
        <title>新凯迪制造云平台</title>
        <!-- å¼•入像素转换 px->rpx -->
        <!-- <script src="../../js/rpx4html.js"></script> -->
@@ -19,8 +19,8 @@
        <script type="text/javascript" src="../../js/http.js"></script>
        <!-- å¯¼å…¥è‡ªå®šä¹‰js文件 -->
        <!-- <script type="module" src="../../js/global.js"></script> -->
        <!-- å¯¼å…¥è‡ªå®šä¹‰å…¨å±€js文件 -->
        <script type="text/javascript" src="../../js/global.js"></script>
@@ -73,7 +73,7 @@
            },
            mounted() {
                console.log(formatParams(),1)
            },
            methods: {
                loginClick() {
unpackage/cache/wgt/H5EDA0853/pages/sbgl/dqby.html
@@ -6,8 +6,6 @@
        <meta name="HandheldFriendly" content="true" />
        <meta name="MobileOptimized" content="320" />
        <title>新凯迪制造云平台</title>
        <!-- å¼•入像素转换 px->rpx -->
        <!-- <script src="../../js/rpx4html.js"></script> -->
        <!-- å¼•入样式文件 -->
        <link rel="stylesheet" href="../../css/vant.css" />
@@ -93,22 +91,15 @@
        }
        .body {
            /* width: 96%; */
            height: 600px;
            background-color: grey;
            margin-top: 0px;
            /* margin-left: 2%; */
            background-color: #fff;
            position: relative;
            /*         display: flex;
            justify-content: center;
            align-items: flex-start; */
            position: relative;
        }
        .van-nav-bar__content {
            background-color: #2651d8;
            /* background-color: #25a4ff; */
            height: 44px;
        }
unpackage/cache/wgt/H5EDA0853/pages/sbgl/rcdj.html
@@ -6,8 +6,6 @@
        <meta name="HandheldFriendly" content="true" />
        <meta name="MobileOptimized" content="320" />
        <title>新凯迪制造云平台</title>
        <!-- å¼•入像素转换 px->rpx -->
        <!-- <script src="../../js/rpx4html.js"></script> -->
        <!-- å¼•入样式文件 -->
        <link rel="stylesheet" href="../../css/vant.css" />
@@ -19,10 +17,150 @@
        <script type="text/javascript" src="../../js/axios.min.js"></script>
        <script type="text/javascript" src="../../js/http.js"></script>
        <script type="text/javascript" src="../../js/common.js"></script>
        <link rel="stylesheet" href="../css/global.css" type="text/css" charset="utf-8" />
        <!-- <link rel="stylesheet" href="../../css/global.css" type="text/css" charset="utf-8" /> -->
        <script type="text/javascript">
            var topContent = [
                // {
                //     code: 'SB001',
                //     name: '齿轮箱组',
                //     wksp_code: "CJ002",
                //     wksp_name: '装配车间',
                //     eqpchkmain_code: "djbz002"
                // },
                // {
                //     code: 'SB003',
                //     name: '齿轮箱组',
                //     wksp_code: "CJ002",
                //     wksp_name: '装配车间',
                //     eqpchkmain_code: "djbz002"
                // },
            ];
            var centerContent = [
                //     {
                //     checkdesc: '气压正常10帕,最高不超过10.5帕,最低不低于9.7',
                //     code: 'BW003',
                //     name: '部位3',
                //     seq: 2,
                //     cycle: 'D',
                //     isscan: 'N',
                //     isOK: 'OK',
                //     inputValue: '',
                //     isDisabled: false,
                // },
            ]
            let radioValue = ''
            let resultValue = ''
            let bwcode = ''
            let number = []
            function scaned(r) {
                let flag = false
                topContent.forEach((item, index) => {
                    if (item.code === r) {
                        flag = true
                    }
                })
                if (flag) {
                    vant.Notify({
                        type: 'danger',
                        message: '此条码已扫描,已在列表中!'
                    });
                } else {
                    get('AppDeviceManage/CheckScanDeviceQrCodeData', {
                        eqpcode: r
                    }).then(res => {
                        if (res.code === '200' && res.data[0].eqpchkmain_code !== null) {
                            topContent.unshift(res.data[0])
                            topContentClcik(topContent[0].code)
                        }
                        if (res.code === '200' && res.data[0].eqpchkmain_code === null) {
                            vant.Notify({
                                type: 'danger',
                                message: '当前设备未设置点检标准绑定点检项目!'
                            });
                        }
                    })
                }
            }
            function scaned2(r) {
                if (bwcode === r) {
                    centerContent.forEach(item => {
                        if (item.code === bwcode) {
                            item.isDisabled = false
                            item.isOK = 'OK'
                            if (centerContent.every(r => r.isOK === 'OK')) {
                                resultValue = 'OK'
                            }
                            if (centerContent.some(r => r.isOK === 'NG')) {
                                resultValue = 'NG'
                            }
                            if (centerContent.some(r => r.isOK === '')) {
                                resultValue = ''
                            }
                            number.push({
                                id: '1'
                            })
                        }
                    })
                } else {
                    vant.Notify({
                        type: 'danger',
                        message: '扫描的二维码未与此点检项目相匹配!'
                    });
                }
            }
            function topContentClcik(code) {
                radioValue = code
                get('AppDeviceManage/SelectScanDeviceQrCodeItem', {
                    eqpcode: code
                }).then(res => {
                    if (res.code === '200') {
                        centerContent = res.data
                        centerContent = JSON.parse(JSON.stringify(centerContent))
                        centerContent.forEach(item => {
                            item.isDisabled = item.isscan === 'Y'
                            item.inputValue = ''
                            item.isOK = item.isscan !== 'Y' ? 'OK' : ''
                        })
                        if (centerContent.every(r => r.isOK === 'OK')) {
                            resultValue = 'OK'
                        }
                        if (centerContent.some(r => r.isOK === 'NG')) {
                            resultValue = 'NG'
                        }
                        if (centerContent.some(r => r.isOK === '')) {
                            resultValue = ''
                        }
                    }
                })
            }
        </script>
    </head>
    <!-- <body onload="loadNodes()"> -->
    <body>
        <div id="app">
@@ -30,7 +168,7 @@
                <van-nav-bar title="日常点检" @click-right="onClickRight" left-arrow @click-left="onClickleft">
                    <template #right>
                        <van-popover style="" placement="bottom-end" :offset="[13,8]" v-model="showPopover"
                        <van-popover style="" placement="bottom-end" :offset="[13,8]" v-model="showPopover"
                            trigger="click" :actions="actions" @select="onSelect">
                            <template #reference>
                                <van-icon name="bars" size='20' color='#fff' />
@@ -39,8 +177,129 @@
                    </template>
                </van-nav-bar>
            </div>
                <div class="head">
                    <div class="head_block">
                        <div class="head_left">
                            <div class="head_bar"></div>
                            <div class="head_title">
                                æ‰«æç‚¹æ£€å·¥ä½
                            </div>
                        </div>
                        <div style="margin-right: 10px;">
                            <van-icon name="scan" color='red' size='24' @click='topScanClick()' />
                        </div>
                    </div>
                    <div class="flex_between" style="">
                        <div id="contentLeft" style="width: 100%;margin-top: 10px;">
                            <div id="topContentID" v-for="item in topContent" :key="item.code"
                                style="margin-bottom: 10px;margin-left: 20px;" @click="topContentClcik(item.code)">
                                <div style="display: flex;align-items: center;">
                                    <div>
                                        <div>工位编码:</div>
                                        <div>工位名称:</div>
                                        <div>生产车间:</div>
                                    </div>
                                    <div>
                                        <div>{{item.code}}</div>
                                        <div>{{item.name}}</div>
                                        <div>{{item.wksp_name}}</div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div id="contentRight">
                            <van-radio-group v-model="radioValue" style="padding-right: 12px;">
                                <van-radio checked-color='red' icon-size="18px"
                                    style="height: 63px;margin-bottom: 10px;" v-for="item in topContent"
                                    :key="item.code" :name="item.code"></van-radio>
                            </van-radio-group>
                        </div>
                    </div>
                </div>
                <div class="head"
                    :style="{marginTop:topContent.length===0?'100px':'0',minHeight:topContent.length===0?'0':'220px'}"
                    style="margin-bottom: 130px;padding-bottom: 10px;overflow-y: ;"
                    :style="{marginTop:topContent.length===0?'78px':'0'}">
                    <div class="head_block" style="margin-bottom:10px;">
                        <div class="head_left">
                            <div class="head_bar"></div>
                            <div class="head_title">
                                ç‚¹æ£€é¡¹ç›®å†…容
                            </div>
                        </div>
                    </div>
                    <div class="center_border flex_column" style="margin:  5px;" v-for="item in centerContent"
                        :key="item.code">
                        <div class="flex_between">
                            <div class="center_title">{{item.name}}</div>
                            <div style="margin-right: 10px;" v-if="item.isscan==='Y'">
                                <van-icon name="scan" color='red' size='24' @click='centerScanClick(item.code)' />
                            </div>
                        </div>
                        <div class="flex_between ">
                            <div class='flex_between' style="width: 90%;">
                                <van-field class="vanFieldInput" :disabled="item.isDisabled" v-model="item.inputValue"
                                    placeholder="请输入" />
                            </div>
                            <div class="" style="width: 40%;display: flex;justify-content: space-around;">
                                <van-button class="buttonSmall" :disabled='item.isDisabled' size="small"
                                    :plain="item.isOK!=='OK'" @click="bwClick(item,'OK')" type="primary">正常</van-button>
                                <van-button class="buttonSmall" size="small" :plain="item.isOK!=='NG'"
                                    @click="bwClick(item,'NG')" :disabled='item.isDisabled' type="danger">异常
                                </van-button>
                            </div>
                        </div>
                        <div style="font-weight: lighter;font-size: 14px;padding-right: 5px">
                            {{item.checkdesc}}
                        </div>
                    </div>
                </div>
                <div style="">
                    <div class="footer">
                        <div class="head_block" style="margin-bottom: 20rpx;align-items: center;">
                            <div class="head_left">
                                <div class="head_bar"></div>
                                <div class="head_title">
                                    ç‚¹æ£€ç»“æžœ
                                </div>
                            </div>
                            <div class="flex_center" style="width: 30%;display: flex;justify-content: space-around;">
                                <van-button class="buttonSmall"
                                    :disabled="centerContent.some(item=>item.isDisabled===true)||centerContent.length===0"
                                    size="small" :plain="resultValue!=='OK'" @click="resultClick('OK')" type="primary">
                                    æ­£å¸¸</van-button>
                                <van-button class="buttonSmall" size="small" :plain="resultValue!=='NG'"
                                    :disabled="centerContent.some(item=>item.isDisabled===true)||centerContent.length===0"
                                    @click="resultClick('NG')" type="danger">异常</van-button>
                            </div>
                        </div>
                        <div
                            style="position:fixed;bottom: 0;width: 96%;display: flex;justify-content: center;flex-direction: column;align-items: center">
                            <van-button class="vanButtonInfo" :disabled="resultValue===''" @click="submit" type="info">
                                ç¡®è®¤æäº¤</van-button>
                        </div>
                    </div>
                </div>
            </div>
            <van-overlay :show="overlayShow" @click="overlayShow=false" />
@@ -64,17 +323,150 @@
                        icon: 'revoke',
                        text: '退出登录'
                    }],
                    topContent2: topContent,
                    centerContent2: centerContent,
                    number2: number
                }
            },
            created() {
            watch: {
                'topContent2.length': {
                    handler(newValue, oldValue) {
                        if (newValue !== oldValue) {
                            // this.topContent2 = topContent
                            // this.$forceUpdate()
                            if (topContent[0] && topContent[0].code) {
                                this.$forceUpdate()
                                this.topContentClcik(topContent[0].code)
                            }
                        }
                    },
                    deep: true,
                    immediate: true,
                },
                'topContent.length': {
                    handler(newValue, oldValue) {
                        if (newValue !== oldValue) {
                            this.$forceUpdate()
                            // if (topContent[0]&&topContent[0].code) {
                            //     this.$forceUpdate()
                            //     this.topContentClcik(topContent[0].code)
                            // }
                        }
                    },
                    deep: true,
                    immediate: true,
                },
                'number2.length': {
                    handler(newValue, oldValue) {
                        this.$forceUpdate()
                    },
                    deep: true,
                    immediate: true,
                },
                'number.length': {
                    handler(newValue, oldValue) {
                        this.$forceUpdate()
                    },
                    deep: true,
                    immediate: true,
                },
            },
            mounted() {
            },
            created() {},
            mounted() {},
            methods: {
                onClickleft(){
                submit() {
                    vant.Toast('xxx1')
                },
                topContentClcik(code) {
                    radioValue = code
                    this.$forceUpdate()
                    get('AppDeviceManage/SelectScanDeviceQrCodeItem', {
                        eqpcode: code
                    }).then(res => {
                        if (res.code === '200') {
                            centerContent = res.data
                            centerContent.forEach(item => {
                                item.isDisabled = item.isscan === 'Y'
                                item.inputValue = ''
                                item.isOK = item.isscan !== 'Y' ? 'OK' : ''
                            })
                            if (centerContent.every(r => r.isOK === 'OK')) {
                                resultValue = 'OK'
                            }
                            if (centerContent.some(r => r.isOK === 'NG')) {
                                resultValue = 'NG'
                            }
                            if (centerContent.some(r => r.isOK === '')) {
                                resultValue = ''
                            }
                            this.$forceUpdate()
                        }
                    })
                },
                resultClick(val) {
                    resultValue = val
                    this.$forceUpdate()
                },
                selected(id) {
                    alert(id)
                },
                // æ‰«æç‚¹æ£€å·¥ä½æ‰«æ
                topScanClick() {
                    createWithoutTitle('../../components/barcode_scan.html', {
                        titleNView: {
                            type: 'float',
                            backgroundColor: 'rgba(215,75,40,0.3)',
                            titleText: '扫一扫',
                            titleColor: '#FFFFFF',
                            autoBackButton: true,
                            buttons: [{
                                fontSrc: '_www/helloh5.ttf',
                                text: '\ue302',
                                fontSize: '18px',
                                onclick: 'javascript:scanPicture()'
                            }]
                        }
                    });
                },
                // ç‚¹æ£€é¡¹ç›®å†…容扫描
                centerScanClick(code) {
                    bwcode = code
                    createWithoutTitle('../../components/barcode_scan2.html', {
                        titleNView: {
                            type: 'float',
                            backgroundColor: 'rgba(215,75,40,0.3)',
                            titleText: '扫一扫',
                            titleColor: '#FFFFFF',
                            autoBackButton: true,
                            buttons: [{
                                fontSrc: '_www/helloh5.ttf',
                                text: '\ue302',
                                fontSize: '18px',
                                onclick: 'javascript:scanPicture()'
                            }]
                        }
                    });
                },
                // éƒ¨ä½æ­£å¸¸ å¼‚常按钮点击
                bwClick(item, val) {
                    item.isOK = val
                    if (centerContent.every(item => item.isOK !== '')) {
                        if (centerContent.every(item => item.isOK === 'OK')) {
                            resultValue = 'OK'
                        } else {
                            resultValue = 'NG'
                        }
                    }
                    this.$forceUpdate() //强制视图更新
                },
                onClickleft() {
                    history.back()
                },
                onClickRight() {
@@ -88,27 +480,22 @@
        })
    </script>
    <style type="text/css">
        @import url('../../css/global.css');
        body {
            background-color: #fff;
        }
        .body {
            /* width: 96%; */
            height: 600px;
            min-height: 600px;
            background-color: grey;
            margin-top: 0px;
            /* margin-left: 2%; */
            background-color: #fff;
            position: relative;
            /*         display: flex;
            justify-content: center;
            align-items: flex-start; */
        }
        .van-nav-bar__content {
            background-color: #2651d8;
            /* background-color: #25a4ff; */
            height: 44px;
        }
@@ -116,8 +503,43 @@
            color: #fff;
            letter-spacing: 2px;
        }
        .van-nav-bar__arrow{
        .van-nav-bar__arrow {
            color: #fff !important;
        }
        .createElementDiv {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
            margin-left: 20px;
        }
        .vanFieldInput {
            height: 36px;
            line-height: 36px;
            align-items: center;
            /* width: 200px; */
            padding: 0;
            padding-left: 10px;
            /* border-radius: 5px; */
            margin: 5px 0;
            /* background-color: #fff; */
        }
        .buttonSmall {
            /* border-radius: 5px; */
        }
        .vanButtonInfo {
            width: 100%;
            letter-spacing: 2px;
            height: 50px;
            font-size: 18px;
            /* margin-left: 0; */
        }
    </style>
</html>
unpackage/cache/wgt/H5EDA0853/pages/sbgl/rcdj_back.html
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,493 @@
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
        <meta name="HandheldFriendly" content="true" />
        <meta name="MobileOptimized" content="320" />
        <title>新凯迪制造云平台</title>
        <!-- å¼•入样式文件 -->
        <link rel="stylesheet" href="../../css/vant.css" />
        <!-- å¼•å…¥ Vue å’Œ Vant çš„ JS æ–‡ä»¶ -->
        <script src="../../js/vue.min.js"></script>
        <script src="../../js/vant.min.js"></script>
        <script type="text/javascript" src="../../js/jquery-1.6.4.min.js"></script>
        <script type="text/javascript" src="../../js/axios.min.js"></script>
        <script type="text/javascript" src="../../js/http.js"></script>
        <script type="text/javascript" src="../../js/common.js"></script>
        <!-- <link rel="stylesheet" href="../../css/global.css" type="text/css" charset="utf-8" /> -->
        <script type="text/javascript">
            var topContent = [{
                code: 'SB001',
                name: '12312',
                wksp_code: "CJ002",
                wksp_name: '12321321',
                eqpchkmain_code: "djbz002"
            }, ];
            var centerContent = [{
                    checkdesc: '1234',
                    code: 'BW001',
                    name: '部位22222',
                    seq: 1,
                    cycle: 'D',
                    isscan: 'N',
                    inputValue: '',
                    isOK: 'OK',
                    isDisabled: false,
                },
                {
                    checkdesc: '气压正常10帕,最高不超过10.5帕,最低不低于9.7',
                    code: 'BW003',
                    name: '部位3',
                    seq: 2,
                    cycle: 'D',
                    isscan: 'N',
                    isOK: 'OK',
                    inputValue: '',
                    isDisabled: true,
                },
            ]
            let radioValue = ''
            let resultValue = ''
            function loadNodes() {
                let li = null
                hl = document.getElementById('contentLeft');
                topContent.forEach((item, index) => {
                    li = document.createElement('div');
                    li.code = item.code
                    li.id = item.code
                    let html = '<div class="createElementDiv">'
                    html += '<div style="">' +
                        '工位编码:' + item.code + '</br>' + '工位名称:' + item.name + '</br>' + '生产车间:' + item.wksp_name +
                        '</div><input  type="radio" class="radioClass" style="margin-right:16px;background-color:red !important;color:red !important;"  name="radioValue"></input>'
                    html += '</div>'
                    li.setAttribute('onclick', 'createElementDivClick(code)')
                    li.innerHTML = html;
                    hl.insertBefore(li, hl.childNodes[index]);
                })
                if (hl.querySelectorAll("div")[1]) {
                    hl.querySelectorAll("div")[1].querySelectorAll("input")[0].checked = true
                    // createElementDivClick(topContent[0].code)
                }
            }
            function createElementDivClick(code) {
                let node = document.getElementById(code)
                node.querySelectorAll("div.createElementDiv>input")[0].checked = true
                get('AppDeviceManage/SelectScanDeviceQrCodeItem', {
                    eqpcode: code
                }).then(res => {
                    vant.Toast(JSON.stringify(res.data))
                })
            }
            function scaned(r) {
                get('AppDeviceManage/CheckScanDeviceQrCodeData', {
                    eqpcode: r
                }).then(res => {
                    if (res.code === '200' && res.data[0].eqpchkmain_code !== null) {
                        // alert(JSON.stringify(res.data))
                        // alert(JSON.stringify(res.data))
                        let li = null
                        hl = document.getElementById('contentLeft');
                        li = document.createElement('div');
                        li.code = res.data[0].code
                        li.id = res.data[0].code
                        let html = '<div class="createElementDiv">'
                        html += '<div style="">' +
                            '工位编码:' + res.data[0].code + '</br>' + '工位名称:' + res.data[0].name + '</br>' + '生产车间:' + res
                            .data[0]
                            .wksp_name +
                            '</div><input  style="margin-right:16px;background-color:red !important;color:red !important;" type="radio"   name="radioValue"></input>'
                        html += '</div>'
                        li.setAttribute('onclick', 'createElementDivClick(code)')
                        li.innerHTML = html;
                        hl.insertBefore(li, hl.childNodes[0]);
                        if (hl.querySelectorAll("div")[1]) {
                            hl.querySelectorAll("div")[1].querySelectorAll("input")[0].checked = true
                            createElementDivClick(res.data[0].code)
                        }
                        topContent.unshift({
                            code: res.data[0].code,
                            name: res.data[0].name,
                            wksp_name: res[0].data.wksp_name
                        })
                    }
                    if (res.code === '200' && res.data[0].eqpchkmain_code === null) {
                        vant.Notify({
                            type: 'danger',
                            message: res.Message
                        });
                    }
                })
            }
            function scaned2(r) {
                alert(r)
            }
            function del() {
                let node = document.getElementById('contentLeft')
                node.removeChild(document.getElementById('SB001'))
            }
        </script>
    </head>
    <body onload="loadNodes()">
        <!-- <body> -->
        <div id="app">
            <div class="body">
                <van-nav-bar title="日常点检" @click-right="onClickRight" left-arrow @click-left="onClickleft">
                    <template #right>
                        <van-popover style="" placement="bottom-end" :offset="[13,8]" v-model="showPopover"
                            trigger="click" :actions="actions" @select="onSelect">
                            <template #reference>
                                <van-icon name="bars" size='20' color='#fff' />
                            </template>
                        </van-popover>
                    </template>
                </van-nav-bar>
                <div class="head">
                    <div class="head_block">
                        <div class="head_left">
                            <div class="head_bar"></div>
                            <div class="head_title">
                                æ‰«æç‚¹æ£€å·¥ä½
                            </div>
                        </div>
                        <div style="margin-right: 10px;">
                            <van-icon name="scan" color='red' size='24' @click='topScanClick()' />
                        </div>
                    </div>
                    <div class="flex_between" style="">
                        <div id="contentLeft" style="width: 100%;">
                        </div>
                        <div id="contentRight">
                        </div>
                    </div>
                </div>
                <div class="head" style="margin-bottom: 15px;padding-bottom: 10px;"
                    :style="{marginTop:topContent.length===0?'78px':'0'}">
                    <div class="head_block" style="margin-bottom:10px;">
                        <div class="head_left">
                            <div class="head_bar"></div>
                            <div class="head_title">
                                ç‚¹æ£€é¡¹ç›®å†…容
                            </div>
                        </div>
                    </div>
                    <div class="center_border flex_column" style="margin:  5px;" v-for="item in centerContent"
                        :key="item.code">
                        <div class="flex_between">
                            <div class="center_title">{{item.name}}</div>
                            <!-- v-if="item.isscan==='Y'" -->
                            <div style="margin-right: 10px;">
                                <van-icon name="scan" color='red' size='24' @click='centerScanClick(item.code)' />
                            </div>
                        </div>
                        <div class="flex_between ">
                            <div class='flex_between'>
                                <van-field class="vanFieldInput" style="" border v-model="item.inputValue"
                                    label="请输入" />
                            </div>
                            <div class="" style="width: 40%;display: flex;justify-content: space-around;">
                                <van-button class="buttonSmall" size="small" :plain="item.isOK!=='OK'"
                                    @click="bwClick(item,'OK')" type="primary">正常</van-button>
                                <van-button class="buttonSmall" size="small" :plain="item.isOK!=='NG'"
                                    @click="bwClick(item,'NG')" type="danger">异常</van-button>
                            </div>
                        </div>
                        <div style="font-weight: lighter;font-size: 14px;padding-right: 5px">
                            {{item.checkdesc}}
                        </div>
                    </div>
                </div>
                <!--
                <div style="position:fixed;bottom: 0;width: 100%;display: flex;justify-content: center;flex-direction: column;align-items: center">
                    <div style="display: flex;float: left;">
                        111
                    </div>
                    <van-button class="vanButtonInfo"  type="info">确认提交</van-button>
                </div> -->
                <div style="">
                    <div class="footer">
                        <div class="head_block" style="margin-bottom: 20rpx;align-items: center;">
                            <div class="head_left">
                                <div class="head_bar"></div>
                                <div class="head_title">
                                    ç‚¹æ£€ç»“æžœ
                                </div>
                            </div>
                            <div class="flex_center" style="width: 30%;display: flex;justify-content: space-around;">
                                <van-button class="buttonSmall" size="small" :plain="resultValue!=='OK'"
                                    @click="resultClick('OK')" type="primary">正常</van-button>
                                <van-button class="buttonSmall" size="small" :plain="resultValue!=='NG'"
                                    @click="resultClick('NG')" type="danger">异常</van-button>
                            </div>
                        </div>
                        <div
                            style="position:fixed;bottom: 0;width: 96%;display: flex;justify-content: center;flex-direction: column;align-items: center">
                            <van-button class="vanButtonInfo" type="info">确认提交</van-button>
                        </div>
                    </div>
                </div>
            </div>
            <!-- <button @click="del">删除节点</button> -->
            <van-overlay :show="overlayShow" @click="overlayShow=false" />
        </div>
    </body>
    <script>
        var app = new Vue({
            el: '#app',
            data: function() {
                return {
                    overlayShow: false,
                    showPopover: false,
                    actions: [{
                        icon: 'description',
                        text: '操作指导'
                    }, {
                        icon: 'award-o',
                        text: '成品追溯'
                    }, {
                        icon: 'revoke',
                        text: '退出登录'
                    }],
                    radioValue: '',
                }
            },
            watch: {
            },
            created() {
            },
            mounted() {
            },
            methods: {
                resultClick(val) {
                    resultValue = val
                    this.$forceUpdate()
                },
                selected(id) {
                    alert(id)
                },
                // æ‰«æç‚¹æ£€å·¥ä½æ‰«æ
                topScanClick() {
                    createWithoutTitle('../../components/barcode_scan.html', {
                        titleNView: {
                            type: 'float',
                            backgroundColor: 'rgba(215,75,40,0.3)',
                            titleText: '扫一扫',
                            titleColor: '#FFFFFF',
                            autoBackButton: true,
                            buttons: [{
                                fontSrc: '_www/helloh5.ttf',
                                text: '\ue302',
                                fontSize: '18px',
                                onclick: 'javascript:scanPicture()'
                            }]
                        }
                    });
                },
                // ç‚¹æ£€é¡¹ç›®å†…容扫描
                centerScanClick() {
                    createWithoutTitle('../../components/barcode_scan2.html', {
                        titleNView: {
                            type: 'float',
                            backgroundColor: 'rgba(215,75,40,0.3)',
                            titleText: '扫一扫',
                            titleColor: '#FFFFFF',
                            autoBackButton: true,
                            buttons: [{
                                fontSrc: '_www/helloh5.ttf',
                                text: '\ue302',
                                fontSize: '18px',
                                onclick: 'javascript:scanPicture()'
                            }]
                        }
                    });
                },
                // éƒ¨ä½æ­£å¸¸ å¼‚常按钮点击
                bwClick(item, val) {
                    item.isOK = val
                    if (centerContent.every(item => item.isOK !== '')) {
                        // if (centerContent.every(item => item.isOK === 'OK')) {
                        //     this.resultValue = 'OK'
                        // } else {
                        //     this.resultValue = 'NG'
                        // }
                    }
                    this.$forceUpdate() //强制视图更新
                },
                groupChange(code) {
                },
                onClickleft() {
                    history.back()
                },
                onClickRight() {
                    this.overlayShow = true
                },
                onSelect(action) {
                    vant.Toast(action.text);
                    this.overlayShow = false
                },
            }
        })
    </script>
    <style type="text/css">
        @import url('../../css/global.css');
        body {
            background-color: #fff;
        }
        .body {
            min-height: 600px;
            background-color: grey;
            margin-top: 0px;
            background-color: #fff;
            position: relative;
        }
        .van-nav-bar__content {
            background-color: #2651d8;
            height: 44px;
        }
        .van-nav-bar__title {
            color: #fff;
            letter-spacing: 2px;
        }
        .van-nav-bar__arrow {
            color: #fff !important;
        }
        .createElementDiv {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
            margin-left: 20px;
        }
        .vanFieldInput {
            height: 36px;
            line-height: 36px;
            align-items: center;
            width: 90%;
            /* border-radius: 5px; */
            margin: 5px 0;
            /* background-color: #fff; */
        }
        .buttonSmall {
            /* border-radius: 5px; */
        }
        .vanButtonInfo {
            width: 100%;
            letter-spacing: 2px;
            height: 50px;
            font-size: 18px;
            /* margin-left: 0; */
        }
        /*
        ::v-deep input[type="radio"] {
            background-color: red !important;
            color: red !important;
            position: absolute !important;
        }
        ::v-deep .radioClass {
            background-color: red !important;
            color: red !important;
                position: absolute !important;
        } */
        /*     input[type="radio"]+label ::before {
            content: '';
            display: inline-block;
            vertical-align: middle;
            width: 15px;
            height: 15px;
            margin-right: 5px;
            box-sizing: border-box;
            border-radius: 50%;
            margin-bottom: 4px;
            border: 1px solid #bfcbd9;
        } */
    </style>
</html>
unpackage/cache/wgt/H5EDA0853/pages/sbgl/sbwx.html
@@ -93,22 +93,15 @@
        }
        .body {
            /* width: 96%; */
            height: 600px;
            background-color: grey;
            margin-top: 0px;
            /* margin-left: 2%; */
            background-color: #fff;
            position: relative;
            /*         display: flex;
            justify-content: center;
            align-items: flex-start; */
            position: relative;
        }
        .van-nav-bar__content {
            background-color: #2651d8;
            /* background-color: #25a4ff; */
            height: 44px;
        }
unpackage/cache/wgt/H5EDA0853/pages/sbgl/wxyz.html
@@ -93,22 +93,15 @@
        }
        .body {
            /* width: 96%; */
            height: 600px;
            background-color: grey;
            margin-top: 0px;
            /* margin-left: 2%; */
            background-color: #fff;
            position: relative;
            /*         display: flex;
            justify-content: center;
            align-items: flex-start; */
            position: relative;
        }
        .van-nav-bar__content {
            background-color: #2651d8;
            /* background-color: #25a4ff; */
            height: 44px;
        }
unpackage/cache/wgt/H5EDA0853/pages/xtsy/index.html
@@ -162,22 +162,15 @@
        }
        .body {
            /* width: 96%; */
            height: 600px;
            background-color: grey;
            margin-top: 0px;
            /* margin-left: 2%; */
            background-color: #fff;
            position: relative;
            /*         display: flex;
            justify-content: center;
            align-items: flex-start; */
        }
        .van-nav-bar__content {
            background-color: #2651d8;
            /* background-color: #25a4ff; */
            height: 44px;
        }
unpackage/cache/wgt/H5EDA0853/plus/barcode.html
@@ -1,151 +1,173 @@
<!DOCTYPE HTML>
<html>
    <head>
        <meta charset="utf-8"/>
        <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
        <meta name="HandheldFriendly" content="true"/>
        <meta name="MobileOptimized" content="320"/>
        <meta charset="utf-8" />
        <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
        <meta name="HandheldFriendly" content="true" />
        <meta name="MobileOptimized" content="320" />
        <title>Hello H5+</title>
        <script type="text/javascript" src="../js/common.js"></script>
        <script type="text/javascript">
var img = null;
var blist = [];
function scaned(t, r, f){
    var d = new Date();
    var h=d.getHours(),m=d.getMinutes(),s=d.getSeconds(),ms=d.getMilliseconds();
    if(h < 10){ h='0'+h; }
    if(m < 10){ m='0'+m; }
    if(s < 10){ s='0'+s; }
    if(ms < 10){ ms='00'+ms; }
    else if(ms < 100){ ms='0'+ms; }
    var ts = '['+h+':'+m+':'+s+'.'+ms+']';
    var li=null,hl = document.getElementById('history');
    if(blist.length > 0){
        li = document.createElement('li');
        li.className = 'ditem';
        hl.insertBefore(li, hl.childNodes[0]);
    } else{
        li = document.getElementById('nohistory');
    }
    li.id = blist.length;
    var html = '['+h+':'+m+':'+s+'.'+ms+']'+'  '+t+'码<div class="hdata">';
    html += r;
    html += '</div>';
    li.innerHTML = html;
    li.setAttribute('onclick', 'selected(id)');
    blist[blist.length] = {type:t,result:r,file:f};
    update(t, r, f);
}
function selected(id){
    var h = blist[id];
    update( h.type, h.result, h.file );
    if(h.result.indexOf('http://')==0  || h.result.indexOf('https://')==0){
        plus.nativeUI.confirm(h.result, function(i){
            if(i.index == 0){
                plus.runtime.openURL(h.result);
            var img = null;
            var blist = [];
            function scaned(t, r, f) {
                var d = new Date();
                var h = d.getHours(),
                    m = d.getMinutes(),
                    s = d.getSeconds(),
                    ms = d.getMilliseconds();
                if (h < 10) {
                    h = '0' + h;
                }
                if (m < 10) {
                    m = '0' + m;
                }
                if (s < 10) {
                    s = '0' + s;
                }
                if (ms < 10) {
                    ms = '00' + ms;
                } else if (ms < 100) {
                    ms = '0' + ms;
                }
                var ts = '[' + h + ':' + m + ':' + s + '.' + ms + ']';
                var li = null,
                    hl = document.getElementById('history');
                if (blist.length > 0) {
                    li = document.createElement('li');
                    li.className = 'ditem';
                    hl.insertBefore(li, hl.childNodes[0]);
                } else {
                    li = document.getElementById('nohistory');
                }
                li.id = blist.length;
                var html = '[' + h + ':' + m + ':' + s + '.' + ms + ']' + '  ' + t + '码<div class="hdata">';
                html += r;
                html += '</div>';
                li.innerHTML = html;
                li.setAttribute('onclick', 'selected(id)');
                blist[blist.length] = {
                    type: t,
                    result: r,
                    file: f
                };
                update(t, r, f);
            }
        }, '', ['打开', '取消']);
    } else{
        plus.nativeUI.alert(h.result);
    }
}
function update(t, r, f){
    outSet('扫描成功:');
    outLine(t);
    outLine(r);
    outLine('\n图片地址:'+f);
    if(!f || f=='null'){
        img.src = '../img/barcode.png';
    } else{
        plus.io.resolveLocalFileSystemURL(f, function(entry){
            img.src=entry.toLocalURL();
        });
        //img.src = 'http://localhost:13131/'+f;
    }
}
function onempty(){
    if(window.plus){
        plus.nativeUI.alert('无扫描记录');
    } else {
        alert('无扫描记录');
    }
}
function cleanHistroy(){
    if(blist.length > 0){
        var hl = document.getElementById('history');
        hl.innerHTML = '<li id="nohistory" class="ditem" onclick="onempty();">无历史记录    </li>';
    }
    plus.io.resolveLocalFileSystemURL('_doc/barcode/', function(entry){
        entry.removeRecursively(function(){
            // Success
        }, function(e){
            //alert( "failed"+e.message );
        });
    });
}
// æ‰“开二维码扫描界面
function openBarcode(){
    createWithoutTitle('barcode_scan.html', {
        titleNView:{
            type: 'float',
            backgroundColor: 'rgba(215,75,40,0.3)',
            titleText: '扫一扫',
            titleColor: '#FFFFFF',
            autoBackButton: true,
            buttons: [{
                fontSrc: '_www/helloh5.ttf',
                text: '\ue302',
                fontSize: '18px',
                onclick: 'javascript:scanPicture()'
            }]
        }
    });
}
// æ‰“开自定义扫描界面
function openBarcodeCustom(){
    createWithoutTitle('barcode_custom.html', {
        titleNView:{
            type: 'float',
            backgroundColor: 'rgba(215,75,40,0.3)',
            titleText: '扫一扫',
            titleColor: '#FFFFFF',
            autoBackButton: true,
            buttons: [{
                fontSrc: '_www/helloh5.ttf',
                text: '\ue401',
                fontSize: '18px',
                onclick: 'javascript:switchFlash()'
            }]
        }
    });
}
            function selected(id) {
                var h = blist[id];
                update(h.type, h.result, h.file);
                if (h.result.indexOf('http://') == 0 || h.result.indexOf('https://') == 0) {
                    plus.nativeUI.confirm(h.result, function(i) {
                        if (i.index == 0) {
                            plus.runtime.openURL(h.result);
                        }
                    }, '', ['打开', '取消']);
                } else {
                    plus.nativeUI.alert(h.result);
                }
            }
            function update(t, r, f) {
                outSet('扫描成功:');
                outLine(t);
                outLine(r);
                outLine('\n图片地址:' + f);
                if (!f || f == 'null') {
                    img.src = '../img/barcode.png';
                } else {
                    plus.io.resolveLocalFileSystemURL(f, function(entry) {
                        img.src = entry.toLocalURL();
                    });
                    //img.src = 'http://localhost:13131/'+f;
                }
            }
            function onempty() {
                if (window.plus) {
                    plus.nativeUI.alert('无扫描记录');
                } else {
                    alert('无扫描记录');
                }
            }
            function cleanHistroy() {
                if (blist.length > 0) {
                    var hl = document.getElementById('history');
                    hl.innerHTML = '<li id="nohistory" class="ditem" onclick="onempty();">无历史记录    </li>';
                }
                plus.io.resolveLocalFileSystemURL('_doc/barcode/', function(entry) {
                    entry.removeRecursively(function() {
                        // Success
                    }, function(e) {
                        //alert( "failed"+e.message );
                    });
                });
            }
            // æ‰“开二维码扫描界面
            function openBarcode() {
                createWithoutTitle('barcode_scan.html', {
                    titleNView: {
                        type: 'float',
                        backgroundColor: 'rgba(215,75,40,0.3)',
                        titleText: '扫一扫',
                        titleColor: '#FFFFFF',
                        autoBackButton: true,
                        buttons: [{
                            fontSrc: '_www/helloh5.ttf',
                            text: '\ue302',
                            fontSize: '18px',
                            onclick: 'javascript:scanPicture()'
                        }]
                    }
                });
            }
            // æ‰“开自定义扫描界面
            function openBarcodeCustom() {
                createWithoutTitle('barcode_custom.html', {
                    titleNView: {
                        type: 'float',
                        backgroundColor: 'rgba(215,75,40,0.3)',
                        titleText: '扫一扫',
                        titleColor: '#FFFFFF',
                        autoBackButton: true,
                        buttons: [{
                            fontSrc: '_www/helloh5.ttf',
                            text: '\ue401',
                            fontSize: '18px',
                            onclick: 'javascript:switchFlash()'
                        }]
                    }
                });
            }
        </script>
        <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8"/>
        <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
        <style type="text/css" media="screen">
.hdata {
    color: #e1673e;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
            .hdata {
                color: #e1673e;
                font-size: 14px;
                overflow: hidden;
                text-overflow: ellipsis;
                white-space: nowrap;
            }
        </style>
    </head>
    <body onload="img=document.getElementById('bimg')">
        <br/>
        <img style="width:40%" id="bimg" src="../img/barcode.png"/>
        <br/>
        <br />
        <img style="width:40%" id="bimg" src="../img/barcode.png" />
        <br />
        <div class="button" onclick="openBarcode()">扫一扫</div>
        <div class="button" onclick="openBarcodeCustom()">扫一扫(自定义)</div>
        <br/>
        <br />
        <ul id="history" class="dlist" style="text-align:left;">
            <li id="nohistory" class="ditem" onclick="onempty()">无历史记录    </li>
            <li id="nohistory" class="ditem" onclick="onempty()">无历史记录 </li>
        </ul>
        <br/>
        <br />
        <div class="button button-waring" onclick="cleanHistroy()">清空历史记录</div>
        <div id="outpos"/>
        <div id="outpos" />
        <div id="output">
Barcode提供二维码扫描识别功能,支持调用摄像头即时扫描二维码,也可直接输入图片进行扫描识别。
            Barcode提供二维码扫描识别功能,支持调用摄像头即时扫描二维码,也可直接输入图片进行扫描识别。
        </div>
    </body>
</html>
</html>
unpackage/cache/wgt/H5EDA0853/plus/barcode_custom.html
@@ -1,136 +1,157 @@
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8"/>
        <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover"/>
        <meta name="HandheldFriendly" content="true"/>
        <meta name="MobileOptimized" content="320"/>
        <meta charset="utf-8" />
        <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover" />
        <meta name="HandheldFriendly" content="true" />
        <meta name="MobileOptimized" content="320" />
        <title>Hello H5+</title>
        <script type="text/javascript" src="../js/common.js"></script>
        <script type="text/javascript">
var ws=null,wo=null;
var scan=null;
// H5 plus事件处理
function plusReady(){
    // èŽ·å–çª—å£å¯¹è±¡
    ws=plus.webview.currentWebview();
    nv=ws.getTitleNView();
    wo=ws.opener();
    // å¼€å§‹æ‰«æ
    ws.addEventListener('show', function(){
        scan=new plus.barcode.Barcode('bcid',[plus.barcode.QR,plus.barcode.EAN8,plus.barcode.EAN13],{frameColor:'#00FF00',scanbarColor:'#00FF00'});
        scan.onmarked=onmarked;
        scan.start({conserve:true,filename:'_doc/barcode/'});
        createSubview();
    }, false);
    // æ˜¾ç¤ºé¡µé¢å¹¶å…³é—­ç­‰å¾…框
    ws.show('pop-in');
}
document.addEventListener('plusready', plusReady, false);
            var ws = null,
                wo = null;
            var scan = null;
            // H5 plus事件处理
            function plusReady() {
                // èŽ·å–çª—å£å¯¹è±¡
                ws = plus.webview.currentWebview();
                nv = ws.getTitleNView();
                wo = ws.opener();
                // å¼€å§‹æ‰«æ
                ws.addEventListener('show', function() {
                    scan = new plus.barcode.Barcode('bcid', [plus.barcode.QR, plus.barcode.EAN8, plus.barcode.EAN13], {
                        frameColor: '#00FF00',
                        scanbarColor: '#00FF00'
                    });
                    scan.onmarked = onmarked;
                    scan.start({
                        conserve: true,
                        filename: '_doc/barcode/'
                    });
                    createSubview();
                }, false);
                // æ˜¾ç¤ºé¡µé¢å¹¶å…³é—­ç­‰å¾…框
                ws.show('pop-in');
            }
            document.addEventListener('plusready', plusReady, false);
// äºŒç»´ç æ‰«ææˆåŠŸ
function onmarked(type, result, file){
    switch(type){
        case plus.barcode.QR:
        type = 'QR';
        break;
        case plus.barcode.EAN13:
        type = 'EAN13';
        break;
        case plus.barcode.EAN8:
        type = 'EAN8';
        break;
        default:
        type = '其它'+type;
        break;
    }
    result = result.replace(/\r\n/g, '');
    wo.evalJS("scaned('"+ type +"','"+ result +"','"+ file +"');");
    back();
}
// åˆ›å»ºå­çª—口
var view = null;
function createSubview(){
    view = new plus.nativeObj.View('nbutton', {
        bottom: '20px',
        left: '30%',
        width: '40%',
        height: '44px'
    }, [{
        tag: 'rect',
        id: 'rect',
        rectStyles: {
            radius: '8px',
            color: 'rgba(255,0,0,0.8)'
        }},{
        tag: 'font',
        id: 'text',
        text: '暂 停',
        textStyles: {
            color: '#FFFFFF'
        }
    }]);
    // å¤„理事件
    view.addEventListener('click', function(e){
        switchScan();
    }, false);
    view.addEventListener('touchstart', function(e){
        view.drawRect({
            radius: '8px',
            color: 'rgba(255,0,0,0.5)'
        }, {}, 'rect');
    }, false);
    view.addEventListener('touchend', function(e){
        view.drawRect({
            radius: '8px',
            color: 'rgba(255,0,0,0.8)'
        }, {}, 'rect');
    }, false);
    ws.append(view);
}
// å¼€å…³é—ªå…‰ç¯
var bFlash = false;
var AVCaptureDevice=null;
var Camera=null;
function switchFlash(){
    bFlash = !bFlash;
    scan.setFlash(bFlash);
    ws.setStyle({titleNView: {
        buttons: [{
            fontSrc: '_www/helloh5.ttf',
            text: (bFlash?'\ue400':'\ue401'),
            fontSize: '18px',
            onclick: 'javascript:switchFlash()'
        }]
    }});
}
// åˆ‡æ¢æ‰«æ
var bScan = false;
function switchScan(){
    if(bScan){
        scan.start({conserve:true, filename:'_doc/barcode/'});
        view&&(view.drawText('暂 停', {}, {color:'#FFFFFF'}, 'text'));
    }else{
        scan.cancel();
        view&&(view.drawText('开 始', {}, {color:'#FFFFFF'}, 'text'));
    }
    bScan=!bScan;
}
            // äºŒç»´ç æ‰«ææˆåŠŸ
            function onmarked(type, result, file) {
                switch (type) {
                    case plus.barcode.QR:
                        type = 'QR';
                        break;
                    case plus.barcode.EAN13:
                        type = 'EAN13';
                        break;
                    case plus.barcode.EAN8:
                        type = 'EAN8';
                        break;
                    default:
                        type = '其它' + type;
                        break;
                }
                result = result.replace(/\r\n/g, '');
                wo.evalJS("scaned('" + type + "','" + result + "','" + file + "');");
                back();
            }
            // åˆ›å»ºå­çª—口
            var view = null;
            function createSubview() {
                view = new plus.nativeObj.View('nbutton', {
                    bottom: '20px',
                    left: '30%',
                    width: '40%',
                    height: '44px'
                }, [{
                    tag: 'rect',
                    id: 'rect',
                    rectStyles: {
                        radius: '8px',
                        color: 'rgba(255,0,0,0.8)'
                    }
                }, {
                    tag: 'font',
                    id: 'text',
                    text: '暂 停',
                    textStyles: {
                        color: '#FFFFFF'
                    }
                }]);
                // å¤„理事件
                view.addEventListener('click', function(e) {
                    switchScan();
                }, false);
                view.addEventListener('touchstart', function(e) {
                    view.drawRect({
                        radius: '8px',
                        color: 'rgba(255,0,0,0.5)'
                    }, {}, 'rect');
                }, false);
                view.addEventListener('touchend', function(e) {
                    view.drawRect({
                        radius: '8px',
                        color: 'rgba(255,0,0,0.8)'
                    }, {}, 'rect');
                }, false);
                ws.append(view);
            }
            // å¼€å…³é—ªå…‰ç¯
            var bFlash = false;
            var AVCaptureDevice = null;
            var Camera = null;
            function switchFlash() {
                bFlash = !bFlash;
                scan.setFlash(bFlash);
                ws.setStyle({
                    titleNView: {
                        buttons: [{
                            fontSrc: '_www/helloh5.ttf',
                            text: (bFlash ? '\ue400' : '\ue401'),
                            fontSize: '18px',
                            onclick: 'javascript:switchFlash()'
                        }]
                    }
                });
            }
            // åˆ‡æ¢æ‰«æ
            var bScan = false;
            function switchScan() {
                if (bScan) {
                    scan.start({
                        conserve: true,
                        filename: '_doc/barcode/'
                    });
                    view && (view.drawText('暂 停', {}, {
                        color: '#FFFFFF'
                    }, 'text'));
                } else {
                    scan.cancel();
                    view && (view.drawText('开 始', {}, {
                        color: '#FFFFFF'
                    }, 'text'));
                }
                bScan = !bScan;
            }
        </script>
        <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8"/>
        <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
        <style type="text/css">
#bcid {
    width: 100%;
    position: absolute;
    top: 0px;
    bottom: 0px;
    text-align: center;
}
.tip {
    color: #FFFFFF;
    font-weight: bold;
    text-shadow: 0px -1px #103E5C;
}
            #bcid {
                width: 100%;
                position: absolute;
                top: 0px;
                bottom: 0px;
                text-align: center;
            }
            .tip {
                color: #FFFFFF;
                font-weight: bold;
                text-shadow: 0px -1px #103E5C;
            }
        </style>
    </head>
    <body style="background-color:#000000;">
unpackage/cache/wgt/H5EDA0853/plus/barcode_scan.html
@@ -1,81 +1,86 @@
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8"/>
        <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover"/>
        <meta name="HandheldFriendly" content="true"/>
        <meta name="MobileOptimized" content="320"/>
        <meta charset="utf-8" />
        <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover" />
        <meta name="HandheldFriendly" content="true" />
        <meta name="MobileOptimized" content="320" />
        <title>Hello H5+</title>
        <script type="text/javascript" src="../js/common.js"></script>
        <script type="text/javascript">
var ws=null,wo=null;
var scan=null;
// H5 plus事件处理
function plusReady(){
    // èŽ·å–çª—å£å¯¹è±¡
    ws=plus.webview.currentWebview();
    wo=ws.opener();
    // å¼€å§‹æ‰«æ
    ws.addEventListener('show', function(){
        scan=new plus.barcode.Barcode('bcid');
        scan.onmarked=onmarked;
        scan.start({conserve:true,filename:'_doc/barcode/'});
        createSubview();
    }, false);
    // æ˜¾ç¤ºé¡µé¢å¹¶å…³é—­ç­‰å¾…框
    ws.show('pop-in');
}
document.addEventListener('plusready', plusReady, false);
            var ws = null,
                wo = null;
            var scan = null;
            // H5 plus事件处理
            function plusReady() {
                // èŽ·å–çª—å£å¯¹è±¡
                ws = plus.webview.currentWebview();
                wo = ws.opener();
                // å¼€å§‹æ‰«æ
                ws.addEventListener('show', function() {
                    scan = new plus.barcode.Barcode('bcid');
                    scan.onmarked = onmarked;
                    scan.start({
                        conserve: true,
                        filename: '_doc/barcode/'
                    });
                    createSubview();
                }, false);
                // æ˜¾ç¤ºé¡µé¢å¹¶å…³é—­ç­‰å¾…框
                ws.show('pop-in');
            }
            document.addEventListener('plusready', plusReady, false);
// äºŒç»´ç æ‰«ææˆåŠŸ
function onmarked(type, result, file){
    switch(type){
        case plus.barcode.QR:
        type = 'QR';
        break;
        case plus.barcode.EAN13:
        type = 'EAN13';
        break;
        case plus.barcode.EAN8:
        type = 'EAN8';
        break;
        default:
        type = '其它'+type;
        break;
    }
    result = result.replace(/\r\n/g, '');
    wo.evalJS("scaned('"+ type +"','"+ result +"','"+ file +"');");
    back();
}
// åˆ›å»ºå­çª—口
function createSubview(){
    //
}
// ä»Žç›¸å†Œä¸­é€‰æ‹©äºŒç»´ç å›¾ç‰‡
function scanPicture(){
    plus.gallery.pick(function(path){
        plus.barcode.scan(path,onmarked,function(error){
            plus.nativeUI.alert('无法识别此图片');
        });
    }, function(err){
        console.log('Failed: '+err.message);
    });
}
            // äºŒç»´ç æ‰«ææˆåŠŸ
            function onmarked(type, result, file) {
                switch (type) {
                    case plus.barcode.QR:
                        type = 'QR';
                        break;
                    case plus.barcode.EAN13:
                        type = 'EAN13';
                        break;
                    case plus.barcode.EAN8:
                        type = 'EAN8';
                        break;
                    default:
                        type = '其它' + type;
                        break;
                }
                result = result.replace(/\r\n/g, '');
                wo.evalJS("scaned('" + type + "','" + result + "','" + file + "');");
                back();
            }
            // åˆ›å»ºå­çª—口
            function createSubview() {
                //
            }
            // ä»Žç›¸å†Œä¸­é€‰æ‹©äºŒç»´ç å›¾ç‰‡
            function scanPicture() {
                plus.gallery.pick(function(path) {
                    plus.barcode.scan(path, onmarked, function(error) {
                        plus.nativeUI.alert('无法识别此图片');
                    });
                }, function(err) {
                    console.log('Failed: ' + err.message);
                });
            }
        </script>
        <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8"/>
        <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
        <style type="text/css">
#bcid {
    width: 100%;
    position: absolute;
    top: 0px;
    bottom: 0px;
    text-align: center;
}
.tip {
    color: #FFFFFF;
    font-weight: bold;
    text-shadow: 0px -1px #103E5C;
}
            #bcid {
                width: 100%;
                position: absolute;
                top: 0px;
                bottom: 0px;
                text-align: center;
            }
            .tip {
                color: #FFFFFF;
                font-weight: bold;
                text-shadow: 0px -1px #103E5C;
            }
        </style>
    </head>
    <body style="background-color:#000000;">