| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
- <meta name="apple-mobile-web-app-capable" content="yes">
- <meta name="apple-mobile-web-app-status-bar-style" content="black">
- <link rel="stylesheet" href="../layui/css/layui.mobile.css" />
- <link href="../css/commonstyle.css" rel="stylesheet" />
- <!--<link href="/css/mui.css" rel="stylesheet" />-->
- <script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js?1.1"></script>
- <title>郑州市第一人民医院</title>
- <style>
- html,body{
- height: 100%;
- }
- .mui-content .boxs{
- height: 215px;
- width: 215px;
- background: #158FEF;
- color: #fff;
- border-radius: 50%;
- color: #FFFFFF;
- font-size: 18px;
- margin: 65px auto;
- }
- .mui-content .boxs i.Scan{
- display: inline-block;margin-top: 40px;color:#FFFFFF; font-size: 85px;
- margin-bottom: 5px;
- }
- .logoWord{
- position: absolute;
- bottom: 25px;
- left: 0;
- right: 0;
- color: #666666;
- font-size: 14px;
- }
- .logoWord:after ,.logoWord:before{
- position: absolute;
- width: 32%;
- bottom: 6px;
- height: 1px;
- content: '';
- -webkit-transform: scaleY(.5);
- transform: scaleY(.5);
- background-color: #666666;
- }
- .logoWord:after{
- right: 0;
- left: 15px;
- }
- .logoWord:before {
- right: 15px;
- }
- </style>
- </head>
- <body>
- <div class="mui-content">
- <!--扫码框-->
- <div class="boxs" id="QRcode">
- <i class="iconfont Scan" style=""></i>
- <p >点击扫码下单</p>
- <!--<button class="mui-btn mui-btn-13A " style="font-size: 16px;margin-top" id="QRcode">快速扫码报修</button>-->
- <!--<button class="mui-btn " style="font-size: 16px;" id="HMoperation">手动录入报修</button>-->
- </div>
- <div class="logoWord">
- 郑州市第一人民医院
- </div>
- </div>
- <script src="../layui/layui.js?1.1"></script>
- <script src="../js/mui.min.js?1.1"></script>
- <script src="../js/zepto.js?1.1"></script>
- <script src="../js/jquery.min.js?1.1"></script>
- <script src="../Script/Common/huayi.config.js?1.1"></script>
- <script>
-
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "wechatapi/api/home/getinfo?fromUrl=" + location.href.split('#')[0], //自己填写请求地址
- data: {},
- dataType: 'json',
- success: function (result) {
- // console.log(result.data.appid)
- wx.config({
- // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
- debug: false,
- // 必填,公众号的唯一标识
- appId: result.data.appid,
- // 必填,生成签名的时间戳
- timestamp: "" + result.data.timestamp,
- // 必填,生成签名的随机串
- nonceStr: result.data.nonce,
- // 必填,签名,见附录1
- signature: result.data.signature,
- // 必填,需要使用的JS接口列表,
- jsApiList: ['scanQRCode']
- });
- }
- })
- wx.error(function (res) {
- // alert("出错了:" + res.errMsg); //这个地方的好处就是wx.config配置错误,会弹出窗口哪里错误,然后根据微信文档查询即可。
- });
- wx.ready(function () {
- // wx.checkJsApi({
- // jsApiList: ['checkJsApi'],
- // success: function(res) {
- //
- // }
- // });
- //点击按钮扫描二维码
- $('#QRcode').on('tap',scanQRCode);
- // $('.Scan').on('tap',scanQRCode);
- });
-
- //手动录入工单跳转
- $('#HMoperation').on('tap', function () {
- window.location.href = 'index.html'
- });
- function scanQRCode(){
- wx.scanQRCode({
- needResult: 1, // 默认为0,扫描结果由微信处理,1则直接返回扫描结果,
- scanType: ["qrCode"], // 可以指定扫二维码还是一维码,默认二者都有
- success: function (res) {
- var result = res.resultStr; // 当needResult 为 1 时,扫码返回的结果
- // window.location.href=result;
- //
- var b = result.split('id=');
- var type = b[1].split('&type=');
- if (type[1] == '2') {
- //window.location.href = 'EquipmentMessage.html?id=' + type[0] +'&r='+ Math.random();
- window.location.replace("EquipmentMessage.html?id="+ type[0]+"&r=" + Math.random());
- } else if (type[1] == '1') {
-
- window.location.href = 'choosePage.html?id=' + type[0] +'&r='+ Math.random();
- }
- },
- error: function (res) {
- var result = res.resultStr;
- }
- });
- }
-
- </script>
- </body>
- </html>
|