作者 李洪娟

Merge branch 'master' of http://114.215.101.231:8099/lihan/integral into juanli

... ... @@ -169,4 +169,19 @@ class FriendController extends HomeBaseController
}
}
//密码管理验证码页面
public function passwordManager() {
return $this->fetch(':password_manager');
}
//输入密码
public function enterPassword() {
return $this->fetch(':enter_password');
}
//确认密码
public function surePassword() {
return $this->fetch(':sure_password');
}
}
\ No newline at end of file
... ...
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<link rel="stylesheet" href="https://at.alicdn.com/t/font_834805_0ml90wdq5hzm.css">
<link rel="stylesheet" href="__INDEX__/css/base.css">
<link rel="stylesheet" href="__INDEX__/css/swiper.min.css">
<script type="text/javascript" src="__INDEX__/js/base.js"></script>
<title>输入密码</title>
<style>
body,html{
width:100%;
height:100%;
background:#F5F6FA;
}
.passwordnum{
color:#1A1A1A;
font-size: 0.36rem;
font-weight: bold;
margin: 2.16rem 3.02rem;
}
.nextstep{
width:2.4rem;
height:0.88rem;
background:#FE0A01;
color:#fff;
font-size: 0.32rem;
text-align: center;
line-height: 0.88rem;
border-radius: 0.44rem;
box-shadow:0px 15px 30px 0px rgba(254,10,1,0.24);
margin: 0.66rem 2.55rem 0 2.55rem;
}
.enterpassword{
width:4.8rem;
margin: 0 auto;
display:flex;
justify-content: space-between;
align-items: center;
font-size: 0;
margin-top: 0.48rem;
}
.enterpassword li{
width:0.8rem;
height:0.8rem;
list-style: none;
border:1px solid rgba(153,153,153,1);
text-align: center;
border-right:0;
background: #fff;
}
.enterpassword li:last-child{
border-right:1px solid rgba(153,153,153,1) ;
}
.enterpassword li input{
width:0.67rem;
height:0.76rem;
list-style: none;
text-align: center;
border:none;
}
</style>
</head>
<body>
<div class="container">
<p class="passwordnum">输入密码</p>
<ul class="enterpassword">
<li>
<input type="text">
</li>
<li>
<input type="text">
</li>
<li>
<input type="text">
</li>
<li>
<input type="text">
</li>
<li>
<input type="text">
</li>
<li>
<input type="text">
</li>
</ul>
<p class="nextstep">下一步</p>
</div>
</body>
<script src="__INDEX__/js/jquery.min.js"></script>
<script>
$(".nextstep").click(function(){
window.location.href="{:url('friendship/Friend/surePassword')}"
})
</script>
</html>
... ...
... ... @@ -270,7 +270,7 @@
<p class="remaininter">您还剩余200积分</p>
<P class="give">赠送xxx好友积分</P>
<div class="enterinter">
<input type="text" class="pleaseenter" placeholder="输入赠送积分值">
<input type="text" class="pleaseenter" placeholder="输入赠送积分值" >
</div>
<div class="attention">
积分赠送属个人操作,赠送错误平台概不负责
... ... @@ -317,6 +317,10 @@
</body>
<script type="text/javascript" src="__INDEX__/js/jquery.min.js"></script>
<script>
$(".pleaseenter").click(function(){
window.event.stopPropagation();
})
$(".inter_img").click(function(){
$(".sendwrapper").css("display","block");
})
... ... @@ -360,7 +364,7 @@
onload = function(){
var arr=[];
var str=""
var txts = wrap.getElementsByClassName(".entercode");
var txts = wrap.getElementsByClassName("entercode");
console.log(txts)
for(var i = 0; i<txts.length;i++){
var t = txts[i];
... ...
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<link rel="stylesheet" href="https://at.alicdn.com/t/font_834805_0ml90wdq5hzm.css">
<link rel="stylesheet" href="__INDEX__/css/base.css">
<link rel="stylesheet" href="__INDEX__/css/swiper.min.css">
<script type="text/javascript" src="__INDEX__/js/base.js"></script>
<title>密码管理</title>
<style>
body,html{
width:100%;
height:100%;
background: RGBA(245, 246, 250, 1);
}
.phone{
width:6.96rem;
margin: 0 auto;
height:1rem;
background: #fff;
border-radius: 0.5rem;
font-size: 0.28rem;
color: RGBA(151, 160, 168, 1);
/*padding: 0.37rem 0.52rem;*/
margin-top: 0.32rem;
}
.enterphone{
width:6.96rem;
margin: 0 auto;
height:1rem;
background: #fff;
border-radius: 0.5rem;
font-size: 0.28rem;
color: RGBA(151, 160, 168, 1);
padding: 0.37rem 0.52rem;
border:none;
outline:none;
}
.code{
font-size: 0;
display:flex;
justify-content: space-between;
align-content: center;
width:6.96rem;
margin: 0 auto;
height:1rem;
background: #fff;
border-radius: 0.5rem;
color: RGBA(151, 160, 168, 1);
margin-top: 0.32rem;
}
.code_num{
height:1rem;
line-height: 1rem;
font-size: 0.28rem;
margin-left: 0.52rem;
}
.entercode{
height:1rem;
line-height: 1rem;
font-size: 0.28rem;
outline:none;
border:none;
border-radius: 0.5rem;
color: RGBA(151, 160, 168, 1);
}
.sendcode{
width:2.44rem;
font-size: 0.28rem;
height:0.72rem;
background: RGBA(254, 10, 1, 1);
color:#fff;
border-radius: 0.36rem;
line-height: 0.72rem;
text-align: center;
margin-top: 0.15rem;
margin-right: 0.37rem;
border:none;
outline:none;
}
.nextstep{
display:block;
width:6.86rem;
height:0.88rem;
text-align: center;
line-height: 0.88rem;
background:RGBA(254, 10, 1, 1);
font-size: 0.32rem;
color:#fff;
border-radius: 0.44rem;
position:fixed;
bottom:0.55rem;
left:0;
right:0;
margin: 0 auto;
box-shadow:0px 15px 30px 0px rgba(254,10,1,0.24);
border:none;
outline:none;
}
</style>
</head>
<body>
<div class="container">
<div class="phone">
<input type="text" class="enterphone" placeholder="手机号">
</div>
</div>
<div class="code">
<p class="code_num">
<input type="text" class="entercode" placeholder="验证码">
</p>
<button class="sendcode"></button>
</div>
<button class="nextstep">
下一步
</button>
</body>
<script src="__INDEX__/js/jquery.min.js"></script>
<script>
$(".sendcode").click(function () {
var mobile = $(".enterphone").val();
var pattern = /^1[34578]\d{9}$/;
if(pattern.test(mobile)) {
$.ajax({
url: "{:url('sms/Sms/sendSms')}",
data: {
mobile: mobile
},
type: "POST",
dataType: "JSON",
})
} else {
alert('请输入正确的手机号');
}
})
$(".nextstep").click(function(){
var mobile = $(".enterphone").val();
var code = $(".entercode").val();
if(mobile == '') {
alert('请输入手机号');
}else {
if(code == '') {
alert('请输入验证码');
}else {
$.ajax({
url:"{:url('sms/Sms/checkCode')}",
data:{
mobile:mobile,
code:code
},
type:"POST",
dataType:"JSON",
success: function (data) {
if(data.data === true) {
localStorage.clear();
window.location.href="{:url('user/Center/enterPassword')}"
}else {
alert(data.msg);
}
}
})
}
}
})
var InterValObj; //timer变量,控制时间
var count = 60; //间隔函数,1秒执行
var curCount;//当前剩余秒数
var t=localStorage.getItem("time");
InterValObj = window.setInterval(SetRemainTime,1000);
if(t!=null){
curCount=t;
//$(".nextstep").attr("disabled",true);
$(".sendcode").attr("disabled",true)
var phone=localStorage.getItem("mobile");
$(".enterphone").val(phone)
}else{
curCount=60;
window.clearInterval(InterValObj);
$(".sendcode").html("获取验证码");
}
$(".sendcode").click(function(){
curCount = count;
var tel = $(".enterphone").val();
if(tel==""){
return false;
}
var reg= /^1[34578]\d{9}$/;
if(!reg.test(tel)){
return false;
}
localStorage.setItem("mobile",tel)
//设置button效果,开始计时
$(".sendcode").attr("disabled",true);
//$(".nextstep").attr("disabled",true);
// $(".sendcode").unbind()
$(".sendcode").html( curCount + "秒");
$(".sendcode").css("color","#fff");
InterValObj = window.setInterval(SetRemainTime, 1000); //启动计时器,1秒执行一次
});
//timer处理函数
function SetRemainTime() {
if (curCount == 0) {
window.clearInterval(InterValObj);//停止计时器
$(".sendcode").removeAttr("disabled");//启用按钮
//$(".nextstep").removeAttr("disabled");
$(".sendcode").html("重新发送验证码");
$(".sendcode").css("color","#fff");
localStorage.clear();
}
else {
curCount--;
localStorage.setItem("time",curCount);
$(".sendcode").html(curCount + "秒");
$(".sendcode").css("color","#fff");
}
}
</script>
</html>
... ...
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<link rel="stylesheet" href="https://at.alicdn.com/t/font_834805_0ml90wdq5hzm.css">
<link rel="stylesheet" href="__INDEX__/css/base.css">
<link rel="stylesheet" href="__INDEX__/css/swiper.min.css">
<script type="text/javascript" src="__INDEX__/js/base.js"></script>
<title>输入密码</title>
<style>
body,html{
width:100%;
height:100%;
background:#F5F6FA;
}
.passwordnum{
color:#1A1A1A;
font-size: 0.36rem;
font-weight: bold;
margin: 2.16rem 3.02rem;
}
.nextstep{
width:2.4rem;
height:0.88rem;
background:#FE0A01;
color:#fff;
font-size: 0.32rem;
text-align: center;
line-height: 0.88rem;
border-radius: 0.44rem;
box-shadow:0px 15px 30px 0px rgba(254,10,1,0.24);
margin: 0.66rem 2.55rem 0 2.55rem;
}
.enterpassword{
width:4.8rem;
margin: 0 auto;
display:flex;
justify-content: space-between;
align-items: center;
font-size: 0;
margin-top: 0.48rem;
}
.enterpassword li{
width:0.8rem;
height:0.8rem;
list-style: none;
border:1px solid rgba(153,153,153,1);
text-align: center;
border-right:0;
background: #fff;
}
.enterpassword li:last-child{
border-right:1px solid rgba(153,153,153,1) ;
}
.enterpassword li input{
width:0.67rem;
height:0.76rem;
list-style: none;
text-align: center;
border:none;
}
</style>
</head>
<body>
<div class="container">
<p class="passwordnum">确认密码</p>
<ul class="enterpassword">
<li>
<input type="text">
</li>
<li>
<input type="text">
</li>
<li>
<input type="text">
</li>
<li>
<input type="text">
</li>
<li>
<input type="text">
</li>
<li>
<input type="text">
</li>
</ul>
<p class="nextstep">确认</p>
</div>
</body>
</html>
... ...
... ... @@ -161,6 +161,7 @@
success: function (data) {
if(data.data === true) {
localStorage.clear();
window.location.href="{:url('user/Center/editPhone2')}"
}else {
alert(data.msg);
... ... @@ -180,7 +181,7 @@
if(t!=null){
curCount=t;
$(".nextstep").attr("disabled",true);
//$(".nextstep").attr("disabled",true);
$(".sendcode").attr("disabled",true)
var phone=localStorage.getItem("mobile");
$(".enterphone").val(phone)
... ... @@ -203,7 +204,7 @@
localStorage.setItem("mobile",tel)
//设置button效果,开始计时
$(".sendcode").attr("disabled",true);
$(".nextstep").attr("disabled",true);
//$(".nextstep").attr("disabled",true);
// $(".sendcode").unbind()
$(".sendcode").html( curCount + "秒");
$(".sendcode").css("color","#fff");
... ... @@ -215,7 +216,7 @@
if (curCount == 0) {
window.clearInterval(InterValObj);//停止计时器
$(".sendcode").removeAttr("disabled");//启用按钮
$(".nextstep").removeAttr("disabled");
//$(".nextstep").removeAttr("disabled");
$(".sendcode").html("重新发送验证码");
$(".sendcode").css("color","#fff");
localStorage.clear();
... ...
... ... @@ -143,23 +143,33 @@
$(".nextstep").click(function(){
var mobile = $(".enterphone").val();
$.ajax({
url:"{:url('sms/Sms/checkCode')}",
data:{
mobile:mobile,
code:$(".entercode").val()
},
type:"POST",
dataType:"JSON",
var code = $(".entercode").val();
if(mobile == '') {
alert('请输入手机号');
}else {
if(code == '') {
alert('请输入验证码');
}else {
$.ajax({
url:"{:url('sms/Sms/bindNewMobile')}",
data:{
mobile:mobile,
code:code
},
type:"POST",
dataType:"JSON",
success: function (data) {
if(data.data === true) {
window.location.href="{:url('user/Center/userInfo')}"
}else {
alert(data.msg);
}
success: function (data) {
if(data.data === true) {
localStorage.clear();
window.location.href="{:url('user/Center/userInfo')}"
}else {
alert(data.msg);
}
}
})
}
})
}
});
//发送验证码
... ... @@ -172,7 +182,7 @@
InterValObj = window.setInterval(SetRemainTime,1000);
if(t!=null){
curCount=t;
$(".nextstep").attr("disabled",true);
//$(".nextstep").attr("disabled",true);
$(".sendcode").attr("disabled",true)
var phone=localStorage.getItem("mobile");
$(".enterphone").val(phone)
... ... @@ -195,7 +205,7 @@
curCount = count;
//设置button效果,开始计时
$(".sendcode").attr("disabled",true);
$(".nextstep").attr("disabled",true);
//$(".nextstep").attr("disabled",true);
// $(".sendcode").unbind()
$(".sendcode").html( curCount + "秒");
$(".sendcode").css("color","#fff");
... ... @@ -207,7 +217,7 @@
if (curCount == 0) {
window.clearInterval(InterValObj);//停止计时器
$(".sendcode").removeAttr("disabled");//启用按钮
$(".nextstep").removeAttr("disabled");
//$(".nextstep").removeAttr("disabled");
$(".sendcode").html("重新获取证码");
$(".sendcode").css("color","#fff");
localStorage.clear();
... ...
... ... @@ -72,7 +72,7 @@
<p class="record">积分赠送</p>
<P class="iconfont icon-jinru"></P>
</div>
<div class="list password">
<div class="list password" data-url="{:url('friendship/Friend/passwordManager')}">
<p class="record">积分密码管理</p>
<P class="iconfont icon-jinru"></P>
</div>
... ... @@ -92,7 +92,7 @@
window.location.href=$(this).attr('data-url');
})
$(".password").click(function(){
window.location.href=$(this).attr('data-url');
})
</script>
</html>
... ...