qrcode a样式,url情况,引导页,二维码

去a样式

 -webkit-tap-highlight-color: rgba(0, 0, 0, 0); /*去掉a、input和button点击时的蓝色外边框和灰色半透明背景*/

引导页(前景图)

style(type='text/css').
             *{margin: 0; padding: 0;}
             img{max-width: 100%; height: auto;}
         script(type='text/javascript').
             function loadHtml() {
                 const div = document.createElement('div');
                 div.id = 'weixin-tip'
                 div.innerHTML = '<p><img src="/images/live_weixin.png" alt="微信打开"/></p>'
                 document.body.appendChild(div)  //body标签之间加上div
             }
             function loadStyleText(cssText) {
                 const style = document.createElement('style')
                 style.rel = 'stylesheet'
                 style.type = 'text/css'
                 style.appendChild(document.createTextNode(cssText)) //链接下面的孩子
                 const head = document.getElementsByTagName('head')[0]
                 head.appendChild(style)

             }
             const cssText = "#weixin-tip{position: fixed; left:0; top:0; background: rgba(0,0,0,0.8); filter:alpha(opacity=80); width: 100%; height: 100%; z-index:100;} #weixin-tip p{text-align: right; padding:5%;}"

二维码扫描(监听事件)

.qrDiv.clearfix
        img.qrimg(src=`/qr?id=${datanum}` ).qrcode
    .num= `本车的车身识别码为:${datano}`
    .div_bt.clearfix
        span.imgleft
            a.btn(href='javascript:;' onclick='forward()')
                img.btimg(src='/images/left.jpg').qrcode
            a.btn(href='javascript:;' onclick='forward()')
                span(style='width: 400px;white-space: nowrap;') 下载宝聚通APP
        span.imgright
            a.btn(href='https://mp.weixin.qq.com/mp/profile_ext?action=home&__biz=MzI4ODIxMTE3Ng==&scene=110#wechat_redirect')
                img.btimg(src='/images/right.jpg').qrcode
            a.btn(href='https://mp.weixin.qq.com/mp/profile_ext?action=home&__biz=MzI4ODIxMTE3Ng==&scene=110#wechat_redirect')
                span(style='width: 400px;white-space: nowrap;') 关注宝聚通公众号
    img(src=`/images/bg01.jpg`).realQrcode

    $(document).on('touchstart', '.qrcode', function () {
            $('.realQrcode').attr('src', $(this).attr('src'));
            $('.realQrcode').css('z-index', '10');
        }).on('touchend', '.qrcode', function () {
            $('.realQrcode').css('z-index', '-1');
        }).on('touchcancel', '.qrcode', function () {
            $('.realQrcode').css('z-index', '-1');
        })

.qrcode {
    z-index: 2;
}

.realQrcode {
    width: 100%;
    position: fixed;
    opacity: 0.01;
    z-index: -1;
    left: 0;
    top: 0;
}

https://www.zhihu.com/question/35246592

id 是否存在判断,解密是否成功判断,服务器判断

try {
        let decryptoId
        //解密参数id
        var id = GetQueryString(req._parsedOriginalUrl.search, "id")
        if (!id) {
            res.render('error', {message: "非法操作", error: "非法操作"})
        } else {
            await deCrypto(id).then(decryptoData => decryptoId = decryptoData)
            if(decryptoId){
                res.render('index', {title: "验证码查询结果", datano: decryptoId, datanum: domian + req.url})
            }else{
                res.render('error', {message: "非法操作", error: "非法操作"})
            }

        }
    } catch (e) {
        res.render('error', {message: "系统异常", error: e})
    }
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值