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

来源:互联网 发布:mac有必要分区吗 编辑:程序博客网 时间:2024/06/06 07:15

去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})    }
原创粉丝点击