BBK微信扫码显示获取wskey首页html改版样式
BBK微信扫码显示获取wskey首页html改版样式-更新样式2
[scode type="yellow"]根据朋友改后的基础用文本编辑器修改了下自己喜欢的样式分享给大家,喜欢的点个赞👍支持下[/scode]
[scode type="green"]喜欢的可以自己替换修改下链接和图片地址
[/scode]
html改版后的样式1-更新适配
视频预览
html改版后的样式2-更新适配
修改内容
1.扫码网站
修改你的网站
href="https://你的扫码网址"
2.微信图片地址
src="/weix.png你的微信图片链接"
放在 /static/ 目录下同index.html一起即可
格式
/weix.png
3.网页跳转链接
替换https://内容
4.点击加QQ群
你的QQ群链接
[scode type="yellow"]可以去腾讯QQ群获取QQ群链接[/scode]
5.首页顶部logo
顶部logo放在 /static/ 目录下同index.html一起即可
格式
/weix.png
6.游览器选项卡小图标
favicon.ico格式的图片
[scode type="yellow"]可以网上搜转favicon.ico格式的网站转一下,放进 /static/ 目录下即可 [/scode]
index.html改版样式1-(京东扫码样式)直接登录-更新适配:
[hide]
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="utf-8">
<meta content="width=device-width,initial-scale=1,user-scalable=no" name="viewport" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-touch-fullscreen" content="yes" />
<meta name="format-detection" content="telephone=no,address=no" />
<meta name="apple-mobile-web-app-status-bar-style" content="white" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<title>电猫扫码登录</title>
<style>
body,
html {
margin: 0;
padding: 0;
}
.button {
display: inline-block;
border-radius: 25px;
background-color: #f4511e;
border: none;
color: #FFFFFF;
text-align: center;
font-size: 12px;
padding: 20px;
width: 150px;
height: 40px;
transition: all 0.5s;
cursor: pointer;
margin: 5px;
line-height:15%;
}
.button span {
cursor: pointer;
display: inline-block;
position: relative;
transition: 0.5s;
}
.button span:after {
content: '»';
position: absolute;
opacity: 0;
top: 0;
right: -20px;
transition: 0.5s;
}
.button:hover span {
padding-right: 25px;
}
.button:hover span:after {
opacity: 1;
right: 0;
}
.button001 {
display: inline-block;
padding: 20px 55px;
font-size: 14px;
cursor: pointer;
text-align: center;
text-decoration: none;
outline: none;
color: #fff;
background-color: #4CAF50;
border: none;
border-radius: 20px;
box-shadow: 0 5px #aaaaaa;
line-height:15%;
}
.button001:hover {background-color: #3e8e41}
.button001:active {
background-color: #3e8e41;
box-shadow: 0 3px #666;
transform: translateY(2px);
}
.gnav0{
display: flex;
width: 100%;
height: 100%;
border-bottom: 2px solid #eee;
justify-content: center;
align-items: center;
text-align: center;
}
.gnav{
width: 100%;
height: 50px;
border-bottom: 2px solid #eee;
text-align: center;
}
.gnav img{
height: 30px;
margin-top: 10px;
}
.gnav2{
display: flex;
width: 100%;
height: 100px;
border-bottom: 2px solid #eee;
justify-content: center;
align-items: center;
text-align: center;
}
.gnav2 img{
height: 100px;
}
.gnav3{
display: flex;
width: 100%;
height: 15px;
border-bottom: 2px solid #eee;
justify-content: center;
align-items: center;
text-align: center;
}
.gnav3 img{
height: 15px;
}
/* .qr {
display: flex;
justify-content: center;
align-items: center;
text-align: center;
position: fixed;
top: 0;
left: 0;
width: 100%;
inset: 0px;
height: 100%;
z-index: 1001;
} */
.qr{
position: relative;
justify-content: center;
align-items: center;
text-align: center;
min-width: 160px;
padding:20px;
inset: 0px;
}
/*
.qrcontainer {
position: relative;
width: 256px;
padding: 16px;
border-radius: 8px;
border: 1px solid rgb(109, 138, 136);
background-color: rgb(255, 255, 255);
box-shadow: rgb(0 0 0 / 20%) 0px 0px 7px 3px;
box-sizing: content-box;
} */
.qrcontainer{
position: relative;
width: 370px;
padding: 0px;
margin: 0 auto;
border-radius: 0px;
border: 1px solid ;
border-image: linear-gradient(to right, #ed4f78, #aae64d, #48bc2e) 1;
background-color: rgb(255, 255, 255);
box-shadow: rgb(0 0 0 / 20%) 0px 0px 7px 3px;
}
#tip {
display: none;
justify-content: center;
align-items: center;
position: absolute;
top: 47px;
left: 16px;
width: 160px;
height: 160px;
color: rgb(255, 255, 255);
background-color: rgba(0, 0, 0, 0.5);
transform: translateX(0%) translateY(68%);
}
.desTitle {
word-break: break-word;
padding-bottom: 10px;
}
.des {
word-break: break-word;
padding-top: 10px;
}
.gg{
word-break: break-word;
text-align: left;
margin-bottom: 1px;
background-color: #f0f0f0;
color: #444;
font-size: 13px;
padding: 5px 10px;
margin-top: 0px;
margin:5px 5px;
}
.gg span{
color: #ff6a00;
}
.gg0{
word-break: break-word;
text-align: left;
margin-bottom: 10px;
background-color: #f0f0f0;
color: #444;
font-size: 12px;
padding: 5px 10px;
}
.gg0 span{
color: #228B22;
font-weight: bold;
}
.gg1{
word-break: break-word;
text-align: left;
margin-bottom: 10px;
background-color: #f0f0f0;
color: #444;
font-size: 14px;
padding: 5px 10px;
display: flex;
align-items: center;
justify-content: center;
}
.gg1 span{
color: #ff6a00;
}
.ewm img{
width: 160px;
height: 160px;
align-items: center;
justify-content: center;
border: 2px solid ;
border-image: linear-gradient(to right, #4f9f30, #e6e44d, #fdbd4d) 1;
border-radius: 0%;
float: left;
margin: 20px 15px;
}
.ds{
background-color: #2d7f30;
color: #ffffff;
}
.ds2{
background-color: #c23243;
color: #ffffff;
}
</style>
</head>
<body>
<div class="gnav">
<img src="/000.png" alt="">
</div>
<div id="qr" class="qr">
<div class="qrcontainer">
<div class="gg0">
<center><span>扫码后不要退出本站也不要刷新本站,登录后请回来看CK</span></center>
</div>
<div class="desTitle">
<span id="tipt">loading...</span><p><a href="javascript:void(0)" id="refresh123" ><button class=" button001 ds2">手动刷新</button></a><a href="javascript:void(0)" id="jumpapp" ><button class=" button001 ds2">直接登录</button></a>
<div id="qrbox" class="ewm">
<img alt="" id="qrCode"/>
<a href="https://改你的网址">
<button class="button ds2"><span>点击重新扫码</span></button>
</a>
</div>
<div>
<button id="show-image-button" class="button ds2 wxewm"><span>扫码加微信群</span></button> <img id="my-image" src="/weix.png改你的图片目录名称" class="hidden image1" >
<style>
.hidden { display: none; }
.visible { display: block; }
.image1 {
margin-left:auto;
margin-right:auto;
width: 110px;
height: 110px;
border: 2px solid ;
border-image: linear-gradient(to right, #5d9ff0, #aae64d, #61a1ec) 1;
}
</style>
</div>
<div>
<a onclick="window.open('https://改你的网址')">
<button id="show-image-button " class="button ds"><span>联系web机器人</span></button>
</a>
<a href="https://改你的网址">
<button id="show-image-button " class="button ds"><span>点击加QQ群</span></button>
</a>
</div>
</div>
<div id="tip">
<h3>二维码已失效,请手动刷新</h3>
</div>
<div id="des" class="des"></div><!--tip-->
<div class="gg">
京东扫码使用方法:<br>
<span>方法二选一,登陆后返回这里看CK</span><br>
1.使用浏览器打开当前链接,点击<span>直接登录</span>可跳转京东。<br>
2.<span>截图二维码</span>,打开京东选择扫码从图库直接识别扫码。<br>
<font color="FireBrick">提示:</font><br>
1.扫码登录后看上方会出现一串英文字符串,请连标点符号一起复制并发送给机器人。<br>
2.如果上方出现“<span>您的账号存在风险,请验证后重新扫码</span>”,请点击蓝色文字并按照提示输入手机验证码,验证完成后重新打开网站<br>
</div>
</div>
</div>
</body>
<script type="text/javascript">
var loginUrl = '';
document.getElementById("des").style.display = 'none';
document.getElementById('refresh123').addEventListener('click', function () {
let timeStamp = new Date().getTime();
ajax({
url: '/d/getQR?force=1&t=' + timeStamp,
method: 'get',
success: function (data) {
if (data.code !== 200) {
if (data.errMsg) {
showTips(data.errMsg);
} else {
showTips("获取二维码出错了,请刷新页面");
}
} else {
if (data.data.qr && data.data.timeout) {
i = parseInt(data.data.timeout);
location.reload();
}
}
},
});
});
get_code();
let a={}, i=180;
function qrExpire() {
document.getElementById("tip").style.display = 'flex';
window.clearInterval(a.ib)
}
function showTips(tip) {
document.getElementById("des").style.display = 'flex';
document.getElementById("des").innerHTML = tip;
}
function get_code() {
let timeStamp = new Date().getTime();
ajax({
url: '/d/getQR?t=' + timeStamp,
method: 'get',
success: function (data) {
if (data.code !== 200) {
if (data.errorMsg) {
showTips(data.errorMsg);
loginUrl ='';
} else {
showTips("获取二维码出错了,请手动刷新页面");
loginUrl ='';
}
// location.reload();
} else {
if (data.data.qr && data.data.timeout) {
i = parseInt(data.data.timeout);
document.getElementById("qrCode").setAttribute("src",data.data.qr);
loginUrl = data.data.qrUrl;
document.getElementById("tipt").innerHTML = `有效期剩余${--i}秒`;
a.ib = setInterval(() => {
if (i <= 0) {
qrExpire();
// location.reload();
} else {
document.getElementById("tipt").innerHTML = `有效期剩余${--i}秒`;
}
}, 1000);
checkLogin();
}
}
},
});
}
function checkLogin() {
let timeStamp = new Date().getTime();
ajax({
url: '/d/status?t=' + timeStamp,
method: 'get',
success: function (data) {
console.log(JSON.stringify(data));
if (data.code == 500 || data.code == 202) {
qrExpire();
document.querySelector('#jumpapp').setAttribute('style','pointer-events: none;');
showTips(data.errorMsg);
} else if (data.code == 408) {
qrExpire();
document.querySelector('#jumpapp').setAttribute('style','pointer-events: none;');
// location.reload();
} else if (data.code == 410 && data.data) {
window.clearInterval(a.ib);
document.querySelector('#jumpapp').setAttribute('style','pointer-events: none;');
showTips(data.data.wskey?data.data.wskey:data.data.msg);
qrExpire();
} else {
setTimeout(checkLogin, 2000)
}
}
});
}
function ajax(options) {
var url = options.url;
var method = options.method;
var data = options.data;
var success = options.success;
var ajax = new XMLHttpRequest();
ajax.open(method, url);
if (method == 'post') {
ajax.setRequestHeader('Content-type', 'application/json');
}
ajax.send(JSON.stringify(data));
ajax.onreadystatechange = function () {
if (ajax.readyState == 4 && ajax.status == 200) {
success(JSON.parse(ajax.responseText));
}
};
}
document.getElementById('jumpapp').addEventListener('click', function () {
if (loginUrl) {
window.location.href = `openapp.jdmobile://virtual/ad?params=${encodeURI(
JSON.stringify({
category: 'jump',
des: 'ThirdPartyLogin',
action: 'to',
onekeylogin: 'return',
url: loginUrl,
authlogin_returnurl: 'weixin://',
browserlogin_fromurl: window.location.host,
})
)}`;
} else {
alert('还没加载好,请稍后重试');
}
});
function ajax(options) {
var url = options.url;
var method = options.method;
var data = options.data;
var success = options.success;
var ajax = new XMLHttpRequest();
ajax.open(method, url);
if (method == 'post') {
ajax.setRequestHeader('Content-type', 'application/json');
}
ajax.send(JSON.stringify(data));
ajax.onreadystatechange = function () {
if (ajax.readyState == 4 && ajax.status == 200) {
success(JSON.parse(ajax.responseText));
}
};
}
const showImageButton = document.getElementById("show-image-button");
const myImage = document.getElementById("my-image");
showImageButton.addEventListener("click", () => {
myImage.classList.toggle("visible");
});
</script>
</html>
[/hide]
index.html改版样式1-(微信扫码样式)更新适配:
[hide]
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="utf-8">
<meta content="width=device-width,initial-scale=1,user-scalable=no" name="viewport" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-touch-fullscreen" content="yes" />
<meta name="format-detection" content="telephone=no,address=no" />
<meta name="apple-mobile-web-app-status-bar-style" content="white" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<title>电猫扫码登录</title>
<style>
body,
html {
margin: 0;
padding: 0;
}
.button {
display: inline-block;
border-radius: 25px;
background-color: #f4511e;
border: none;
color: #FFFFFF;
text-align: center;
font-size: 12px;
padding: 20px;
width: 150px;
height: 40px;
transition: all 0.5s;
cursor: pointer;
margin: 5px;
line-height:15%;
}
.button span {
cursor: pointer;
display: inline-block;
position: relative;
transition: 0.5s;
}
.button span:after {
content: '»';
position: absolute;
opacity: 0;
top: 0;
right: -20px;
transition: 0.5s;
}
.button:hover span {
padding-right: 25px;
}
.button:hover span:after {
opacity: 1;
right: 0;
}
.button001 {
display: inline-block;
padding: 20px 150px;
font-size: 15px;
cursor: pointer;
text-align: center;
text-decoration: none;
outline: none;
color: #fff;
background-color: #4CAF50;
border: none;
border-radius: 15px;
box-shadow: 0 5px #aaaaaa;
line-height:15%;
}
.button001:hover {background-color: #3e8e41}
.button001:active {
background-color: #3e8e41;
box-shadow: 0 3px #666;
transform: translateY(2px);
}
.gnav0{
display: flex;
width: 100%;
height: 100%;
border-bottom: 2px solid #eee;
justify-content: center;
align-items: center;
text-align: center;
}
.gnav{
width: 100%;
height: 50px;
border-bottom: 2px solid #eee;
text-align: center;
}
.gnav img{
height: 30px;
margin-top: 10px;
}
.gnav2{
display: flex;
width: 100%;
height: 100px;
border-bottom: 2px solid #eee;
justify-content: center;
align-items: center;
text-align: center;
}
.gnav2 img{
height: 100px;
}
.gnav3{
display: flex;
width: 100%;
height: 15px;
border-bottom: 2px solid #eee;
justify-content: center;
align-items: center;
text-align: center;
}
.gnav3 img{
height: 15px;
}
/* .qr {
display: flex;
justify-content: center;
align-items: center;
text-align: center;
position: fixed;
top: 0;
left: 0;
width: 100%;
inset: 0px;
height: 100%;
z-index: 1001;
} */
.qr{
position: relative;
justify-content: center;
align-items: center;
text-align: center;
min-width: 160px;
padding:20px;
inset: 0px;
}
/*
.qrcontainer {
position: relative;
width: 256px;
padding: 16px;
border-radius: 8px;
border: 1px solid rgb(109, 138, 136);
background-color: rgb(255, 255, 255);
box-shadow: rgb(0 0 0 / 20%) 0px 0px 7px 3px;
box-sizing: content-box;
} */
.qrcontainer{
position: relative;
width: 370px;
padding: 0px;
margin: 0 auto;
border-radius: 0px;
border: 1px solid ;
border-image: linear-gradient(to right, #ed4f78, #aae64d, #48bc2e) 1;
background-color: rgb(255, 255, 255);
box-shadow: rgb(0 0 0 / 20%) 0px 0px 7px 3px;
}
#tip {
display: none;
justify-content: center;
align-items: center;
position: absolute;
top: 47px;
left: 16px;
width: 160px;
height: 160px;
color: rgb(255, 255, 255);
background-color: rgba(0, 0, 0, 0.5);
transform: translateX(0%) translateY(68%);
}
.desTitle {
word-break: break-word;
padding-bottom: 10px;
}
.des {
word-break: break-word;
padding-top: 10px;
}
.gg{
word-break: break-word;
text-align: left;
margin-bottom: 1px;
background-color: #f0f0f0;
color: #444;
font-size: 13px;
padding: 5px 10px;
margin-top: 0px;
margin:5px 5px;
}
.gg span{
color: #ff6a00;
}
.gg0{
word-break: break-word;
text-align: left;
margin-bottom: 10px;
background-color: #f0f0f0;
color: #444;
font-size: 12px;
padding: 5px 10px;
}
.gg0 span{
color: #228B22;
font-weight: bold;
}
.gg1{
word-break: break-word;
text-align: left;
margin-bottom: 10px;
background-color: #f0f0f0;
color: #444;
font-size: 14px;
padding: 5px 10px;
display: flex;
align-items: center;
justify-content: center;
}
.gg1 span{
color: #ff6a00;
}
.ewm img{
width: 160px;
height: 160px;
align-items: center;
justify-content: center;
border: 2px solid ;
border-image: linear-gradient(to right, #4f9f30, #e6e44d, #fdbd4d) 1;
border-radius: 0%;
float: left;
margin: 20px 15px;
}
.ds{
background-color: #2d7f30;
color: #ffffff;
}
.ds2{
background-color: #c23243;
color: #ffffff;
}
</style>
</head>
<body>
<div class="gnav">
<img src="/000.png" alt="">
</div>
<div id="qr" class="qr">
<div class="qrcontainer">
<div class="gg0">
<center><span>扫码后不要退出本站也不要刷新本站,登录后请回来看CK</span></center>
</div>
<div class="desTitle">
<span id="tipt">loading...</span><p><a href="javascript:void(0)" id="refresh123" ><button class=" button001 ds2">手动刷新</button></a>
<div id="qrbox" class="ewm">
<img alt="" id="qrCode"/>
<a href="https://改你的网址">
<button class="button ds2"><span>点击重新扫码</span></button>
</a>
</div>
<div>
<button id="show-image-button" class="button ds2 wxewm"><span>扫码加微信群</span></button> <img id="my-image" src="/weix.png改你的图片目录名称" class="hidden image1" >
<style>
.hidden { display: none; }
.visible { display: block; }
.image1 {
margin-left:auto;
margin-right:auto;
width: 110px;
height: 110px;
border: 2px solid ;
border-image: linear-gradient(to right, #5d9ff0, #aae64d, #61a1ec) 1;
}
</style>
</div>
<div>
<a onclick="window.open('https://改你的网址')">
<button id="show-image-button " class="button ds"><span>联系web机器人</span></button>
</a>
<a href="https://改你的网址">
<button id="show-image-button " class="button ds"><span>点击加QQ群</span></button>
</a>
</div>
</div>
<div id="tip">
<h3>二维码已失效,请手动刷新</h3>
</div>
<div id="des" class="des"></div><!--tip-->
<div class="gg">
提示:<br>
1,微信扫码登录后看上方会出现一串英文字符串,请连标点符号一起复制并发送给机器人。<span>(不要在微信里找,登陆后返回这里看CK)</span><br>
2,如果上方出现“<span>您的账号存在风险,请验证后重新扫码</span>”,请点击蓝色文字并按照提示输入手机验证码,验证完成后重新打开网站<br>
</div>
</div>
</div>
</body>
<script type="text/javascript">
document.getElementById("des").style.display = 'none';
document.getElementById('refresh123').addEventListener('click', function () {
let timeStamp = new Date().getTime();
ajax({
url: '/d/getQR?force=1&t=' + timeStamp,
method: 'get',
success: function (data) {
if (data.code !== 200) {
if (data.errMsg) {
showTips(data.errMsg);
} else {
showTips("获取二维码出错了,请刷新页面");
}
} else {
if (data.data.qr && data.data.timeout) {
i = parseInt(data.data.timeout);
location.reload();
}
}
},
});
});
get_code();
let a={}, i=180;
function qrExpire() {
document.getElementById("tip").style.display = 'flex';
window.clearInterval(a.ib)
}
function showTips(tip) {
document.getElementById("des").style.display = 'flex';
document.getElementById("des").innerHTML = tip;
}
function get_code() {
let timeStamp = new Date().getTime();
ajax({
url: '/d/getQR?t=' + timeStamp,
method: 'get',
success: function (data) {
if (data.code !== 200) {
if (data.errorMsg) {
showTips(data.data.wskey?data.data.wskey:data.data.msg);
} else {
showTips("获取二维码出错了,请手动刷新页面");
}
// location.reload();
} else {
if (data.data.qr && data.data.timeout) {
i = parseInt(data.data.timeout);
document.getElementById("qrCode").setAttribute("src",data.data.qr);
document.getElementById("tipt").innerHTML = `有效期剩余${--i}秒`;
a.ib = setInterval(() => {
if (i <= 0) {
qrExpire();
// location.reload();
} else {
document.getElementById("tipt").innerHTML = `有效期剩余${--i}秒`;
}
}, 1000);
checkLogin();
}
}
},
});
}
function checkLogin() {
let timeStamp = new Date().getTime();
ajax({
url: '/d/status?t=' + timeStamp,
method: 'get',
success: function (data) {
console.log(JSON.stringify(data));
if (data.code == 500 || data.code == 202) {
qrExpire();
showTips(data.errorMsg);
} else if (data.code == 408) {
qrExpire()
// location.reload();
} else if (data.code == 410 && data.data) {
window.clearInterval(a.ib)
showTips(data.data.wskey);
qrExpire();
} else {
setTimeout(checkLogin, 1000)
}
}
});
}
function ajax(options) {
var url = options.url;
var method = options.method;
var data = options.data;
var success = options.success;
var ajax = new XMLHttpRequest();
ajax.open(method, url);
if (method == 'post') {
ajax.setRequestHeader('Content-type', 'application/json');
}
ajax.send(JSON.stringify(data));
ajax.onreadystatechange = function () {
if (ajax.readyState == 4 && ajax.status == 200) {
success(JSON.parse(ajax.responseText));
}
};
}
const showImageButton = document.getElementById("show-image-button");
const myImage = document.getElementById("my-image");
showImageButton.addEventListener("click", () => {
myImage.classList.toggle("visible");
});
</script>
</html>
[/hide]
index.html改版样式2-(京东扫码样式)直接登录-更新适配:
[hide]
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="utf-8">
<meta content="width=device-width,initial-scale=1,user-scalable=no" name="viewport" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-touch-fullscreen" content="yes" />
<meta name="format-detection" content="telephone=no,address=no" />
<meta name="apple-mobile-web-app-status-bar-style" content="white" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<title>电猫扫码登录</title>
<style>
body,
html {
margin: 0;
padding: 0;
}
.button {
background-color: #1f6b23; /* Green */
border: none;
color: white;
padding: 12px 12px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 13px;
margin: 4px 2px;
-webkit-transition-duration: 0.4s; /* Safari */
transition-duration: 0.4s;
cursor: pointer;
line-height:15%;
}
.button1 {
background-color: white;
color: black;
border: 0px solid #2d7f30;
width: 120px;
height: 25px;
border-radius: 15px;
}
.button1:hover {
background-color: #4CAF50;
color: white;
width: 120px;
height: 25px;
border-radius: 15px;
}
.button0 {
background-color: #c23243; /* Green */
border: none;
color: white;
padding: 12px 12px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 13px;
margin: 4px 2px;
-webkit-transition-duration: 0.4s; /* Safari */
transition-duration: 0.4s;
cursor: pointer;
line-height:15%;
}
.button01 {
background-color: white;
color: black;
border: 0px solid #c23243;
width: 100px;
height: 17px;
border-radius: 15px;
}
.button01:hover {
background-color: #f84a5e;
color: white;
width: 100px;
height: 17px;
border-radius: 15px;
}
.button2 {
background-color: #c23243; /* Green */
border: none;
color: white;
padding: 12px 12px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 13px;
margin: 4px 2px;
-webkit-transition-duration: 0.4s; /* Safari */
transition-duration: 0.4s;
cursor: pointer;
line-height:15%;
}
.button20 {
background-color: white;
color: black;
border: 0px solid #c23243;
width: 180px;
height: 17px;
border-radius: 15px;
}
.button20:hover {
background-color: #f84a5e;
color: white;
width: 180px;
height: 17px;
border-radius: 15px;
}
.gnav0{
display: flex;
width: 100%;
height: 100%;
border-bottom: 2px solid #eee;
justify-content: center;
align-items: center;
text-align: center;
}
.gnav{
width: 100%;
height: 50px;
border-bottom: 2px solid #eee;
text-align: center;
}
.gnav img{
height: 30px;
margin-top: 10px;
}
.gnav2{
display: flex;
width: 100%;
height: 100px;
border-bottom: 2px solid #eee;
justify-content: center;
align-items: center;
text-align: center;
}
.gnav2 img{
height: 100px;
}
.gnav3{
display: flex;
width: 100%;
height: 15px;
border-bottom: 2px solid #eee;
justify-content: center;
align-items: center;
text-align: center;
}
.gnav3 img{
height: 15px;
}
/* .qr {
display: flex;
justify-content: center;
align-items: center;
text-align: center;
position: fixed;
top: 0;
left: 0;
width: 100%;
inset: 0px;
height: 100%;
z-index: 1001;
} */
.qr{
position: relative;
justify-content: center;
align-items: center;
text-align: center;
min-width: 160px;
padding:20px;
inset: 0px;
}
/*
.qrcontainer {
position: relative;
width: 256px;
padding: 16px;
border-radius: 8px;
border: 1px solid rgb(109, 138, 136);
background-color: rgb(255, 255, 255);
box-shadow: rgb(0 0 0 / 20%) 0px 0px 7px 3px;
box-sizing: content-box;
} */
.qrcontainer{
position: relative;
width: 256px;
padding: 16px;
margin: 0 auto;
border-radius: 8px;
border: 1px solid ;
border-image: linear-gradient(to right, #4cc538, #59bf57, #92d840) 1;
background-color: rgb(255, 255, 255);
box-shadow: rgb(0 0 0 / 20%) 0px 0px 7px 3px;
}
#tip {
display: none;
justify-content: center;
align-items: center;
position: absolute;
top: 47px;
left: 16px;
width: 150px;
height: 150px;
color: rgb(255, 255, 255);
background-color: rgba(0, 0, 0, 0.5);
transform: translateX(35%) translateY(75%);
}
.desTitle {
word-break: break-word;
padding-bottom: 10px;
}
.des {
word-break: break-word;
padding-top: 10px;
}
.gg{
word-break: break-word;
text-align: left;
margin-bottom: 10px;
background-color: #f0f0f0;
color: #444;
font-size: 14px;
padding: 5px 10px;
margin-top: 10px;
}
.gg span{
color: #ff6a00;
}
.gg0{
word-break: break-word;
text-align: left;
margin-bottom: 10px;
background-color: #f0f0f0;
color: #444;
font-size: 12px;
padding: 5px 10px;
}
.gg0 span{
color: #228B22;
font-weight: bold;
}
.gg1{
word-break: break-word;
text-align: left;
margin-bottom: 10px;
background-color: #f0f0f0;
color: #444;
font-size: 14px;
padding: 5px 10px;
display: flex;
align-items: center;
justify-content: center;
}
.gg1 span{
color: #ff6a00;
}
.ewm img{
width: 150px;
height: 150px;
align-items: center;
justify-content: center;
border: 2px solid ;
border-image: linear-gradient(to right, #ff8c5f, #fed33f, #e74a6b) 1;
border-radius: 0%;
}
.wxewm img{
width: 100px;
height: 100px;
align-items: center;
justify-content: center;
}
.ds{
background-color: #2d7f30;
color: #ffffff;
}
.ds2{
background-color: #c23243;
color: #ffffff;
}
</style>
</head>
<body>
<div class="gnav">
<img src="/000.png" alt="">
</div>
<div id="qr" class="qr">
<div class="qrcontainer">
<div class="gg0">
<center><span>扫码后不要退出本站也不要刷新本站,登录后请回来看CK</span></center>
</div>
<div class="desTitle">
<span id="tipt">loading...</span><p><a href="javascript:void(0)" id="refresh123" ><button class=" button0 button01 ds2">手动刷新</button></a><a href="javascript:void(0)" id="jumpapp" ><button class=" button0 button01 ds2">直接登录</button></a>
<div id="qrbox" class="ewm">
<img alt="" id="qrCode"/>
</div>
<div id="tip">
<h3>二维码已失效,请手动刷新</h3>
</div>
<div id="des" class="des"></div><!--tip-->
<div class="gg">
京东扫码使用方法:<br>
<span>方法二选一,登陆后返回这里看CK</span><br>
1.使用浏览器打开当前链接,点击<span>直接登录</span>可跳转京东。<br>
2.<span>截图二维码</span>,打开京东选择扫码从图库直接识别扫码。<br>
<font color="FireBrick">提示:</font><br>
1.扫码登录后看上方会出现一串英文字符串,请连标点符号一起复制并发送给机器人。<br>
2.如果上方出现“<span>您的账号存在风险,请验证后重新扫码</span>”,请点击蓝色文字并按照提示输入手机验证码,验证完成后重新打开网站<br>
</div>
<a href="https://你的网址">
<button class="button2 button20 ds2">点击重新打开网站扫码</button>
</a>
<div class="gnav2 wxewm" >
<img src="/weix.png" alt="">
</div>
<div class="gnav3" >
扫码加微信群
</div>
<div>
<a onclick="window.open('https://你的网址')">
<button class="button button1 ds">点击web机器人</button>
</a>
<a href="https://你的网址">
<button class="button button1 ds">点击加QQ群</button>
</a>
</div>
</div>
</div>
</body>
<script type="text/javascript">
var loginUrl = '';
document.getElementById("des").style.display = 'none';
document.getElementById('refresh123').addEventListener('click', function () {
let timeStamp = new Date().getTime();
ajax({
url: '/d/getQR?force=1&t=' + timeStamp,
method: 'get',
success: function (data) {
if (data.code !== 200) {
if (data.errMsg) {
showTips(data.errMsg);
} else {
showTips("获取二维码出错了,请刷新页面");
}
} else {
if (data.data.qr && data.data.timeout) {
i = parseInt(data.data.timeout);
location.reload();
}
}
},
});
});
get_code();
let a={}, i=180;
function qrExpire() {
document.getElementById("tip").style.display = 'flex';
window.clearInterval(a.ib)
}
function showTips(tip) {
document.getElementById("des").style.display = 'flex';
document.getElementById("des").innerHTML = tip;
}
function get_code() {
let timeStamp = new Date().getTime();
ajax({
url: '/d/getQR?t=' + timeStamp,
method: 'get',
success: function (data) {
if (data.code !== 200) {
if (data.errorMsg) {
showTips(data.errorMsg);
loginUrl ='';
} else {
showTips("获取二维码出错了,请手动刷新页面");
loginUrl ='';
}
// location.reload();
} else {
if (data.data.qr && data.data.timeout) {
i = parseInt(data.data.timeout);
document.getElementById("qrCode").setAttribute("src",data.data.qr);
loginUrl = data.data.qrUrl;
document.getElementById("tipt").innerHTML = `有效期剩余${--i}秒`;
a.ib = setInterval(() => {
if (i <= 0) {
qrExpire();
// location.reload();
} else {
document.getElementById("tipt").innerHTML = `有效期剩余${--i}秒`;
}
}, 1000);
checkLogin();
}
}
},
});
}
function checkLogin() {
let timeStamp = new Date().getTime();
ajax({
url: '/d/status?t=' + timeStamp,
method: 'get',
success: function (data) {
console.log(JSON.stringify(data));
if (data.code == 500 || data.code == 202) {
qrExpire();
document.querySelector('#jumpapp').setAttribute('style','pointer-events: none;');
showTips(data.errorMsg);
} else if (data.code == 408) {
qrExpire();
document.querySelector('#jumpapp').setAttribute('style','pointer-events: none;');
// location.reload();
} else if (data.code == 410 && data.data) {
window.clearInterval(a.ib);
document.querySelector('#jumpapp').setAttribute('style','pointer-events: none;');
showTips(data.data.wskey?data.data.wskey:data.data.msg);
qrExpire();
} else {
setTimeout(checkLogin, 2000)
}
}
});
}
function ajax(options) {
var url = options.url;
var method = options.method;
var data = options.data;
var success = options.success;
var ajax = new XMLHttpRequest();
ajax.open(method, url);
if (method == 'post') {
ajax.setRequestHeader('Content-type', 'application/json');
}
ajax.send(JSON.stringify(data));
ajax.onreadystatechange = function () {
if (ajax.readyState == 4 && ajax.status == 200) {
success(JSON.parse(ajax.responseText));
}
};
}
document.getElementById('jumpapp').addEventListener('click', function () {
if (loginUrl) {
window.location.href = `openapp.jdmobile://virtual/ad?params=${encodeURI(
JSON.stringify({
category: 'jump',
des: 'ThirdPartyLogin',
action: 'to',
onekeylogin: 'return',
url: loginUrl,
authlogin_returnurl: 'weixin://',
browserlogin_fromurl: window.location.host,
})
)}`;
} else {
alert('还没加载好,请稍后重试');
}
});
</script>
</html>
[/hide]
index.html改版样式2-微信扫码样式)更新适配:
[hide]
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="utf-8">
<meta content="width=device-width,initial-scale=1,user-scalable=no" name="viewport" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-touch-fullscreen" content="yes" />
<meta name="format-detection" content="telephone=no,address=no" />
<meta name="apple-mobile-web-app-status-bar-style" content="white" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<title>电猫扫码登录</title>
<style>
body,
html {
margin: 0;
padding: 0;
}
.button {
background-color: #1f6b23; /* Green */
border: none;
color: white;
padding: 12px 12px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 13px;
margin: 4px 2px;
-webkit-transition-duration: 0.4s; /* Safari */
transition-duration: 0.4s;
cursor: pointer;
line-height:15%;
}
.button1 {
background-color: white;
color: black;
border: 0px solid #2d7f30;
width: 120px;
height: 25px;
border-radius: 15px;
}
.button1:hover {
background-color: #4CAF50;
color: white;
width: 120px;
height: 25px;
border-radius: 15px;
}
.button0 {
background-color: #c23243; /* Green */
border: none;
color: white;
padding: 12px 12px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 13px;
margin: 4px 2px;
-webkit-transition-duration: 0.4s; /* Safari */
transition-duration: 0.4s;
cursor: pointer;
line-height:15%;
}
.button01 {
background-color: white;
color: black;
border: 0px solid #c23243;
width: 100px;
height: 17px;
border-radius: 15px;
}
.button01:hover {
background-color: #f84a5e;
color: white;
width: 100px;
height: 17px;
border-radius: 15px;
}
.button2 {
background-color: #c23243; /* Green */
border: none;
color: white;
padding: 12px 12px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 13px;
margin: 4px 2px;
-webkit-transition-duration: 0.4s; /* Safari */
transition-duration: 0.4s;
cursor: pointer;
line-height:15%;
}
.button20 {
background-color: white;
color: black;
border: 0px solid #c23243;
width: 180px;
height: 17px;
border-radius: 15px;
}
.button20:hover {
background-color: #f84a5e;
color: white;
width: 180px;
height: 17px;
border-radius: 15px;
}
.gnav0{
display: flex;
width: 100%;
height: 100%;
border-bottom: 2px solid #eee;
justify-content: center;
align-items: center;
text-align: center;
}
.gnav{
width: 100%;
height: 50px;
border-bottom: 2px solid #eee;
text-align: center;
}
.gnav img{
height: 30px;
margin-top: 10px;
}
.gnav2{
display: flex;
width: 100%;
height: 100px;
border-bottom: 2px solid #eee;
justify-content: center;
align-items: center;
text-align: center;
}
.gnav2 img{
height: 100px;
}
.gnav3{
display: flex;
width: 100%;
height: 15px;
border-bottom: 2px solid #eee;
justify-content: center;
align-items: center;
text-align: center;
}
.gnav3 img{
height: 15px;
}
/* .qr {
display: flex;
justify-content: center;
align-items: center;
text-align: center;
position: fixed;
top: 0;
left: 0;
width: 100%;
inset: 0px;
height: 100%;
z-index: 1001;
} */
.qr{
position: relative;
justify-content: center;
align-items: center;
text-align: center;
min-width: 160px;
padding:20px;
inset: 0px;
}
/*
.qrcontainer {
position: relative;
width: 256px;
padding: 16px;
border-radius: 8px;
border: 1px solid rgb(109, 138, 136);
background-color: rgb(255, 255, 255);
box-shadow: rgb(0 0 0 / 20%) 0px 0px 7px 3px;
box-sizing: content-box;
} */
.qrcontainer{
position: relative;
width: 256px;
padding: 16px;
margin: 0 auto;
border-radius: 8px;
border: 1px solid ;
border-image: linear-gradient(to right, #4cc538, #59bf57, #92d840) 1;
background-color: rgb(255, 255, 255);
box-shadow: rgb(0 0 0 / 20%) 0px 0px 7px 3px;
}
#tip {
display: none;
justify-content: center;
align-items: center;
position: absolute;
top: 47px;
left: 16px;
width: 150px;
height: 150px;
color: rgb(255, 255, 255);
background-color: rgba(0, 0, 0, 0.5);
transform: translateX(35%) translateY(75%);
}
.desTitle {
word-break: break-word;
padding-bottom: 10px;
}
.des {
word-break: break-word;
padding-top: 10px;
}
.gg{
word-break: break-word;
text-align: left;
margin-bottom: 10px;
background-color: #f0f0f0;
color: #444;
font-size: 14px;
padding: 5px 10px;
margin-top: 10px;
}
.gg span{
color: #ff6a00;
}
.gg0{
word-break: break-word;
text-align: left;
margin-bottom: 10px;
background-color: #f0f0f0;
color: #444;
font-size: 12px;
padding: 5px 10px;
}
.gg0 span{
color: #228B22;
font-weight: bold;
}
.gg1{
word-break: break-word;
text-align: left;
margin-bottom: 10px;
background-color: #f0f0f0;
color: #444;
font-size: 14px;
padding: 5px 10px;
display: flex;
align-items: center;
justify-content: center;
}
.gg1 span{
color: #ff6a00;
}
.ewm img{
width: 150px;
height: 150px;
align-items: center;
justify-content: center;
border: 2px solid ;
border-image: linear-gradient(to right, #ff8c5f, #fed33f, #e74a6b) 1;
border-radius: 0%;
}
.wxewm img{
width: 100px;
height: 100px;
align-items: center;
justify-content: center;
}
.ds{
background-color: #2d7f30;
color: #ffffff;
}
.ds2{
background-color: #c23243;
color: #ffffff;
}
</style>
</head>
<body>
<div class="gnav">
<img src="/000.png" alt="">
</div>
<div id="qr" class="qr">
<div class="qrcontainer">
<div class="gg0">
<center><span>扫码后不要退出本站也不要刷新本站,登录后请回来看CK</span></center>
</div>
<div class="desTitle">
<span id="tipt">loading...</span><p><a href="javascript:void(0)" id="refresh123" ><button class=" button0 button01 ds2">手动刷新</button></a>
<div id="qrbox" class="ewm">
<img alt="" id="qrCode"/>
</div>
<div id="tip">
<h3>二维码已失效,请手动刷新</h3>
</div>
<div id="des" class="des"></div><!--tip-->
<div class="gg">
提示:<br>
1,微信扫码登录后看上方会出现一串英文字符串,请连标点符号一起复制并发送给机器人。<span>(不要在微信里找,登陆后返回这里看CK)</span><br>
2,如果上方出现“<span>您的账号存在风险,请验证后重新扫码</span>”,请点击蓝色文字并按照提示输入手机验证码,验证完成后重新打开网站<br>
</div>
<a href="https://你的网址">
<button class="button2 button20 ds2">点击重新打开网站扫码</button>
</a>
<div class="gnav2 wxewm" >
<img src="/weix.png" alt="">
</div>
<div class="gnav3" >
扫码加微信群
</div>
<div>
<a onclick="window.open('https://你的网址')">
<button class="button button1 ds">点击web机器人</button>
</a>
<a href="https://你的网址">
<button class="button button1 ds">点击加QQ群</button>
</a>
</div>
</div>
</div>
</body>
<script type="text/javascript">
document.getElementById("des").style.display = 'none';
document.getElementById('refresh123').addEventListener('click', function () {
let timeStamp = new Date().getTime();
ajax({
url: '/d/getQR?force=1&t=' + timeStamp,
method: 'get',
success: function (data) {
if (data.code !== 200) {
if (data.errMsg) {
showTips(data.errMsg);
} else {
showTips("获取二维码出错了,请刷新页面");
}
} else {
if (data.data.qr && data.data.timeout) {
i = parseInt(data.data.timeout);
location.reload();
}
}
},
});
});
get_code();
let a={}, i=180;
function qrExpire() {
document.getElementById("tip").style.display = 'flex';
window.clearInterval(a.ib)
}
function showTips(tip) {
document.getElementById("des").style.display = 'flex';
document.getElementById("des").innerHTML = tip;
}
function get_code() {
let timeStamp = new Date().getTime();
ajax({
url: '/d/getQR?t=' + timeStamp,
method: 'get',
success: function (data) {
if (data.code !== 200) {
if (data.errorMsg) {
showTips(data.errorMsg);
} else {
showTips("获取二维码出错了,请手动刷新页面");
}
// location.reload();
} else {
if (data.data.qr && data.data.timeout) {
i = parseInt(data.data.timeout);
document.getElementById("qrCode").setAttribute("src",data.data.qr);
document.getElementById("tipt").innerHTML = `有效期剩余${--i}秒`;
a.ib = setInterval(() => {
if (i <= 0) {
qrExpire();
// location.reload();
} else {
document.getElementById("tipt").innerHTML = `有效期剩余${--i}秒`;
}
}, 1000);
checkLogin();
}
}
},
});
}
function checkLogin() {
let timeStamp = new Date().getTime();
ajax({
url: '/d/status?t=' + timeStamp,
method: 'get',
success: function (data) {
console.log(JSON.stringify(data));
if (data.code == 500 || data.code == 202) {
qrExpire();
showTips(data.errorMsg);
} else if (data.code == 408) {
qrExpire()
// location.reload();
} else if (data.code == 410 && data.data) {
window.clearInterval(a.ib)
showTips(data.data.wskey?data.data.wskey:data.data.msg);
qrExpire();
} else {
setTimeout(checkLogin, 1000)
}
}
});
}
function ajax(options) {
var url = options.url;
var method = options.method;
var data = options.data;
var success = options.success;
var ajax = new XMLHttpRequest();
ajax.open(method, url);
if (method == 'post') {
ajax.setRequestHeader('Content-type', 'application/json');
}
ajax.send(JSON.stringify(data));
ajax.onreadystatechange = function () {
if (ajax.readyState == 4 && ajax.status == 200) {
success(JSON.parse(ajax.responseText));
}
};
}
</script>
</html>
[/hide]
当前页面是本站的「Google AMP」版。查看和发表评论请点击:完整版 »