微信掃碼登錄自定義二維碼顯示信息

微信掃碼登錄,自定義二維碼顯示信息

<script src="http://res.wx.qq.com/connect/zh_CN/htmledition/js/wxLogin.js"></script>
<script>
    $(document).ready(function() {
        var obj = new WxLogin({
            id: "wx_login",
            appid: "wxa65628e289eadd24",
            scope: "snsapi_login",
            redirect_uri: encodeURIComponent("http://oa.onmycard.com.cn/index/login/test"),
            state: Math.ceil(Math.random() * 1000),
            style: "white",
            href: "https://..........xxx.css"
        });
    })
</script>

二維碼的css文件就是 href:" "裏面的文件,找到文件位置

.impowerBox .qrcode {width: 100px;}
.impowerBox .title {display: none;}
.impowerBox .info {width: 100px;}
.status_icon {display: none}
.impowerBox .status {text-align: center;}

qrcode 定義二維碼圖片格式
title: 定義二維碼頭部信息 ‘微信登錄’ 幾個字的格式
info: 定義二維碼下面的 '請使用微信掃描二維碼登錄 " 應用名稱 " ’ 這裏的格式;
status : 定義格式;

//根據需要改變,隱藏頭部信息或者隱藏底部的 “使用微信掃描二維碼登錄"應用名稱”"

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章