123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
- <meta charset="utf-8">
- <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport">
- <meta content="yes" name="apple-mobile-web-app-capable">
- <meta content="black" name="apple-mobile-web-app-status-bar-style">
- <meta content="telephone=no" name="format-detection">
- <title>永天消防</title>
- <link rel="stylesheet" href="__PUBLIC__/wxapp/css/style1.css">
- </head>
- <style>
- .pages a,.pages span {
- display:inline-block;
- padding:2px 5px;
- margin:0 1px;
- border:1px solid #f0f0f0;
- -webkit-border-radius:3px;
- -moz-border-radius:3px;
- border-radius:3px;
- }
- .pages a,.pages li {
- display:inline-block;
- list-style: none;
- text-decoration:none; color:#58A0D3;
- }
- .pages a.first,.pages a.prev,.pages a.next,.pages a.end{
- margin:0;
- }
- .pages a:hover{
- border-color:#50A8E6;
- }
- .pages span.current{
- background:#50A8E6;
- color:#FFF;
- font-weight:700;
- border-color:#50A8E6;
- }
- a:link,a:visited,a:hover,a:active {
- text-decoration:none;
- }
- </style>
- <link rel="stylesheet" type="text/css" href="__PUBLIC__/wxapp/css/style1.css">
- <!--引入微信js-->
- <script src='https://res.wx.qq.com/open/js/jweixin-1.4.0.js'></script>
- <script type="text/javascript" src="__PUBLIC__/wxapp/js/jquery-1.11.3.min.js"></script>
- <body>
- <!--头部-->
- <div class="header"><a class="comblack" href="__MODULE__/Inspection/xj_index{$tokenurl}/companyid/{$companyid}"></a> 巡检</div>
- <!--内容-->
- <div>
- <volist name="res5" id="vo" >
- <div class="content">
- <div class="item-list">
- <p>{$vo.plan_name}
- <span>{$vo.completion}%</span>
- </p>
- </div>
- <div >
- <volist name="vo" id="vo1" >
- <volist name="vo1" id="vo2" >
- <if condition="$vo2.data3 eq 1 ">
- <a class="wxcode" name="{$vo.id}" title="{$vo2.id}">
- <div class="bl">
- <p>{$vo2.spot_name}<span>未巡检</span></p>
- </div>
- </a>
- <else />
- <a href="###" >
- <div class="bl">
- <p>{$vo2.spot_name}<span>已巡检</span></p>
- </div>
- </a>
- </if>
- </volist>
- </volist>
- </div>
- </div>
- </volist>
- </div>
- <!--底部-->
- <div class="footer"></div>
- </body>
- <script type="text/javascript">
- var wbr_id={$wbr_id};
- // var companyid={$companyid};
- function ajasscan(data,jh_id,dw_id){
- // alert(data);
- // alert(jh_id);
- // alert(dw_id);
- // alert(wbr_id);
- $.ajax({
- type: 'POST',
- url: "{:U('Scan/pdsflr')}",
- data: {data:data,jh_id:jh_id,dw_id:dw_id},
- dataType: 'json',
- success: function(res1){
- // alert(res1);
- if (res1==1){
- alert('巡检点位不匹配');
- } else {
- // alert(wbr_id);
- window.location.href ="{:U('Scan/from')}?jh_id="+res1.jh_id+"&dw_id="+res1.dw_id+"&wbr_id="+wbr_id;
- }
- }
- })
- }
- $(document).ready(function () {
- $(".item-list").click(function () {
- $(this).next().slideToggle();
- })
- })
- var jh_id;
- var dw_id;
- $('.wxcode').click(function(){
- jh_id=$(this).attr("name");
- dw_id=$(this).attr("title");
- })
- wx.config({
- // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
- debug: false,
- // 必填,公众号的唯一标识
- appId: "{$wxConfig.appId}",
- // 必填,生成签名的时间戳
- timestamp:"{$wxConfig.timestamp}",
- // 必填,生成签名的随机串
- nonceStr:"{$wxConfig.nonceStr}",
- // 必填,签名,见附录1
- signature:"{$wxConfig.signature}",
- // 必填,需要使用的JS接口列表,所有JS接口列表见附录2
- jsApiList : [ 'scanQRCode' ]
- });
- wx.error(function(res) {
- // alert("----------出错了-----------:" + res.errMsg);//这个地方的好处就是wx.config配置错误,会弹出窗口哪里错误,然后根据微信文档查询即可。
- });
- wx.ready(function() {
- wx.checkJsApi({
- jsApiList : ['scanQRCode'],
- success : function(res) {
- }
- });
- //点击按钮扫描二维码
- $('.wxcode').click(function(){
- // alert(1);
- wx.scanQRCode({
- needResult: 1, // 默认为0,扫描结果由微信处理,1则直接返回扫描结果,
- scanType: ["qrCode","barCode"], // 可以指定扫二维码还是一维码,默认二者都有
- success: function (res) {
- var result = res.resultStr; // 当needResult 为 1 时,扫码返回的结果
- // alert(result);
- // alert(jh_id);
- // alert(dw_id);
- ajasscan(result,jh_id,dw_id)
- }
- });
- })
- });
- </script>
- </html>
|