parent
52c85ea433
commit
9527253a53
8 changed files with 702 additions and 132 deletions
@ -0,0 +1,69 @@ |
|||||||
|
<?php |
||||||
|
|
||||||
|
include './functions.php'; |
||||||
|
|
||||||
|
function updateSession($cnn, $hash){ |
||||||
|
$res = db__getData($cnn, "account", "hash", $hash); |
||||||
|
$arr = $res[0]; |
||||||
|
foreach($arr as $key => $val){ |
||||||
|
$redis->hSet('session/dialog/'.$hash, $key, $val); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
$redis = new redis(); |
||||||
|
$redis->connect('redis',6379); |
||||||
|
|
||||||
|
|
||||||
|
$hash = $_REQUEST['hash']; |
||||||
|
$nickname = $_REQUEST['nickname']; |
||||||
|
$thash = $_REQUEST['thash']; |
||||||
|
|
||||||
|
if(!isset($hash)) die(); |
||||||
|
|
||||||
|
$cnn = db__connect(); |
||||||
|
if(!db__rowNum($cnn, "account", "hash", $hash)){ |
||||||
|
echo json_encode(array("code"=> 500, "message"=>"Illegal hash!!")); |
||||||
|
die(); |
||||||
|
} |
||||||
|
|
||||||
|
if(isset($nickname)){ |
||||||
|
|
||||||
|
db__pushData($cnn, "account", array("nickname"=>$nickname), array("hash"=>$hash)); |
||||||
|
updateSession($cnn, $hash); |
||||||
|
echo json_encode(array("code"=> 200, "message" => "Update successfully!")); |
||||||
|
die(); |
||||||
|
} |
||||||
|
|
||||||
|
if(!isset($thash)) die(); |
||||||
|
|
||||||
|
if($redis->exists('account/'.$thash)){ |
||||||
|
|
||||||
|
$arr = json_decode($redis->get('account/'.$thash), true); |
||||||
|
|
||||||
|
if($arr['isExist']){ |
||||||
|
echo json_encode(array("code"=> 500, "message"=>"This tel / email had been occupied!!")); |
||||||
|
die(); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
$info = array(); |
||||||
|
if($arr["tel"]){ |
||||||
|
$info = array("tel"=>$arr["tel"]); |
||||||
|
} |
||||||
|
if($arr["email"]){ |
||||||
|
$info = array("email"=>$arr["email"]); |
||||||
|
} |
||||||
|
if($arr["nickname"]){ |
||||||
|
$info = array("nickname"=>$arr["nickname"]); |
||||||
|
} |
||||||
|
|
||||||
|
db__pushData($cnn, "account", $info, array("hash"=>$hash)); |
||||||
|
updateSession($cnn, $hash); |
||||||
|
echo json_encode(array("code"=> 200, "message" => "Update successfully!")); |
||||||
|
|
||||||
|
}else{ |
||||||
|
echo json_encode(array("code"=> 500, "message"=>"Error!!")); |
||||||
|
} |
||||||
|
|
||||||
|
|
@ -1,48 +0,0 @@ |
|||||||
<!DOCTYPE html> |
|
||||||
<html lang="zh-CN"> |
|
||||||
<head> |
|
||||||
<meta charset="UTF-8"> |
|
||||||
<title>找回密码</title> |
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> |
|
||||||
<meta name="Keywords" content="网站关键词"> |
|
||||||
<meta name="Description" content="网站介绍"> |
|
||||||
<link rel="stylesheet" href="./css/base.css"> |
|
||||||
<link rel="stylesheet" href="./css/iconfont.css"> |
|
||||||
<link rel="stylesheet" href="./css/reg.css"> |
|
||||||
</head> |
|
||||||
<body> |
|
||||||
<div id="ajax-hook"></div> |
|
||||||
<div class="wrap"> |
|
||||||
<div class="wpn"> |
|
||||||
<div class="form-data find_password"> |
|
||||||
<h4>找回密码</h4> |
|
||||||
<p class="right_now">已有账号,<a href="./login.html">马上登录</a></p> |
|
||||||
<p class="p-input pos"> |
|
||||||
<label for="pc_tel">手机号/邮箱</label> |
|
||||||
<input type="text" id="pc_tel"> |
|
||||||
<span class="tel-warn pc_tel-err hide"><em>最多五个字</em><i class="icon-warn"></i></span> |
|
||||||
</p> |
|
||||||
<p class="p-input pos pc-very"> |
|
||||||
<label for="veri-code">输入验证码</label> |
|
||||||
<input type="number" id="veri-code"> |
|
||||||
<a href="javascript:;" class="send">发送验证码</a> |
|
||||||
<span class="time hide"><em>120</em>s</span> |
|
||||||
<span class="tel-warn error hide"><em>验证码错误,请重新输入</em><i class="icon-warn"></i></span> |
|
||||||
</p> |
|
||||||
<p class="p-input pos code pc-code"> |
|
||||||
<label for="veri">请输入验证码</label> |
|
||||||
<input type="text" id="veri"> |
|
||||||
<img src=""> |
|
||||||
<span class="tel-warn img-err hide"><em>最多五个字</em><i class="icon-warn"></i></span> |
|
||||||
<!-- <a href="javascript:;">换一换</a> --> |
|
||||||
</p> |
|
||||||
<button class="lang-btn next">下一步</button> |
|
||||||
<p class="right">Powered by © 2018</p> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
<script src="./js/jquery.js"></script> |
|
||||||
<script src="./js/agree.js"></script> |
|
||||||
<script src="./js/reset.js"></script> |
|
||||||
</body> |
|
||||||
</html> |
|
@ -1,100 +1,48 @@ |
|||||||
<!DOCTYPE html> |
<!DOCTYPE html> |
||||||
<html lang="zh-CN"> |
<html> |
||||||
<head> |
<head> |
||||||
<meta charset="UTF-8"> |
<meta charset="UTF-8"> |
||||||
<title>Ushio Login</title> |
<title>Ushio Login</title> |
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> |
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> |
||||||
<meta name="Keywords" content="Login,ushio,iotcat,呓喵酱,yimian"> |
<meta name="Keywords" content="Login,ushio,iotcat,呓喵酱,yimian"> |
||||||
<meta name="Description" content="Login module for Ushio ecosystem."> |
<meta name="Description" content="Login module for Ushio ecosystem."> |
||||||
<link rel="stylesheet" type="text/css" href="css/normalize.css" /> |
|
||||||
<link rel="stylesheet" type="text/css" href="css/background.css"> |
|
||||||
<style type="text/css"> |
|
||||||
#site-landing { |
|
||||||
position:relative; |
|
||||||
height: 100%; |
|
||||||
width: 100%; |
|
||||||
background-image: linear-gradient(to top, #30cfd0 0%, #330867 100%); |
|
||||||
} |
|
||||||
html,body{ |
|
||||||
overflow: hidden; |
|
||||||
height: 100%; |
|
||||||
} |
|
||||||
</style> |
|
||||||
<link rel="stylesheet" href="./css/base.css"> |
|
||||||
<link rel="stylesheet" href="./css/iconfont.css"> |
|
||||||
<link rel="stylesheet" href="./css/reg.css"> |
|
||||||
<script type="text/javascript">block_aplayer = true;</script> |
<script type="text/javascript">block_aplayer = true;</script> |
||||||
<script src="https://cdn.yimian.xyz/ushio-js/ushio-head.min.js"></script> |
<script src="https://cdn.yimian.xyz/ushio-js/ushio-head.min.js"></script> |
||||||
|
|
||||||
</head> |
</head> |
||||||
<body> |
<body> |
||||||
|
<script type="text/javascript" src="https://cdn.yimian.xyz/ushio-js/ushio-footer.min.js"></script> |
||||||
<div id="ajax-hook"></div> |
<script> |
||||||
<div class="wrap"><div id="site-landing"></div> |
if(page.params.hasOwnProperty('from')){ |
||||||
<div class="wpn"> |
cookie.set('_from', encodeURI(page.params.from)); |
||||||
<div class="form-data pos" id="box" > |
} |
||||||
<a href=""><img src="./img/logo.png" class="head-logo"></a> |
session.onload(function(){ |
||||||
<div class="change-login"> |
if(session.get('group') == 'anonymous'){ |
||||||
<p class="account_number on">邮箱登录</p> |
if(page.params.hasOwnProperty('require')){ |
||||||
<p class="message">短信登录</p> |
window.location.href='/login.html?require='+page.params.require; |
||||||
</div> |
}else{ |
||||||
<div class="form1"> |
window.location.href='/login.html'; |
||||||
<p class="p-input pos"> |
} |
||||||
<label for="num" id="lab_num">邮箱</label> |
}else{ |
||||||
<input type="text" id="num"> |
if(!page.params.hasOwnProperty('require')){ |
||||||
<input type="number" id="num2" class="hide"> |
window.location.href="/usr.html"; |
||||||
<span class="tel-warn num-err hide"><em>账号或密码错误,请重新输入</em><i class="icon-warn"></i></span> |
return; |
||||||
</p> |
} |
||||||
<p class="p-input pos"> |
if(page.params.require == 'tel' || page.params.require == 'email'){ |
||||||
<label for="veri-code">输入验证码</label> |
window.location.href = "/update.html?require="+page.params.require; |
||||||
<input type="number" id="veri-code"> |
} |
||||||
<a href="javascript:;" class="send">发送验证码</a> |
if(page.params.require == 'nickname'){ |
||||||
<span class="time hide"><em>120</em>s</span> |
window.location.href = "/setNickname.html"; |
||||||
<span class="tel-warn error hide">验证码错误</span> |
} |
||||||
</p> |
window.location.href='/usr.html'; |
||||||
</div> |
|
||||||
<div class="reg_checkboxline pos"> |
|
||||||
<span class="z"><i class="icon-ok-sign boxcol" nullmsg="请同意!"></i></span> |
|
||||||
<input type="hidden" id="agree" name="agree" value="1"> |
|
||||||
<div class="Validform_checktip"></div> |
|
||||||
<p>我已阅读并接受 <a id="ag" href="#">《Ushio用户协议说明》</a></p> |
|
||||||
<script>$('#ag').click(function(){tips.info({ |
|
||||||
timeout: 150000, |
|
||||||
message: '1. 为了更好地提供服务,本站需要您提供一个联系方式。本站承诺不会将此联系方式透露给任何其它客体,此联系方式仅用作本站通知您的一种方式。<br>2. 请您在使用本站服务时,务必遵守本地法律法规。对于类似原因引起的纠纷,本站概不负责。<br>3. 请勿将账户给与其它人使用,一经发现本站有权停止此账户在本站的所有权限,并将相关行为人拉入黑名单。' |
|
||||||
})})</script> |
|
||||||
|
|
||||||
</div> |
|
||||||
<!--<div class="r-forget cl"> |
|
||||||
<a href="./reg.html" class="z">账号注册</a> |
|
||||||
<a href="./getpass.html" class="y">忘记密码</a> |
|
||||||
</div>--> |
|
||||||
|
|
||||||
<button class="lang-btn off log-btn">登录/注册</button> |
|
||||||
<!--<div class="third-party"> |
|
||||||
<a href="#" class="log-qq icon-qq-round"></a> |
|
||||||
<a href="#" class="log-qq icon-weixin"></a> |
|
||||||
<a href="#" class="log-qq icon-sina1"></a> |
|
||||||
</div>--> |
|
||||||
<p class="right">© 2018-<script type="text/javascript">document.write(new Date().getFullYear())</script> <a href="https://iotcat.me">iotcat</a> | Powered by <a href="https://ushio.cool">Ushio</a></p> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
<script type="text/javascript"> |
|
||||||
/* 窄屏缩小框 */ |
|
||||||
$(function(){ |
|
||||||
if($(window).width() < 400){ |
|
||||||
document.body.style.zoom="0.8"; |
|
||||||
$('#site-landing').css('height', '150%'); |
|
||||||
} |
} |
||||||
}); |
}); |
||||||
</script> |
</script> |
||||||
<script type="text/javascript" src="js/polygonizr.min.js"></script> |
<script type="text/javascript" src="js/polygonizr.min.js"></script> |
||||||
<script type="text/javascript">$('#site-landing').polygonizr();</script> |
<link rel="stylesheet" href="./css/base.css"> |
||||||
<script src="./js/agree.js"></script> |
<link rel="stylesheet" href="./css/iconfont.css"> |
||||||
<script src="./js/login.js"></script> |
<link rel="stylesheet" href="./css/reg.css"> |
||||||
<script type="text/javascript" src="https://cdn.yimian.xyz/ushio-js/ushio-footer.min.js"></script> |
<link rel="stylesheet" type="text/css" href="css/normalize.css" /> |
||||||
<script>if(page.params.hasOwnProperty('from')){ |
<link rel="stylesheet" type="text/css" href="css/background.css"> |
||||||
cookie.set('_from', encodeURI(page.params.from)); |
|
||||||
}</script> |
|
||||||
</body> |
</body> |
||||||
</html> |
</html> |
@ -0,0 +1,274 @@ |
|||||||
|
$(function(){ |
||||||
|
var tab = 'account_number'; |
||||||
|
var usr = ''; |
||||||
|
var code = ''; |
||||||
|
var hash = ''; |
||||||
|
var timer; |
||||||
|
// 选项卡切换
|
||||||
|
$(".account_number").click(function () { |
||||||
|
$('.tel-warn').addClass('hide'); |
||||||
|
tab = $(this).attr('class').split(' ')[0]; |
||||||
|
checkBtn(); |
||||||
|
$(this).addClass("on"); |
||||||
|
$(".message").removeClass("on"); |
||||||
|
$("#num2").addClass("hide"); |
||||||
|
$("#num").removeClass("hide"); |
||||||
|
$("#lab_num").html('邮箱'); |
||||||
|
}); |
||||||
|
// 选项卡切换
|
||||||
|
$(".message").click(function () { |
||||||
|
$('.tel-warn').addClass('hide'); |
||||||
|
tab = $(this).attr('class').split(' ')[0]; |
||||||
|
checkBtn(); |
||||||
|
$(this).addClass("on"); |
||||||
|
$(".account_number").removeClass("on"); |
||||||
|
$("#num").addClass("hide"); |
||||||
|
$("#num2").removeClass("hide"); |
||||||
|
$("#lab_num").html('手机号'); |
||||||
|
|
||||||
|
}); |
||||||
|
|
||||||
|
if(page.params.hasOwnProperty('require')){ |
||||||
|
if(page.params.require == 'tel'){ |
||||||
|
$('.tel-warn').addClass('hide'); |
||||||
|
tab = $(".message").attr('class').split(' ')[0]; |
||||||
|
checkBtn(); |
||||||
|
$(".message").addClass("on"); |
||||||
|
$(".account_number").removeClass("on"); |
||||||
|
$("#num").addClass("hide"); |
||||||
|
$("#num2").removeClass("hide"); |
||||||
|
$("#lab_num").html('手机号'); |
||||||
|
$('.change-login').hide(); |
||||||
|
} |
||||||
|
session.onload(function(){ |
||||||
|
if(!session.get('hash')){ |
||||||
|
window.location.href = '/login.html?require='+page.params.require; |
||||||
|
} |
||||||
|
}); |
||||||
|
}else{ |
||||||
|
session.onload(function(){ |
||||||
|
if(!session.get('hash')){ |
||||||
|
window.location.href = '/login.html'; |
||||||
|
} |
||||||
|
}); |
||||||
|
} |
||||||
|
$('.change-login').hide(); |
||||||
|
|
||||||
|
$('#num').keyup(function(event) { |
||||||
|
$('.tel-warn').addClass('hide'); |
||||||
|
checkBtn(); |
||||||
|
}); |
||||||
|
|
||||||
|
$('#pass').keyup(function(event) { |
||||||
|
$('.tel-warn').addClass('hide'); |
||||||
|
checkBtn(); |
||||||
|
}); |
||||||
|
|
||||||
|
$('#veri').keyup(function(event) { |
||||||
|
$('.tel-warn').addClass('hide'); |
||||||
|
checkBtn(); |
||||||
|
}); |
||||||
|
|
||||||
|
$('#num2').keyup(function(event) { |
||||||
|
$('.tel-warn').addClass('hide'); |
||||||
|
checkBtn(); |
||||||
|
}); |
||||||
|
|
||||||
|
$('#veri-code').keyup(function(event) { |
||||||
|
$('.tel-warn').addClass('hide'); |
||||||
|
checkCode($('#veri-code').val()); |
||||||
|
}); |
||||||
|
|
||||||
|
// 按钮是否可点击
|
||||||
|
function checkBtn() |
||||||
|
{ |
||||||
|
|
||||||
|
$(".log-btn").off('click').addClass("off"); |
||||||
|
} |
||||||
|
|
||||||
|
$('.z').click(function(){ |
||||||
|
|
||||||
|
if(($('#agree').val() == "1") && hash.length){ |
||||||
|
sendBtn(); |
||||||
|
}else{ |
||||||
|
checkBtn(); |
||||||
|
} |
||||||
|
}); |
||||||
|
|
||||||
|
|
||||||
|
function checkTo(phone){ |
||||||
|
if(tab == 'account_number'){ |
||||||
|
|
||||||
|
var status = true; |
||||||
|
if (phone == '') { |
||||||
|
$('.num-err').removeClass('hide').find("em").text('请输入邮箱'); |
||||||
|
return false; |
||||||
|
} |
||||||
|
var param = /^([A-Za-z0-9_\-\.\u4e00-\u9fa5])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,8})$/; |
||||||
|
if (!param.test(phone)) { |
||||||
|
// globalTip({'msg':'手机号不合法,请重新输入','setTime':3});
|
||||||
|
$('.num-err').removeClass('hide'); |
||||||
|
$('.num-err').text('邮箱不合法,请重新输入'); |
||||||
|
return false; |
||||||
|
} |
||||||
|
}else{ |
||||||
|
|
||||||
|
|
||||||
|
var status = true; |
||||||
|
if (phone == '') { |
||||||
|
$('.num-err').removeClass('hide').find("em").text('请输入手机号'); |
||||||
|
return false; |
||||||
|
} |
||||||
|
var param = /^1[34578]\d{9}$/; |
||||||
|
if (!param.test(phone)) { |
||||||
|
// globalTip({'msg':'手机号不合法,请重新输入','setTime':3});
|
||||||
|
$('.num-err').removeClass('hide'); |
||||||
|
$('.num-err').text('手机号不合法,请重新输入'); |
||||||
|
return false; |
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
usr = phone; |
||||||
|
return status; |
||||||
|
} |
||||||
|
|
||||||
|
function checkCode(pCode){ |
||||||
|
checkBtn(); |
||||||
|
if (pCode == '') { |
||||||
|
$('.error').removeClass('hide').text('请输入验证码'); |
||||||
|
return false; |
||||||
|
} else if(pCode.length ==6){ |
||||||
|
$('.error').addClass('hide'); |
||||||
|
|
||||||
|
code = pCode; |
||||||
|
$.get('/api/verCode.php?type='+((tab == 'account_number')?'email':'tel')+'&usr='+usr+'&code='+code, function(data){ |
||||||
|
data = JSON.parse(data); |
||||||
|
if(data.code == 200){ |
||||||
|
|
||||||
|
hash = data.hash; |
||||||
|
var oTime = $(".form-data .time"), |
||||||
|
oSend = $(".form-data .send"), |
||||||
|
oEm = $(".form-data .time em"); |
||||||
|
clearInterval(timer); |
||||||
|
oSend.text("验证成功"); |
||||||
|
oSend.css("color", 'green'); |
||||||
|
oSend.show(); |
||||||
|
oEm.text("120"); |
||||||
|
oTime.addClass("hide"); |
||||||
|
sendBtn(); |
||||||
|
$('.error').addClass('hide') |
||||||
|
}else{ |
||||||
|
$('.error').removeClass('hide').text('验证码错误!'); |
||||||
|
checkBtn(); |
||||||
|
} |
||||||
|
|
||||||
|
}); |
||||||
|
|
||||||
|
return true; |
||||||
|
}else{ |
||||||
|
return false; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 登录点击事件
|
||||||
|
function sendBtn(){ |
||||||
|
|
||||||
|
|
||||||
|
if(!(($('#agree').val() == "1") && hash.length)) return; |
||||||
|
|
||||||
|
$(".log-btn").removeClass("off"); |
||||||
|
$('.log-btn').click(function(){ |
||||||
|
session.onload(function(){ |
||||||
|
$.get('/api/checkUpdate.php?thash='+hash+'&hash='session.get('hash'), function(data){ |
||||||
|
data = JSON.parse(data); |
||||||
|
if(data.code == 200){ |
||||||
|
tips.success({message: '更新成功!'}); |
||||||
|
var to = 'https://www.eee.dog/'; |
||||||
|
if(cookie.get('_from')){ |
||||||
|
to = decodeURI(cookie.get('_from')); |
||||||
|
cookie.del('_from'); |
||||||
|
} |
||||||
|
window.location.href=to; |
||||||
|
}else{ |
||||||
|
tips.warning({message: data.message}); |
||||||
|
setTimeout(()=>{window.location.reload()}, 2000); |
||||||
|
} |
||||||
|
}); |
||||||
|
}); |
||||||
|
}); |
||||||
|
} |
||||||
|
|
||||||
|
// 登录的回车事件
|
||||||
|
$(window).keydown(function(event) { |
||||||
|
if (event.keyCode == 13) { |
||||||
|
$('.log-btn').trigger('click'); |
||||||
|
} |
||||||
|
}); |
||||||
|
|
||||||
|
|
||||||
|
$(".form-data").delegate(".send","click",function () { |
||||||
|
|
||||||
|
if(tab == 'account_number'){ |
||||||
|
var to = $.trim($('#num').val()); |
||||||
|
}else{ |
||||||
|
var to = $.trim($('#num2').val()); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
if (checkTo(to)) { |
||||||
|
var oTime = $(".form-data .time"), |
||||||
|
oSend = $(".form-data .send"), |
||||||
|
num = parseInt(oTime.text()), |
||||||
|
oEm = $(".form-data .time em"); |
||||||
|
$(this).hide(); |
||||||
|
oTime.removeClass("hide"); |
||||||
|
timer = setInterval(function () { |
||||||
|
var num2 = num-=1; |
||||||
|
oEm.text(num2); |
||||||
|
if(num2==0){ |
||||||
|
clearInterval(timer); |
||||||
|
oSend.css("color", 'red'); |
||||||
|
oSend.show(); |
||||||
|
oEm.text("120"); |
||||||
|
oTime.addClass("hide"); |
||||||
|
} |
||||||
|
},1000); |
||||||
|
|
||||||
|
$.ajax({ |
||||||
|
url: '/api/'+((tab == 'account_number')?'email':'sms')+'Code.php', |
||||||
|
type: 'get', |
||||||
|
dataType: 'json', |
||||||
|
async: true, |
||||||
|
data: {email: to, tel: to}, |
||||||
|
success:function(data){ |
||||||
|
data = JSON.parse(data); |
||||||
|
if (data.code == '200') { |
||||||
|
|
||||||
|
} else { |
||||||
|
clearInterval(timer); |
||||||
|
oSend.text("重新发送验证码"); |
||||||
|
oSend.css("color", 'red'); |
||||||
|
oSend.show(); |
||||||
|
oEm.text("120"); |
||||||
|
oTime.addClass("hide"); |
||||||
|
} |
||||||
|
}, |
||||||
|
error:function(){ |
||||||
|
clearInterval(timer); |
||||||
|
oSend.text("重新发送验证码"); |
||||||
|
oSend.css("color", 'red'); |
||||||
|
oSend.show(); |
||||||
|
oEm.text("120"); |
||||||
|
oTime.addClass("hide"); |
||||||
|
} |
||||||
|
}); |
||||||
|
|
||||||
|
} |
||||||
|
}); |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}); |
@ -0,0 +1,101 @@ |
|||||||
|
<!DOCTYPE html> |
||||||
|
<html lang="zh-CN"> |
||||||
|
<head> |
||||||
|
<meta charset="UTF-8"> |
||||||
|
<title>Ushio Login</title> |
||||||
|
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> |
||||||
|
<meta name="Keywords" content="Login,ushio,iotcat,呓喵酱,yimian"> |
||||||
|
<meta name="Description" content="Login module for Ushio ecosystem."> |
||||||
|
<link rel="stylesheet" type="text/css" href="css/normalize.css" /> |
||||||
|
<link rel="stylesheet" type="text/css" href="css/background.css"> |
||||||
|
<style type="text/css"> |
||||||
|
#site-landing { |
||||||
|
position:relative; |
||||||
|
height: 100%; |
||||||
|
width: 100%; |
||||||
|
background-image: linear-gradient(to top, #30cfd0 0%, #330867 100%); |
||||||
|
} |
||||||
|
html,body{ |
||||||
|
overflow: hidden; |
||||||
|
height: 100%; |
||||||
|
} |
||||||
|
</style> |
||||||
|
<link rel="stylesheet" href="./css/base.css"> |
||||||
|
<link rel="stylesheet" href="./css/iconfont.css"> |
||||||
|
<link rel="stylesheet" href="./css/reg.css"> |
||||||
|
<script type="text/javascript">block_aplayer = true;</script> |
||||||
|
<script src="https://cdn.yimian.xyz/ushio-js/ushio-head.min.js"></script> |
||||||
|
|
||||||
|
</head> |
||||||
|
<body> |
||||||
|
|
||||||
|
<div id="ajax-hook"></div> |
||||||
|
<div class="wrap"><div id="site-landing"></div> |
||||||
|
<div class="wpn"> |
||||||
|
<div class="form-data pos" id="box" > |
||||||
|
<a href=""><img src="./img/logo.png" class="head-logo"></a> |
||||||
|
<div class="change-login"> |
||||||
|
<p class="account_number on">邮箱登录</p> |
||||||
|
<p class="message">短信登录</p> |
||||||
|
</div> |
||||||
|
<div class="form1"> |
||||||
|
<p class="p-input pos"> |
||||||
|
<label for="num" id="lab_num">邮箱</label> |
||||||
|
<input type="text" id="num"> |
||||||
|
<input type="number" id="num2" class="hide"> |
||||||
|
<span class="tel-warn num-err hide"><em>账号或密码错误,请重新输入</em><i class="icon-warn"></i></span> |
||||||
|
</p> |
||||||
|
<p class="p-input pos"> |
||||||
|
<label for="veri-code">输入验证码</label> |
||||||
|
<input type="number" id="veri-code"> |
||||||
|
<a href="javascript:;" class="send">发送验证码</a> |
||||||
|
<span class="time hide"><em>120</em>s</span> |
||||||
|
<span class="tel-warn error hide">验证码错误</span> |
||||||
|
</p> |
||||||
|
</div> |
||||||
|
<div class="reg_checkboxline pos"> |
||||||
|
<span class="z"><i class="icon-ok-sign boxcol" nullmsg="请同意!"></i></span> |
||||||
|
<input type="hidden" id="agree" name="agree" value="1"> |
||||||
|
<div class="Validform_checktip"></div> |
||||||
|
<p>我已阅读并接受 <a id="ag" href="#">《Ushio用户协议说明》</a></p> |
||||||
|
<script>$('#ag').click(function(){tips.info({ |
||||||
|
timeout: 150000, |
||||||
|
message: '1. 为了更好地提供服务,本站需要您提供一个联系方式。本站承诺不会将此联系方式透露给任何其它客体,此联系方式仅用作本站通知您的一种方式。<br>2. 请您在使用本站服务时,务必遵守本地法律法规。对于类似原因引起的纠纷,本站概不负责。<br>3. 请勿将账户给与其它人使用,一经发现本站有权停止此账户在本站的所有权限,并将相关行为人拉入黑名单。' |
||||||
|
})})</script> |
||||||
|
|
||||||
|
</div> |
||||||
|
<!--<div class="r-forget cl"> |
||||||
|
<a href="./reg.html" class="z">账号注册</a> |
||||||
|
<a href="./getpass.html" class="y">忘记密码</a> |
||||||
|
</div>--> |
||||||
|
|
||||||
|
<button class="lang-btn off log-btn">登录/注册</button> |
||||||
|
<!--<div class="third-party"> |
||||||
|
<a href="#" class="log-qq icon-qq-round"></a> |
||||||
|
<a href="#" class="log-qq icon-weixin"></a> |
||||||
|
<a href="#" class="log-qq icon-sina1"></a> |
||||||
|
</div>--> |
||||||
|
<p class="right">© 2018-<script type="text/javascript">document.write(new Date().getFullYear())</script> <a href="https://iotcat.me">iotcat</a> | Powered by <a href="https://ushio.cool">Ushio</a></p> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<script type="text/javascript"> |
||||||
|
/* 窄屏缩小框 */ |
||||||
|
$(function(){ |
||||||
|
if($(window).width() < 400){ |
||||||
|
document.body.style.zoom="0.8"; |
||||||
|
$('#site-landing').css('height', '150%'); |
||||||
|
} |
||||||
|
}); |
||||||
|
</script> |
||||||
|
<script type="text/javascript" src="js/polygonizr.min.js"></script> |
||||||
|
<script type="text/javascript">$('#site-landing').polygonizr();</script> |
||||||
|
<script src="./js/agree.js"></script> |
||||||
|
<script src="./js/login.js"></script> |
||||||
|
<script type="text/javascript" src="https://cdn.yimian.xyz/ushio-js/ushio-footer.min.js"></script> |
||||||
|
<script>if(page.params.hasOwnProperty('from')){ |
||||||
|
cookie.set('_from', encodeURI(page.params.from)); |
||||||
|
}</script> |
||||||
|
|
||||||
|
</body> |
||||||
|
</html> |
@ -0,0 +1,118 @@ |
|||||||
|
<!DOCTYPE html> |
||||||
|
<html lang="zh-CN"> |
||||||
|
<head> |
||||||
|
<meta charset="UTF-8"> |
||||||
|
<title>Ushio Login</title> |
||||||
|
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> |
||||||
|
<meta name="Keywords" content="Login,ushio,iotcat,呓喵酱,yimian"> |
||||||
|
<meta name="Description" content="Login module for Ushio ecosystem."> |
||||||
|
<link rel="stylesheet" type="text/css" href="css/normalize.css" /> |
||||||
|
<link rel="stylesheet" type="text/css" href="css/background.css"> |
||||||
|
<style type="text/css"> |
||||||
|
#site-landing { |
||||||
|
position:relative; |
||||||
|
height: 100%; |
||||||
|
width: 100%; |
||||||
|
background-image: linear-gradient(to top, #30cfd0 0%, #330867 100%); |
||||||
|
} |
||||||
|
html,body{ |
||||||
|
overflow: hidden; |
||||||
|
height: 100%; |
||||||
|
} |
||||||
|
</style> |
||||||
|
<link rel="stylesheet" href="./css/base.css"> |
||||||
|
<link rel="stylesheet" href="./css/iconfont.css"> |
||||||
|
<link rel="stylesheet" href="./css/reg.css"> |
||||||
|
<script type="text/javascript">block_aplayer = true;</script> |
||||||
|
<script src="https://cdn.yimian.xyz/ushio-js/ushio-head.min.js"></script> |
||||||
|
</head> |
||||||
|
<body> |
||||||
|
<div id="ajax-hook"></div> |
||||||
|
|
||||||
|
<div class="wrap"><div id="site-landing"></div> |
||||||
|
<div class="wpn"> |
||||||
|
<div class="form-data find_password" style="top: 30%;"> |
||||||
|
<h4>输入昵称</h4> |
||||||
|
<p class="p-input pos"> |
||||||
|
<label for="nickname">昵称</label> |
||||||
|
<input type="text" id="nickname"> |
||||||
|
<span class="tel-warn pc_tel-err hide"><em></em><i class="icon-warn"></i></span> |
||||||
|
</p> |
||||||
|
<button class="lang-btn next">更新</button> |
||||||
|
<p class="right">© 2018-<script type="text/javascript">document.write(new Date().getFullYear())</script> <a href="https://iotcat.me">iotcat</a> | Powered by <a href="https://ushio.cool">Ushio</a></p> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<script type="text/javascript"> |
||||||
|
/* 窄屏缩小框 */ |
||||||
|
$(function(){ |
||||||
|
if($(window).width() < 400){ |
||||||
|
document.body.style.zoom="0.8"; |
||||||
|
$('#site-landing').css('height', '150%'); |
||||||
|
} |
||||||
|
}); |
||||||
|
</script> |
||||||
|
<script type="text/javascript" src="js/polygonizr.min.js"></script> |
||||||
|
<script type="text/javascript">$('#site-landing').polygonizr();</script> |
||||||
|
<script src="./js/agree.js"></script> |
||||||
|
<script type="text/javascript" src="https://cdn.yimian.xyz/ushio-js/ushio-footer.min.js"></script> |
||||||
|
<script>if(page.params.hasOwnProperty('from')){ |
||||||
|
cookie.set('_from', encodeURI(page.params.from)); |
||||||
|
}</script> |
||||||
|
<script type="text/javascript"> |
||||||
|
|
||||||
|
session.onload(function(){ |
||||||
|
if(!session.get('hash')){ |
||||||
|
window.location.href = '/login.html'; |
||||||
|
} |
||||||
|
}); |
||||||
|
$('#nickname').keyup(function(){ |
||||||
|
|
||||||
|
var s = $(this).val(); |
||||||
|
var spec = `'~^&|{}[]"?><:;.,=-)(*%#!/\\\``; |
||||||
|
s.split("").forEach(function(item){ |
||||||
|
if(spec.split("").indexOf(item)!=-1){ |
||||||
|
s = s.substr(0, s.length - 1) |
||||||
|
$('#nickname').val(s); |
||||||
|
} |
||||||
|
}); |
||||||
|
}); |
||||||
|
|
||||||
|
$('.lang-btn').click(function(){ |
||||||
|
var nickname = $('#nickname').val(); |
||||||
|
if(nickname.length < 3){ |
||||||
|
tips.warning({ |
||||||
|
message: "昵称太短啦!!" |
||||||
|
}); |
||||||
|
return; |
||||||
|
} |
||||||
|
if(nickname.length > 40){ |
||||||
|
tips.warning({ |
||||||
|
message: "昵称太长啦!!" |
||||||
|
}); |
||||||
|
return; |
||||||
|
} |
||||||
|
session.onload(function(){ |
||||||
|
$.get('/api/checkUpdate.php?hash='+session.get('hash')+'&nickname='+nickname, function(data){ |
||||||
|
data = JSON.parse(data); |
||||||
|
if(data.code == 200){ |
||||||
|
tips.success({ |
||||||
|
message: '更新成功!' |
||||||
|
}); |
||||||
|
var to = 'https://www.eee.dog/'; |
||||||
|
if(cookie.get('_from')){ |
||||||
|
to = decodeURI(cookie.get('_from')); |
||||||
|
cookie.del('_from'); |
||||||
|
} |
||||||
|
window.location.href=to; |
||||||
|
}else{ |
||||||
|
tips.warning({ |
||||||
|
message: data.message |
||||||
|
}); |
||||||
|
} |
||||||
|
}); |
||||||
|
}); |
||||||
|
}); |
||||||
|
</script> |
||||||
|
</body> |
||||||
|
</html> |
@ -0,0 +1,91 @@ |
|||||||
|
<!DOCTYPE html> |
||||||
|
<html lang="zh-CN"> |
||||||
|
<head> |
||||||
|
<meta charset="UTF-8"> |
||||||
|
<title>Ushio Login</title> |
||||||
|
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> |
||||||
|
<meta name="Keywords" content="Login,ushio,iotcat,呓喵酱,yimian"> |
||||||
|
<meta name="Description" content="Login module for Ushio ecosystem."> |
||||||
|
<link rel="stylesheet" type="text/css" href="css/normalize.css" /> |
||||||
|
<link rel="stylesheet" type="text/css" href="css/background.css"> |
||||||
|
<style type="text/css"> |
||||||
|
#site-landing { |
||||||
|
position:relative; |
||||||
|
height: 100%; |
||||||
|
width: 100%; |
||||||
|
background-image: linear-gradient(to top, #30cfd0 0%, #330867 100%); |
||||||
|
} |
||||||
|
html,body{ |
||||||
|
overflow: hidden; |
||||||
|
height: 100%; |
||||||
|
} |
||||||
|
</style> |
||||||
|
<link rel="stylesheet" href="./css/base.css"> |
||||||
|
<link rel="stylesheet" href="./css/iconfont.css"> |
||||||
|
<link rel="stylesheet" href="./css/reg.css"> |
||||||
|
<script type="text/javascript">block_aplayer = true;</script> |
||||||
|
<script src="https://cdn.yimian.xyz/ushio-js/ushio-head.min.js"></script> |
||||||
|
|
||||||
|
</head> |
||||||
|
<body> |
||||||
|
|
||||||
|
<div id="ajax-hook"></div> |
||||||
|
<div class="wrap"><div id="site-landing"></div> |
||||||
|
<div class="wpn"> |
||||||
|
<div class="form-data pos" id="box" > |
||||||
|
<a href=""><img src="./img/logo.png" class="head-logo"></a> |
||||||
|
<div class="change-login hide"> |
||||||
|
<p class="account_number on">邮箱登录</p> |
||||||
|
<p class="message">短信登录</p> |
||||||
|
</div> |
||||||
|
<div class="form1"> |
||||||
|
<p class="p-input pos"> |
||||||
|
<label for="num" id="lab_num">邮箱</label> |
||||||
|
<input type="text" id="num"> |
||||||
|
<input type="number" id="num2" class="hide"> |
||||||
|
<span class="tel-warn num-err hide"><em>账号或密码错误,请重新输入</em><i class="icon-warn"></i></span> |
||||||
|
</p> |
||||||
|
<p class="p-input pos"> |
||||||
|
<label for="veri-code">输入验证码</label> |
||||||
|
<input type="number" id="veri-code"> |
||||||
|
<a href="javascript:;" class="send">发送验证码</a> |
||||||
|
<span class="time hide"><em>120</em>s</span> |
||||||
|
<span class="tel-warn error hide">验证码错误</span> |
||||||
|
</p> |
||||||
|
</div> |
||||||
|
|
||||||
|
<!--<div class="r-forget cl"> |
||||||
|
<a href="./reg.html" class="z">账号注册</a> |
||||||
|
<a href="./getpass.html" class="y">忘记密码</a> |
||||||
|
</div>--> |
||||||
|
|
||||||
|
<button class="lang-btn off log-btn">更新</button> |
||||||
|
<!--<div class="third-party"> |
||||||
|
<a href="#" class="log-qq icon-qq-round"></a> |
||||||
|
<a href="#" class="log-qq icon-weixin"></a> |
||||||
|
<a href="#" class="log-qq icon-sina1"></a> |
||||||
|
</div>--> |
||||||
|
<p class="right">© 2018-<script type="text/javascript">document.write(new Date().getFullYear())</script> <a href="https://iotcat.me">iotcat</a> | Powered by <a href="https://ushio.cool">Ushio</a></p> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<script type="text/javascript"> |
||||||
|
/* 窄屏缩小框 */ |
||||||
|
$(function(){ |
||||||
|
if($(window).width() < 400){ |
||||||
|
document.body.style.zoom="0.8"; |
||||||
|
$('#site-landing').css('height', '150%'); |
||||||
|
} |
||||||
|
}); |
||||||
|
</script> |
||||||
|
<script type="text/javascript" src="js/polygonizr.min.js"></script> |
||||||
|
<script type="text/javascript">$('#site-landing').polygonizr();</script> |
||||||
|
<script src="./js/agree.js"></script> |
||||||
|
<script src="./js/update.js"></script> |
||||||
|
<script type="text/javascript" src="https://cdn.yimian.xyz/ushio-js/ushio-footer.min.js"></script> |
||||||
|
<script>if(page.params.hasOwnProperty('from')){ |
||||||
|
cookie.set('_from', encodeURI(page.params.from)); |
||||||
|
}</script> |
||||||
|
|
||||||
|
</body> |
||||||
|
</html> |
Loading…
Reference in new issue