init
This commit is contained in:
232
app/index/view/customer/bind_phone.phtml
Executable file
232
app/index/view/customer/bind_phone.phtml
Executable file
@@ -0,0 +1,232 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
{include file="include/head-product" /}
|
||||
<script type="text/javascript">
|
||||
var navID = "1";
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<!--top End-->
|
||||
|
||||
<!-- 新闻详情页 s -->
|
||||
<body class="bg-gray">
|
||||
<!-- 注册 -->
|
||||
<div class="login" style="margin-top:186px;">
|
||||
<div class="swt-Container">
|
||||
<div class="login_content_register">
|
||||
<div class="text-c" style="margin-bottom: 2vw"><img src="/uploads/default/logo-black.png"></div>
|
||||
<div class="title text-c">
|
||||
<span class="accounts f_black">绑定手机</span>
|
||||
</div>
|
||||
<div class="content content_01">
|
||||
<li class="margin-b-7">
|
||||
<input type="text" onfocus="hide_err('telephone')" onblur="check_format('telephone')" id="telephone" placeholder="请输入手机号码">
|
||||
<div id="err_tel"></div>
|
||||
</li>
|
||||
<li class="margin-b-7">
|
||||
<input type="text" onfocus="hide_err('captcha1')" id="captcha1" placeholder="请输入验证码">
|
||||
<button class="Obtain" onclick="get_captcha('captcha1')">获取验证码</button>
|
||||
<div id="err_captcha1"></div>
|
||||
</li>
|
||||
</div>
|
||||
|
||||
<div class="tjdl">
|
||||
<button class="tjbtn" onclick="third_register()">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-c login_bottom">2015 ORICO Technologies Co.,Ltd 版权所有(<a target="_blank" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=44030702002297" >粤ICP备15025109号-3</a>)
|
||||
<p> <a target="_blank" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=44030702002297" ><img src=""/>粤公网安备 44030702002297号 <img src="__PUBLIC__/web/images/orico_co_icon.png" style="vertical-align: middle;"></a></p>
|
||||
</div>
|
||||
|
||||
<!-- 新闻详情页 e -->
|
||||
</body>
|
||||
</html>
|
||||
<!-- 新闻详情页 e -->
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$(".accounts").click(function(){
|
||||
$(this).siblings().removeClass("blue");
|
||||
$(this).addClass("blue");
|
||||
$(".content_02").hide();
|
||||
$(".content_01").show();
|
||||
})
|
||||
$(".short_letter").click(function(){
|
||||
$(this).siblings().removeClass("blue");
|
||||
$(this).addClass("blue");
|
||||
$(".content_01").hide();
|
||||
$(".content_02").show();
|
||||
})
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
<script type="text/javascript">
|
||||
|
||||
var sendsms_flag = 1;
|
||||
function get_captcha(type)
|
||||
{
|
||||
if (type == 'captcha1')
|
||||
{
|
||||
var url = '/index/customer/sendsms';
|
||||
var telephone = $("#telephone").val();
|
||||
var data = {
|
||||
telephone: telephone
|
||||
};
|
||||
|
||||
if (sendsms_flag == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!check_format('telephone'))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if (type == 'captcha2')
|
||||
{
|
||||
alert('邮箱找回暂不可用');
|
||||
return;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: url,
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function(data) {
|
||||
if (data.code) {
|
||||
//设置button效果,开始计时
|
||||
curCount = 60;
|
||||
$(".Obtain").attr("disabled", "true");
|
||||
$(".Obtain").html("重新获取" + curCount + "秒");
|
||||
InterValObj = window.setInterval(SetRemainTime, 1000);
|
||||
sendsms_flag = 0;
|
||||
setTimeout(function() {
|
||||
sendsms_flag = 1;
|
||||
}, 60000);
|
||||
} else {
|
||||
alert(data.msg);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
function third_register() {
|
||||
var telephone = $("#telephone").val();
|
||||
var captcha = $("#captcha1").val();
|
||||
var openid = '<?php echo isset($openid) ? $openid : ''; ?>';
|
||||
var access_token = '<?php echo isset($access_token) ? $access_token : ''; ?>';
|
||||
var userinfo = '<?php echo isset($userinfo) ? json_encode($userinfo) : ''; ?>';
|
||||
|
||||
var data = {
|
||||
telephone: telephone,
|
||||
captcha: captcha,
|
||||
openid: openid,
|
||||
access_token: access_token,
|
||||
userinfo: userinfo
|
||||
};
|
||||
|
||||
$.ajax({
|
||||
url: '/index/customer/qq_register',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (res) {
|
||||
if (res.code == 200)
|
||||
{
|
||||
location.href = '/index/customer/personal.html';
|
||||
}
|
||||
else if (res.code == -3)
|
||||
{
|
||||
var html = '<span style="color: red">' + res.msg + '</span>';
|
||||
show_err('captcha1', html);
|
||||
}
|
||||
}
|
||||
})
|
||||
};
|
||||
|
||||
function check_format(id)
|
||||
{
|
||||
if (id == 'telephone')
|
||||
{
|
||||
var telephone = $("#telephone").val();
|
||||
var arg = /^1[3456789]\d{9}$/;
|
||||
if (!arg.test(telephone))
|
||||
{
|
||||
var html = '<span style="color: red">请检查手机格式</span>';
|
||||
show_err('telephone', html);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
hide_err('telephone');
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$(document).keyup(function(e) {
|
||||
var code = e.keyCode;
|
||||
if (code == 13)
|
||||
{
|
||||
third_register();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
function hide_err(id)
|
||||
{
|
||||
if (id == 'telephone')
|
||||
{
|
||||
var err_id = 'err_tel';
|
||||
var input_id = 'telephone';
|
||||
}
|
||||
else if (id == 'captcha1')
|
||||
{
|
||||
var err_id = 'err_captcha1';
|
||||
var input_id = 'captcha1';
|
||||
}
|
||||
|
||||
$('#' + err_id).html('');
|
||||
$('#' + input_id).css('border', '1px solid #dedfe0');
|
||||
}
|
||||
|
||||
function show_err(id, html)
|
||||
{
|
||||
if (id == 'telephone')
|
||||
{
|
||||
var err_id = 'err_tel';
|
||||
var input_id = 'telephone';
|
||||
}
|
||||
else if (id == 'captcha1')
|
||||
{
|
||||
var err_id = 'err_captcha1';
|
||||
var input_id = 'captcha1';
|
||||
}
|
||||
|
||||
$('#' + err_id).html(html);
|
||||
$('#' + input_id).css('border', '1px solid red');
|
||||
}
|
||||
/*验证码倒计时*/
|
||||
|
||||
function SetRemainTime() {
|
||||
if (curCount < 1) {
|
||||
window.clearInterval(InterValObj); //停止计时器
|
||||
InterValObj = null;
|
||||
$(".Obtain").removeAttr("disabled"); //启用按钮
|
||||
$(".Obtain").html("获取短信验证码");
|
||||
} else {
|
||||
curCount--;
|
||||
$(".Obtain").html("重新获取" + curCount + "秒");
|
||||
}
|
||||
}
|
||||
</script>
|
||||
473
app/index/view/customer/forgetpwd.phtml
Executable file
473
app/index/view/customer/forgetpwd.phtml
Executable file
@@ -0,0 +1,473 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
{include file="include/head-product" /}
|
||||
<script type="text/javascript">
|
||||
var navID = "1";
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<!--top End-->
|
||||
|
||||
<!-- 新闻详情页 s -->
|
||||
<body class="bg-gray">
|
||||
<!-- 注册 -->
|
||||
<div class="login" style="margin-top:56px;">
|
||||
<div class="swt-Container">
|
||||
<div class="login_content_register">
|
||||
<div class="text-c" style="margin-bottom: 2vw"><img src="/uploads/default/logo-black.png"></div>
|
||||
<div class="title">
|
||||
<ul>
|
||||
<li class="accounts blue cursor_p">手机找回</li>
|
||||
<li class="short_letter cursor_p">邮箱找回</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="content content_01">
|
||||
<li class="margin-b-7">
|
||||
<input type="text" tabindex="1" onfocus="hide_err('telephone')" onblur="check_format('telephone')" id="telephone" placeholder="请输入手机号码">
|
||||
<div id="err_tel"></div>
|
||||
</li>
|
||||
|
||||
<li class="margin-b-7">
|
||||
<input type="text" tabindex="2" id="captcha1" onfocus="hide_err('captcha1')" placeholder="请输入验证码">
|
||||
<button class="Obtain" onclick="get_captcha('captcha1')">获取验证码</button>
|
||||
<div id="err_captcha1"></div>
|
||||
</li>
|
||||
<li class="margin-b-5">
|
||||
<input type="password" tabindex="3" id="password" onfocus="hide_err('password')" onblur="check_format('password')" placeholder="新密码必须包含8-20个字符,且包含数字和字母">
|
||||
<div id="err_pwd"></div></li>
|
||||
</li>
|
||||
<li class="margin-b-5">
|
||||
<input type="password" tabindex="4" id="re_password" onfocus="hide_err('re_password')" onblur="check_format('re_password')" placeholder="请确认新密码">
|
||||
<div id="err_repwd"></div>
|
||||
</li>
|
||||
<div class="tjdl">
|
||||
<button class="tjbtn" onclick="update_forget_pwd('update_by_tel')">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="content content_02" style="display: none;">
|
||||
<li class="margin-b-7">
|
||||
<input type="text" onfocus="hide_err('email')" onblur="check_format('email')" id="email" placeholder="请输入邮箱">
|
||||
<div id="err_email"></div>
|
||||
</li>
|
||||
<li class="margin-b-7">
|
||||
<input onfocus="hide_err('captcha2')" type="text" id="captcha2" placeholder="请输入验证码" >
|
||||
<button class="Obtain cursor_p" onclick="get_captcha('captcha2')">获取验证码</button>
|
||||
<div id="err_captcha2"></div>
|
||||
</li>
|
||||
<li class="margin-b-5">
|
||||
<input type="password" id="password2" onfocus="hide_err('password2')" onblur="check_format('password2')" placeholder="新密码必须包含8-20个字符,且包含数字和字母">
|
||||
<div id="err_pwd2"></div>
|
||||
</li>
|
||||
<li class="margin-b-5">
|
||||
<input type="password" id="re_password2" onfocus="hide_err('re_password2')" onblur="check_format('re_password2')" placeholder="请确认新密码">
|
||||
<div id="err_repwd2"></div>
|
||||
</li>
|
||||
<div class="tjdl">
|
||||
<button class="tjbtn" onclick="update_forget_pwd('update_by_email')">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="Register">
|
||||
<a href="__ORICOROOT__<?php echo url('/register'); ?>" class="left">立即注册</a>
|
||||
<a href="__ORICOROOT__<?php echo url('/login'); ?>" class="right">登录</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-c login_bottom">2015 ORICO Technologies Co.,Ltd 版权所有(<a target="_blank" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=44030702002297" >粤ICP备15025109号-3</a>)
|
||||
<p> <a target="_blank" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=44030702002297" ><img src=""/>粤公网安备 44030702002297号 <img src="__PUBLIC__/web/images/orico_co_icon.png" style="vertical-align: middle;"></a></p>
|
||||
</div>
|
||||
|
||||
<!-- 新闻详情页 e -->
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$(".accounts").click(function(){
|
||||
hide_err_batch(2);
|
||||
update_flag = 1;
|
||||
$(this).siblings().removeClass("blue");
|
||||
$(this).addClass("blue");
|
||||
$(".content_02").hide();
|
||||
$(".content_01").show();
|
||||
})
|
||||
$(".short_letter").click(function(){
|
||||
alert('邮箱暂不可用');
|
||||
return;
|
||||
hide_err_batch(1);
|
||||
update_flag = 2;
|
||||
$(this).siblings().removeClass("blue");
|
||||
$(this).addClass("blue");
|
||||
$(".content_01").hide();
|
||||
$(".content_02").show();
|
||||
})
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
<script type="text/javascript">
|
||||
var update_flag = 1;
|
||||
var sendsms_flag = 1;
|
||||
function get_captcha(type)
|
||||
{
|
||||
if (type == 'captcha1')
|
||||
{
|
||||
var url = '/index/customer/sendsms';
|
||||
var telephone = $("#telephone").val();
|
||||
var data = {
|
||||
telephone: telephone
|
||||
};
|
||||
|
||||
if (sendsms_flag == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!check_format('telephone'))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if (type == 'captcha2')
|
||||
{
|
||||
var url = '/index/customer/sendresetemail';
|
||||
var email = $("#email").val();
|
||||
var data = {
|
||||
email: email
|
||||
};
|
||||
|
||||
if (sendsms_flag == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!check_format('email'))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: url,
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function(data) {
|
||||
if (data.code == 200) {
|
||||
//设置button效果,开始计时
|
||||
curCount = 60;
|
||||
$(".Obtain").attr("disabled", "true");
|
||||
$(".Obtain").html("重新获取" + curCount + "秒");
|
||||
InterValObj = window.setInterval(SetRemainTime, 1000);
|
||||
sendsms_flag = 0;
|
||||
setTimeout(function() {
|
||||
sendsms_flag = 1;
|
||||
}, 60000);
|
||||
} else {
|
||||
alert(data.msg);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
function update_forget_pwd(type) {
|
||||
if (type == 'update_by_tel')
|
||||
{
|
||||
var telephone = $("#telephone").val();
|
||||
var captcha = $("#captcha1").val();
|
||||
var password = $("#password").val();
|
||||
var re_password = $("#re_password").val();
|
||||
var data = {
|
||||
telephone: telephone,
|
||||
captcha: captcha,
|
||||
password: password
|
||||
};
|
||||
|
||||
if (!check_format('telephone') || !check_format('password') || !check_format('re_password'))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if (type == 'update_by_email')
|
||||
{
|
||||
var email = $("#email").val();
|
||||
var captcha = $("#captcha2").val();
|
||||
var password = $("#password2").val();
|
||||
var re_password = $("#re_password2").val();
|
||||
var data = {
|
||||
email: email,
|
||||
captcha: captcha,
|
||||
password: password
|
||||
};
|
||||
|
||||
if (!check_format('email') || !check_format('password2') || !check_format('re_password2'))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: 'index/customer/update_forget_pwd',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (res) {
|
||||
if (res.code == 200)
|
||||
{
|
||||
alert(res.msg);
|
||||
location.href = '/login.html';
|
||||
}
|
||||
else if (res.code == -3)
|
||||
{
|
||||
var html = '<span style="color: red">' + res.msg + '</span>';
|
||||
show_err('captcha1', html);
|
||||
}
|
||||
else if (res.code == -5)
|
||||
{
|
||||
var html = '<span style="color: red">' + res.msg + '</span>';
|
||||
show_err('captcha2', html);
|
||||
}
|
||||
else
|
||||
{
|
||||
alert(res.msg);
|
||||
}
|
||||
}
|
||||
})
|
||||
};
|
||||
|
||||
function check_format(id)
|
||||
{
|
||||
if (id == 'password' || id == 'password2')
|
||||
{
|
||||
var flag = id == 'password' ? 1 : 0;
|
||||
var _id = flag == 1 ? 're_password' : 're_password2';
|
||||
var err_id = flag == 1 ? 'pwd' : 'pwd2';
|
||||
|
||||
var re_password = $("#" + _id).val();
|
||||
if (re_password != '')
|
||||
{
|
||||
check_format(_id);
|
||||
}
|
||||
|
||||
var password = $("#" + id).val();
|
||||
var arg = /^(?![a-zA-z]+$)(?!\d+$)(?![!@#$%^&*-.]+$)[a-zA-Z\d!@#$%^&*-.]{8,20}$/;
|
||||
if (!arg.test(password))
|
||||
{
|
||||
var html = '<span style="color: red">密码必须包含8-20个字符,且至少包含两种类型字符</span>';
|
||||
show_err(err_id, html);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
hide_err(err_id);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if (id == 're_password' || id == 're_password2')
|
||||
{
|
||||
var flag = id == 're_password' ? 1 : 0;
|
||||
var pwd_id = flag == 1 ? 'password' : 'password2';
|
||||
var err_id = flag == 1 ? 're_pwd' : 're_pwd2';
|
||||
|
||||
var password = $("#" + pwd_id).val();
|
||||
var re_password = $("#" + id).val();
|
||||
if (password != re_password)
|
||||
{
|
||||
var html = '<span style="color: red">两次密码不一致</span>';
|
||||
show_err(err_id, html);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
hide_err(err_id);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if (id == 'telephone')
|
||||
{
|
||||
var telephone = $("#telephone").val();
|
||||
var arg = /^1[3456789]\d{9}$/;
|
||||
if (!arg.test(telephone))
|
||||
{
|
||||
var html = '<span style="color: red">请检查手机格式</span>';
|
||||
show_err('telephone', html);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
hide_err('telephone');
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if (id == 'email')
|
||||
{
|
||||
var email = $("#email").val();
|
||||
var arg = /^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,})$/;
|
||||
if (!arg.test(email))
|
||||
{
|
||||
var html = '<span style="color: red">邮箱格式错误</span>';
|
||||
show_err('email', html);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
hide_err('email');
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
/*倒数计时*/
|
||||
function SetRemainTime() {
|
||||
if (curCount < 1) {
|
||||
window.clearInterval(InterValObj); //停止计时器
|
||||
InterValObj = null;
|
||||
$(".Obtain").removeAttr("disabled"); //启用按钮
|
||||
$(".Obtain").html("获取短信验证码");
|
||||
} else {
|
||||
curCount--;
|
||||
$(".Obtain").html("重新获取" + curCount + "秒");
|
||||
}
|
||||
}
|
||||
|
||||
$(document).keyup(function(e) {
|
||||
var code = e.keyCode;
|
||||
var type = update_flag == 1 ? 'update_by_tel' : 'update_by_email';
|
||||
if (code == 13)
|
||||
{
|
||||
update_forget_pwd(type);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
function hide_err_batch(id)
|
||||
{
|
||||
if (id == 1)
|
||||
{
|
||||
hide_err('telephone');
|
||||
hide_err('captcha1');
|
||||
hide_err('password');
|
||||
hide_err('re_password');
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function hide_err(id)
|
||||
{
|
||||
if (id == 'password')
|
||||
{
|
||||
var err_id = 'err_pwd';
|
||||
var input_id = 'password';
|
||||
}
|
||||
else if (id == 're_password')
|
||||
{
|
||||
var err_id = 'err_repwd';
|
||||
var input_id = 're_password';
|
||||
}
|
||||
if (id == 'password2')
|
||||
{
|
||||
var err_id = 'err_pwd2';
|
||||
var input_id = 'password2';
|
||||
}
|
||||
else if (id == 're_password2')
|
||||
{
|
||||
var err_id = 'err_repwd2';
|
||||
var input_id = 're_password2';
|
||||
}
|
||||
else if (id == 'email')
|
||||
{
|
||||
var err_id = 'err_email';
|
||||
var input_id = 'email';
|
||||
}
|
||||
else if (id == 'telephone')
|
||||
{
|
||||
var err_id = 'err_tel';
|
||||
var input_id = 'telephone';
|
||||
}
|
||||
else if (id == 'captcha1')
|
||||
{
|
||||
var err_id = 'err_captcha1';
|
||||
var input_id = 'captcha1';
|
||||
}
|
||||
else if (id == 'captcha2')
|
||||
{
|
||||
var err_id = 'err_captcha2';
|
||||
var input_id = 'captcha2';
|
||||
}
|
||||
|
||||
$('#' + err_id).html('');
|
||||
$('#' + input_id).css('border', '1px solid #dedfe0');
|
||||
}
|
||||
|
||||
function show_err(id, html)
|
||||
{
|
||||
if (id == 'pwd')
|
||||
{
|
||||
var err_id = 'err_pwd';
|
||||
var input_id = 'password';
|
||||
}
|
||||
else if (id == 're_pwd')
|
||||
{
|
||||
var err_id = 'err_repwd';
|
||||
var input_id = 're_password';
|
||||
}
|
||||
else if (id == 'pwd2')
|
||||
{
|
||||
var err_id = 'err_pwd2';
|
||||
var input_id = 'password2';
|
||||
}
|
||||
else if (id == 're_pwd2')
|
||||
{
|
||||
var err_id = 'err_repwd2';
|
||||
var input_id = 're_password2';
|
||||
}
|
||||
else if (id == 'email')
|
||||
{
|
||||
var err_id = 'err_email';
|
||||
var input_id = 'email';
|
||||
}
|
||||
else if (id == 'telephone')
|
||||
{
|
||||
var err_id = 'err_tel';
|
||||
var input_id = 'telephone';
|
||||
}
|
||||
else if (id == 'captcha1')
|
||||
{
|
||||
var err_id = 'err_captcha1';
|
||||
var input_id = 'captcha1';
|
||||
}
|
||||
else if (id == 'captcha2')
|
||||
{
|
||||
var err_id = 'err_captcha2';
|
||||
var input_id = 'captcha2';
|
||||
}
|
||||
|
||||
$('#' + err_id).html(html);
|
||||
$('#' + input_id).css('border', '1px solid red');
|
||||
}
|
||||
/*验证码倒计时*/
|
||||
|
||||
function SetRemainTime() {
|
||||
if (curCount < 1) {
|
||||
window.clearInterval(InterValObj); //停止计时器
|
||||
InterValObj = null;
|
||||
$(".Obtain").removeAttr("disabled"); //启用按钮
|
||||
$(".Obtain").html("获取短信验证码");
|
||||
} else {
|
||||
curCount--;
|
||||
$(".Obtain").html("重新获取" + curCount + "秒");
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
324
app/index/view/customer/index.phtml
Executable file
324
app/index/view/customer/index.phtml
Executable file
@@ -0,0 +1,324 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
{include file="include/head" /}
|
||||
<script type="text/javascript">
|
||||
var navID = "1";
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<!--top-->
|
||||
<header class="header-PC header-Product">
|
||||
<div id="header" class="theme-black">
|
||||
{include file="include/top" /}
|
||||
{include file="include/top-header" /}
|
||||
</div>
|
||||
</header>
|
||||
<!--top End-->
|
||||
|
||||
<!-- 登录 -->
|
||||
<div class="login login_bg login_height">
|
||||
<div class="swt-Container">
|
||||
<div class="login_content">
|
||||
<div class="title">
|
||||
<ul>
|
||||
<li class="accounts blue"><span class="cursor_p">密码登录</span></li>
|
||||
<li class="short_letter"><span class="cursor_p">短信登录</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="content content_01">
|
||||
<li class="margin-b-5"><input type="text" id="username" onfocus="handle_focus('username')" onblur="check_format('username')" placeholder="请输入手机号/邮箱"></li>
|
||||
<li class="margin-b-5"><input type="password" onblur="check_format('username')" onfocus="handle_focus('username')" id="password" placeholder="请输入密码"></li>
|
||||
<div id="err_t1" class="err"></div>
|
||||
<div class="tjdl">
|
||||
<a class="tjbtn" id="submit-btn" onclick="login('login_by_username')">登录</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content content_02" style="display: none;">
|
||||
<li class="margin-b-5"><input type="text" onfocus="handle_focus('telephone')" onblur="check_format('telephone')" id="telephone" placeholder="请输入手机号"></li>
|
||||
<li class="margin-b-5"><input type="password" value="" id="captcha1" placeholder="请输入验证码">
|
||||
<div class="Obtain cursor_p" onclick="get_captcha('captcha1')">获取验证码</div>
|
||||
</li>
|
||||
<div id="err_t2" class="err"></div>
|
||||
<div class="tjdl">
|
||||
<a class="tjbtn" id="submit-btn" onclick="login('login_by_captcha')">登录</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="Register">
|
||||
<a href="__ORICOROOT__<?php echo url('/register'); ?>" class="left">立即注册</a>
|
||||
<a href="__ORICOROOT__<?php echo url('/forgetpwd'); ?>" class="right">忘记密码?</a>
|
||||
</div>
|
||||
<div class="short">
|
||||
<div class="Quick"><span>其它登录方式</span></div>
|
||||
<a onclick='toLogin()'><img src="__PUBLIC__/web/images/customer/QQ.png" height="33"></a>
|
||||
<a onclick='toLoginwx()'><img src="__PUBLIC__/web/images/customer/weixin.png" height="33"></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- 登录 -->
|
||||
<!-- QQ快捷登录-->
|
||||
<script
|
||||
type="text/javascript" charset="utf-8"
|
||||
src="http://connect.qq.com/qc_jssdk.js"
|
||||
data-appid="101544135"
|
||||
data-redirecturi="http://www.oricogroup.com/index/customer/save">
|
||||
</script>
|
||||
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$(".accounts").click(function(){
|
||||
$(this).siblings().removeClass("blue");
|
||||
$(this).addClass("blue");
|
||||
$(".content_02").hide();
|
||||
$(".content_01").show();
|
||||
flag = 1;
|
||||
})
|
||||
$(".short_letter").click(function(){
|
||||
$(this).siblings().removeClass("blue");
|
||||
$(this).addClass("blue");
|
||||
$(".content_01").hide();
|
||||
$(".content_02").show();
|
||||
flag = 2;
|
||||
})
|
||||
})
|
||||
function toLogin()
|
||||
{
|
||||
//以下为按钮点击事件的逻辑。注意这里要重新打开窗口
|
||||
//否则后面跳转到QQ登录,授权页面时会直接缩小当前浏览器的窗口,而不是打开新窗口
|
||||
var A=window.open("https://graph.qq.com/oauth2.0/authorize?response_type=code&client_id=101544135&redirect_uri=http://www.orico.com.cn/index/customer/save&scope=get_user_info",'_blank');
|
||||
// var A=window.open("/index/qqlogin/index.html", "location=1");
|
||||
}
|
||||
function toLoginwx()
|
||||
{
|
||||
//以下为按钮点击事件的逻辑。注意这里要重新打开窗口
|
||||
//否则后面跳转到QQ登录,授权页面时会直接缩小当前浏览器的窗口,而不是打开新窗口
|
||||
var A=window.open("https://open.weixin.qq.com/connect/qrconnect?appid=wx979d391fdfb583d1&redirect_uri=http%3a%2f%2fwww.orico.com.cn%2findex%2fcustomer%2fwx_save&response_type=code&scope=snsapi_login&state=wx#wechat_redirect");
|
||||
// var A=window.open("/index/qqlogin/index.html", "location=1");
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<!-- bottom s -->
|
||||
{include file="include/bottom" /}
|
||||
<!-- bottom e -->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<script type="text/javascript">
|
||||
function handle_focus(id)
|
||||
{
|
||||
if (id == 'username')
|
||||
{
|
||||
$('#err_t1').html('');
|
||||
$('#username').css('border', '1px solid #dedfe0');
|
||||
}
|
||||
else if (id == 'telephone')
|
||||
{
|
||||
$('#err_t2').html('');
|
||||
$('#telephone').css('border', '1px solid #dedfe0');
|
||||
}
|
||||
}
|
||||
|
||||
function check_format(id)
|
||||
{
|
||||
if (id == 'username')
|
||||
{
|
||||
var username = $("#username").val();
|
||||
var arg1 = /^1[3456789]\d{9}$/;
|
||||
var arg2 = /^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,})$/;
|
||||
if (username == '')
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!arg1.test(username) && !arg2.test(username))
|
||||
{
|
||||
var html = '<span style="color: red">请检查账号格式</span>';
|
||||
$('#err_t1').html(html);
|
||||
$('#username').css('border', '1px solid red');
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#err_t1').html('');
|
||||
$('#username').css('border', '1px solid #dedfe0');
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if (id == 'telephone')
|
||||
{
|
||||
var telephone = $("#telephone").val();
|
||||
var arg = /^1[3456789]\d{9}$/;
|
||||
if (telephone == '')
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!arg.test(telephone))
|
||||
{
|
||||
var html = '<span style="color: red">请检查手机号格式</span>';
|
||||
$('#err_t2').html(html);
|
||||
$('#telephone').css('border', '1px solid red');
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#err_t2').html('');
|
||||
$('#telephone').css('border', '1px solid #dedfe0');
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
var flag = 1;
|
||||
function login(id)
|
||||
{
|
||||
if (id == 'login_by_username')
|
||||
{
|
||||
var username = $("#username").val();
|
||||
var password = $("#password").val();
|
||||
var data = {
|
||||
username: username,
|
||||
password: password
|
||||
};
|
||||
|
||||
if (!check_format('username'))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if (id == 'login_by_captcha')
|
||||
{
|
||||
var telephone = $("#telephone").val();
|
||||
var captcha = $("#captcha1").val();
|
||||
var data = {
|
||||
telephone: telephone,
|
||||
captcha: captcha
|
||||
};
|
||||
|
||||
if (!check_format('telephone'))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: '/index/customer/new_login',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (res) {
|
||||
if (res.code == 200)
|
||||
{
|
||||
var redirect_uri = '<?php echo $url; ?>';
|
||||
if (redirect_uri != '')
|
||||
{
|
||||
location.href = redirect_uri;
|
||||
}
|
||||
else
|
||||
{
|
||||
location.href = '/index/customer/personal';
|
||||
}
|
||||
}
|
||||
else if (res.code < 0)
|
||||
{
|
||||
if (flag == 1)
|
||||
{
|
||||
var html = '<span style="color: red">' + res.msg + '</span>';
|
||||
$('#err_t1').html(html);
|
||||
}
|
||||
else if (flag == 2)
|
||||
{
|
||||
var html = '<span style="color: red">' + res.msg + '</span>';
|
||||
$('#err_t2').html(html);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var sendsms_flag = 1;
|
||||
function get_captcha(type)
|
||||
{
|
||||
if (type == 'captcha1')
|
||||
{
|
||||
var url = '/index/customer/sendsms';
|
||||
var telephone = $("#telephone").val();
|
||||
var data = {
|
||||
login:1,
|
||||
telephone: telephone
|
||||
};
|
||||
|
||||
if (sendsms_flag == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!check_format('telephone'))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if (type == 'captcha2')
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: url,
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function(data) {
|
||||
if (data.code > 0) {
|
||||
//设置button效果,开始计时
|
||||
curCount = 60;
|
||||
$(".Obtain").attr("disabled", "true");
|
||||
$(".Obtain").html("重新获取" + curCount + "秒");
|
||||
InterValObj = window.setInterval(SetRemainTime, 1000); //启动计时器,1秒执行一次
|
||||
sendsms_flag = 0;
|
||||
setTimeout(function() {
|
||||
sendsms_flag = 1;
|
||||
}, 60000);
|
||||
} else {
|
||||
alert(data.msg);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
function SetRemainTime() {
|
||||
if (curCount < 1) {
|
||||
window.clearInterval(InterValObj); //停止计时器
|
||||
InterValObj = null;
|
||||
$(".Obtain").removeAttr("disabled"); //启用按钮
|
||||
$(".Obtain").html("获取短信验证码");
|
||||
} else {
|
||||
curCount--;
|
||||
$(".Obtain").html("重新获取" + curCount + "秒");
|
||||
}
|
||||
}
|
||||
|
||||
$(document).keyup(function(e) {
|
||||
var code = e.keyCode;
|
||||
if (code == 13)
|
||||
{
|
||||
if (flag == 1)
|
||||
{
|
||||
id = 'login_by_username';
|
||||
}
|
||||
else if (flag == 2)
|
||||
{
|
||||
id = 'login_by_captcha';
|
||||
}
|
||||
login(id);
|
||||
}
|
||||
|
||||
});
|
||||
</script>
|
||||
114
app/index/view/customer/index1.phtml
Executable file
114
app/index/view/customer/index1.phtml
Executable file
@@ -0,0 +1,114 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
{include file="include/head-product" /}
|
||||
<script type="text/javascript">
|
||||
var navID = "1";
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<!--top-->
|
||||
{include file="include/top-product" /}
|
||||
|
||||
<!--top End-->
|
||||
|
||||
<!-- 新闻详情页 s -->
|
||||
<div class="zhuce1">
|
||||
<div class="w1200">
|
||||
<form action="<?php echo url('/index/customer/login'); ?>" method="post" id="login-form">
|
||||
<div class="zctit">
|
||||
<a href="<?php echo url('/login'); ?>" class="zca1">登录</a>
|
||||
<a href="<?php echo url('/register'); ?>" class="zca2">没有账号/快速注册</a>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<ul class="w1000 zclist">
|
||||
<li>
|
||||
<span class="zctext1 zctext1s">用户名:</span>
|
||||
<input type="text" name="firstname" value="" id="firstname">
|
||||
<a href="<?php echo url('/register'); ?>" class="shorzc">快速注册</a>
|
||||
</li>
|
||||
<li>
|
||||
<span class="zctext1 zctext1s">密码:</span>
|
||||
<input type="password" name="password" value="" id="password">
|
||||
<a href="<?php echo url('/forgetpwd'); ?>" class="shorzc">找回密码</a>
|
||||
</li>
|
||||
<li>
|
||||
<span class="zctext1 zctext1s">验证码:</span>
|
||||
<input type="text" name="authcode" value="" class="yzm" id="authcode">
|
||||
<span class="zctext2">输入下图中的字符</span>
|
||||
<p class="yznum yznums">
|
||||
<a href="javascript:void(0);" class="yanzhengma"><img id="yanzhengma" src="<?php echo url('index/authcode/verify', ['id' => 'yanzhengma'], 'png|jpg|gif'); ?>"></a>
|
||||
<a href="javascript:void(0);" class="other yanzhengma">换一个</a>
|
||||
</p>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="tjdl">
|
||||
<input type="checkbox" name="autologin" value="0"><label>自动登录</label>
|
||||
<a href="#" class="tjbtn" id="submit-btn">登录</a>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div class="short">
|
||||
<span>快捷登录:</span>
|
||||
<span onclick='toQzoneLogin()'>QQ登录</span>
|
||||
<script type="text/javascript">
|
||||
var childWindow;
|
||||
function toQzoneLogin()
|
||||
{
|
||||
childWindow = window.open("index/Qqlogin/index","TencentLogin","width=450,height=320,menubar=0,scrollbars=1, resizable=1,status=1,titlebar=0,toolbar=0,location=1");
|
||||
}
|
||||
|
||||
function closeChildWindow()
|
||||
{
|
||||
childWindow.close();
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- 新闻详情页 e -->
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("a.yanzhengma").click(function(event) {
|
||||
event.preventDefault();
|
||||
//$img = $("#authcode");
|
||||
$("#yanzhengma").attr("src", "<?php echo url('index/authcode/verify', ['id' => 'yanzhengma'], 'png|jpg|gif'); ?>" + "?" + Math.random());
|
||||
});
|
||||
$('#login-form').bind('submit', function() {
|
||||
var options = {
|
||||
url: "<?php echo url('/index/customer/login'); ?>",
|
||||
type: "post",
|
||||
cache: false,
|
||||
dataType: "json",
|
||||
data: $(this).serialize(),
|
||||
success: function(data) {
|
||||
if (data.code) {
|
||||
location.href = data.url;
|
||||
} else {
|
||||
alert(data.msg);
|
||||
}
|
||||
},
|
||||
complete: function() {
|
||||
//HideLoading();
|
||||
$("a.yanzhengma").click();
|
||||
}
|
||||
};
|
||||
$.ajax(options);
|
||||
return false;
|
||||
});
|
||||
$("a#submit-btn").click(function(event) {
|
||||
event.preventDefault();
|
||||
$('#login-form').submit();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<!-- QQ快捷登录-->
|
||||
|
||||
<!-- bottom s -->
|
||||
{include file="include/bottom" /}
|
||||
<!-- bottom e -->
|
||||
</body>
|
||||
</html>
|
||||
42
app/index/view/customer/information.phtml
Executable file
42
app/index/view/customer/information.phtml
Executable file
@@ -0,0 +1,42 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
{include file="include/head-product" /}
|
||||
<script type="text/javascript">
|
||||
var navID = "1";
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<!--top-->
|
||||
<header class="header-PC header-Product">
|
||||
<div id="header" class="theme-black">
|
||||
{include file="include/top" /}
|
||||
{include file="include/top-header" /}
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<!--top End-->
|
||||
|
||||
<!-- 新闻详情页 s -->
|
||||
<div class="zhuce1">
|
||||
<div class="w1200">
|
||||
<ul class="w1000 zclist zclist1">
|
||||
<li>
|
||||
<p class="ts3"><?php echo $msg; ?>!</p>
|
||||
<p class="ts4">如果您不能正常登录,请联系在线客服QQ:XXXX 工作时间:09:00--18:00</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 新闻详情页 e -->
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
|
||||
});
|
||||
</script>
|
||||
<!-- bottom s -->
|
||||
{include file="include/bottom2023" /}
|
||||
<!-- bottom e -->
|
||||
</body>
|
||||
</html>
|
||||
231
app/index/view/customer/my_collection.phtml
Executable file
231
app/index/view/customer/my_collection.phtml
Executable file
@@ -0,0 +1,231 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
|
||||
<meta charset="UTF-8">
|
||||
<title>我的收藏</title>
|
||||
{include file="include/head-product" /}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!--top-->
|
||||
<header class="header-PC header-Product">
|
||||
<div id="header" class="theme-black">
|
||||
{include file="include/top" /}
|
||||
{include file="include/top-header" /}
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="swt-Container">
|
||||
<div class="people">
|
||||
<div class="people_title">
|
||||
<ul>
|
||||
<a href="__ORICOROOT__/index/customer/personal"><li>账号管理</li></a>
|
||||
<a href="__ORICOROOT__/index/customer/my_collection"><li class="people_blue">我的收藏</li></a>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="content02">
|
||||
<?php if (!empty($customer_info)): ?>
|
||||
<?php
|
||||
$head_img = $head_img = $customer_info['picture'] != '' ? $customer_info['picture'] : '__PUBLIC__/web/images/customer/logo_small_03.png';
|
||||
?>
|
||||
<div class="people_logo">
|
||||
<div class="left"><img style="border-radius: 50%;" src="<?php echo $head_img; ?>"></div>
|
||||
<div class="right">
|
||||
<div>用户:<?php echo $customer_info['firstname']; ?></div>
|
||||
<!-- <div class="">修改个人信息</div>-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="people_AC">
|
||||
<div class="title link_a">
|
||||
<div class="text-r">
|
||||
<div class="u_admin01 cursor_p"><i class='Batch'>批量管理</i></div>
|
||||
<div class="u_admin02" style="display: none">
|
||||
<i class="cursor_p"><input type="checkbox" class="check" name="check" value="">全选</i>
|
||||
<i class='delete cursor_p'>删除</i>
|
||||
<i class='cancel cursor_p'>取消管理</i>
|
||||
</div>
|
||||
<div class="u_cate">
|
||||
分类:<a class="<?php if ($cid == 0): ?> f_blue <?php endif; ?>" href="/index/customer/my_collection">全部</a>
|
||||
<?php if (!empty($productCategory)): ?>
|
||||
<?php foreach($productCategory as $key => $value): ?>
|
||||
<a class="<?php if ($cid == $value['id']): ?> f_blue <?php endif; ?>" href="/index/customer/my_collection/cid/<?php echo $value['id']; ?>"><?php echo $value['name']; ?> </a>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="u_product">
|
||||
<?php if (!empty($list)): ?>
|
||||
|
||||
<?php foreach($list as $key => $value): ?>
|
||||
<ul>
|
||||
<li class="d_product">
|
||||
<div class="position-r" >
|
||||
<div class="check_B position-a" style="display: none;"><input id="" name="check_box" type="checkbox" class="check_box" value="<?php echo $value['id']; ?>"><label></label></div>
|
||||
<a href="/product/detail/<?php echo $value['id']; ?>.html">
|
||||
<img src="<?php echo $value['product_two_img']; ?>">
|
||||
</a>
|
||||
<div product_id="<?php echo $value['id']; ?>" class="delete_product u_del s_del" style="display: none"><img src="__PUBLIC__/web/images/customer/del.jpg" class="cursor_p"></div>
|
||||
<div class="del_alert" style="display: none;">
|
||||
<p>确定删除?</p>
|
||||
<span class="bg_red cursor_p">确定</span>
|
||||
<span class="bg_gray cursor_p">取消</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<a href="/product/detail/<?php echo $value['id']; ?>.html">
|
||||
<p><?php echo $value['name']?></p>
|
||||
<p><?php echo $value['brand_id']; ?></p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
<?php endforeach; ?>
|
||||
<?php else: ?>
|
||||
<div class="u_product text-c" style="line-height: 300px;" >您还未收藏任何产品</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
if ($page)
|
||||
{
|
||||
echo $page;
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="all_del" style="display: none">
|
||||
<div class="all_delect">
|
||||
<p>确定删除?</p>
|
||||
<span class="bg_red cursor_p">确定</span>
|
||||
<span class="bg_gray cursor_p">取消</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="application/javascript">
|
||||
|
||||
/*修改*/
|
||||
$(document).ready(function(){
|
||||
$(".u_before .right").click(function(){
|
||||
$(this).parents(".u_before").hide();
|
||||
$(this).parents(".u_before").next().show();
|
||||
})
|
||||
$(".u_after .u_button_gray").click(function(){
|
||||
$(this).parents(".u_after").hide();
|
||||
$(this).parents(".u_after").prev().show();
|
||||
})
|
||||
})
|
||||
/*批量管理*/
|
||||
$(document).ready(function(){
|
||||
$(".u_admin01 .Batch").click(function(){
|
||||
$(".u_admin01").hide();
|
||||
$(".u_admin02").show();
|
||||
$(".u_product .check_B").show();
|
||||
$(".u_product .s_del").removeClass('u_del');
|
||||
});
|
||||
$(".u_admin02 .cancel").click(function(){
|
||||
$(".u_admin02").hide();
|
||||
$(".u_admin01").show();
|
||||
$(".u_product .check_B").hide();
|
||||
$(".u_product .s_del").addClass('u_del');
|
||||
});
|
||||
})
|
||||
|
||||
/*全选*/
|
||||
$(document).ready(function(){
|
||||
$(".u_admin02 input[name='check']").click(function(){
|
||||
if($(this).is(":checked")){
|
||||
$(".u_product input[type='checkbox']").prop("checked",true);
|
||||
}else{
|
||||
$(".u_product input[type='checkbox']").prop("checked",false);
|
||||
}
|
||||
})
|
||||
});
|
||||
/*删除*/
|
||||
$(document).ready(function(){
|
||||
$(".d_product").mouseover(function(){
|
||||
$(this).find(".u_del").show();
|
||||
})
|
||||
$(".d_product").mouseleave(function(){
|
||||
$(this).find(".u_del").hide();
|
||||
})
|
||||
|
||||
});
|
||||
/*删除*/
|
||||
$(document).ready(function(){
|
||||
$(".u_del").click(function(){
|
||||
$(this).next(".del_alert").show();
|
||||
})
|
||||
$(".del_alert .bg_gray").click(function(){
|
||||
|
||||
$(this).parent(".del_alert").hide();
|
||||
})
|
||||
$(".del_alert .bg_red").click(function(){
|
||||
var product_id = $(this).parents('.del_alert').prev('.delete_product').attr('product_id');
|
||||
cancel_collection(product_id);
|
||||
$(this).parents(".d_product").remove();
|
||||
})
|
||||
});
|
||||
|
||||
/*批量管量*/
|
||||
var checked = [];
|
||||
$(document).ready(function(){
|
||||
$(".delete").click(function(){
|
||||
$('input[name="check_box"]:checked').each(function() {
|
||||
checked.push($(this).val());
|
||||
});
|
||||
$(".all_del").show();
|
||||
});
|
||||
$(".all_delect .bg_gray").click(function(){
|
||||
$(".all_del").hide();
|
||||
checked = [];
|
||||
});
|
||||
$(".all_delect .bg_red").click(function(){
|
||||
var product_ids = checked;
|
||||
cancel_collection(product_ids, 1);
|
||||
})
|
||||
});
|
||||
</script>
|
||||
<!-- bottom s -->
|
||||
{include file="include/bottom2023" /}
|
||||
<!-- bottom e -->
|
||||
</body>
|
||||
</html>
|
||||
<script type="text/javascript">
|
||||
function cancel_collection(product_id, type=0)
|
||||
{
|
||||
if (product_id == '')
|
||||
{
|
||||
alert('请先选择产品');
|
||||
$(".all_del").hide();
|
||||
return;
|
||||
}
|
||||
|
||||
var data = {
|
||||
type: 1,
|
||||
coll_id: product_id
|
||||
};
|
||||
|
||||
$.ajax({
|
||||
url: '/index/collection/cancel_collection',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (res) {
|
||||
if (type == 1)
|
||||
{
|
||||
location.reload();
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
486
app/index/view/customer/personal.phtml
Executable file
486
app/index/view/customer/personal.phtml
Executable file
@@ -0,0 +1,486 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
|
||||
<meta charset="UTF-8">
|
||||
<title>个人中心</title>
|
||||
{include file="include/head-product" /}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!--top-->
|
||||
<header class="header-PC header-Product">
|
||||
<div id="header" class="theme-black">
|
||||
{include file="include/top" /}
|
||||
{include file="include/top-header" /}
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="swt-Container">
|
||||
<div class="people">
|
||||
<div class="people_title">
|
||||
<ul>
|
||||
<a href="__ORICOROOT__/index/customer/personal.html"><li class="people_blue">账号管理</li></a>
|
||||
<a href="__ORICOROOT__/index/customer/my_collection.html"><li>我的收藏</li></a>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="content01">
|
||||
<?php if (!empty($customer_info)): ?>
|
||||
<?php
|
||||
$head_img = $customer_info['picture'] != '' ? $customer_info['picture'] : '__PUBLIC__/web/images/customer/logo_small_03.png';
|
||||
?>
|
||||
<div class="people_logo">
|
||||
<div class="left"><img style="border-radius: 50%;" src="<?php echo $head_img; ?>"></div>
|
||||
<div class="right">
|
||||
<div>用户:<?php echo $customer_info['firstname']; ?></div>
|
||||
<!--<div class="">修改个人信息</div>-->
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="people_AC">
|
||||
<div class="title"><span class="text-l">帐号安全</span></div>
|
||||
<?php if (!empty($customer_info)): ?>
|
||||
<ul>
|
||||
<li>
|
||||
<div class="u_before">
|
||||
<div class="left">密码</div>
|
||||
<div class="right text-r cursor_p">修改密码</div>
|
||||
</div>
|
||||
<div class="u_after b_bottom" style="display: none;">
|
||||
<?php if ($customer_info['have_pwd']): ?>
|
||||
<div class="m-bottom"><label>旧密码</label><input id="old_pwd" onfocus="hide_err('old_pwd')" class="form-control input_class" type="password"><div id="err_oldpwd" class="Obtain font-red"></div></div>
|
||||
<?php endif; ?>
|
||||
<div class="m-bottom"><label>新密码</label><input onfocus="hide_err('new_pwd')" onblur="check_format('password')" id="password" class="form-control input_class" type="password"><div id="err_pwd" class="Obtain font-red"></div></div>
|
||||
<div class="m-bottom"><label>确认密码</label><input onfocus="hide_err('re_pwd')" onblur="check_format('re_password')" id="re_password" class="form-control input_class" type="password"><div id="err_repwd" class="Obtain font-red"></div></div>
|
||||
<div class="u_button"><a class="u_button_blue" onclick="update_pwd()">确认</a><a class="u_button_gray">取消</a><a href="__ORICOROOT__/forgetpwd"><span class="forget_button f_blue">忘记密码</span></a></div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="u_before">
|
||||
<div class="left">邮箱</div>
|
||||
<?php if ($customer_info['email'] == ''): ?>
|
||||
<div class="center"><strong>未绑定邮箱</strong><br>绑定后可通过邮箱登录</div>
|
||||
<div class="right text-r cursor_p">绑定邮箱</div>
|
||||
<?php else: ?>
|
||||
<div class="center"><strong><?php echo $customer_info['email']; ?></strong><br>可通过邮箱登录</div>
|
||||
<div class="right text-r cursor_p">修改邮箱</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="u_after b_bottom b_top p-top" style="display: none;">
|
||||
<div class="m-bottom"><label>邮箱</label><input onfocus="hide_err('email')" id="email" class="form-control input_class" type="text"><div id="err_email" class="Obtain font-red"></div></div>
|
||||
<div class="u_button"><a onclick="bind_email()" class="u_button_blue">确认</a><a class="u_button_gray">取消</a></div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="u_before">
|
||||
<div class="left">手机号码</div>
|
||||
<div class="center"><strong><?php echo $customer_info['telephone']; ?></strong><br>已验证,可通过手机找回密码</div>
|
||||
<div id="update_tel" class="right text-r cursor_p">修改手机号</div>
|
||||
</div>
|
||||
<div class="u_after b_top p-top" style="display: none;">
|
||||
<div class="m-bottom"><label>旧手机号</label><input onfocus="hide_err('old_tel')" onblur="check_format('old_tel')" id="old_tel" class="form-control input_class" type="text"><div id="err_oldtel" class="Obtain font-red"></div></div>
|
||||
<div class="m-bottom"><label>新手机号</label><input onfocus="hide_err('new_tel')" onblur="check_format('new_tel')" id="new_tel" class="form-control input_class" type="text"><div id="err_newtel" class="Obtain font-red"></div></div>
|
||||
<div class="m-bottom"><label>验证码</label><input class="form-control input_class" type="text" id="captcha3"><div class="Obtain f_blue get_new_captcha cursor_p" onclick="get_captcha('captcha3')">获取验证码</div></div>
|
||||
<div class="u_button"><a onclick="update_tel()" class="u_button_blue">确认</a><a class="u_button_gray">取消</a></div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="application/javascript">
|
||||
|
||||
/*修改*/
|
||||
$(document).ready(function(){
|
||||
$(".u_before .right").click(function(){
|
||||
$(this).parents(".u_before").hide();
|
||||
$(this).parents(".u_before").next().show();
|
||||
})
|
||||
$(".u_after .u_button_gray").click(function(){
|
||||
$(this).parents(".u_after").hide();
|
||||
$(this).parents(".u_after").prev().show();
|
||||
// hide_err('old_pwd');
|
||||
// hide_err('new_pwd');
|
||||
// hide_err('re_pwd');
|
||||
// hide_err('email');
|
||||
// hide_err('old_tel');
|
||||
// hide_err('new_tel');
|
||||
})
|
||||
})
|
||||
/*批量管理*/
|
||||
$(document).ready(function(){
|
||||
$(".u_admin01 .Batch").click(function(){
|
||||
$(".u_admin01").hide();
|
||||
$(".u_admin02").show();
|
||||
$(".u_product .check_B").html('<div class="check_B position-a"><input id="" type="checkbox" class="check_box"><label></label></div>');
|
||||
});
|
||||
$(".u_admin02 .cancel").click(function(){
|
||||
$(".u_admin02").hide();
|
||||
$(".u_admin01").show();
|
||||
$(".u_product .check_B").html('');
|
||||
});
|
||||
})
|
||||
|
||||
/*全选*/
|
||||
$(document).ready(function(){
|
||||
$(".u_admin02 input[name='check']").click(function(){
|
||||
if($(this).is(":checked")){
|
||||
$(".u_product input[type='checkbox']").prop("checked",true);
|
||||
}else{
|
||||
$(".u_product input[type='checkbox']").prop("checked",false);
|
||||
}
|
||||
})
|
||||
});
|
||||
</script>
|
||||
<!-- bottom s -->
|
||||
{include file="include/bottom2023" /}
|
||||
<!-- bottom e -->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<script type="text/javascript">
|
||||
function check_format(id)
|
||||
{
|
||||
if (id == 'password')
|
||||
{
|
||||
var re_password = $("#re_password").val();
|
||||
if (re_password != '')
|
||||
{
|
||||
check_format('re_password');
|
||||
}
|
||||
|
||||
var password = $("#password").val();
|
||||
var arg = /^(?![a-zA-z]+$)(?!\d+$)(?![!@#$%^&*-.]+$)[a-zA-Z\d!@#$%^&*-.]{8,20}$/;
|
||||
if (!arg.test(password))
|
||||
{
|
||||
var html = '密码必须包含8-20个字符,且至少包含两种类型字符';
|
||||
show_err('new_pwd', html);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
hide_err('new_pwd');
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
else if (id == 're_password')
|
||||
{
|
||||
var password = $("#password").val();
|
||||
var re_password = $("#re_password").val();
|
||||
if (password != re_password)
|
||||
{
|
||||
var html = '两次密码不一致';
|
||||
show_err('re_pwd', html);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
hide_err('re_pwd');
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
else if (id == 'new_tel')
|
||||
{
|
||||
var new_tel = $("#new_tel").val();
|
||||
var arg = /^1[3456789]\d{9}$/;
|
||||
if (!arg.test(new_tel))
|
||||
{
|
||||
var html = '请检查手机号格式';
|
||||
show_err('new_tel', html);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
hide_err('new_tel');
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if (id == 'old_tel')
|
||||
{
|
||||
var old_tel = $("#old_tel").val();
|
||||
var arg = /^1[3456789]\d{9}$/;
|
||||
if (!arg.test(old_tel))
|
||||
{
|
||||
var html = '请检查手机号格式';
|
||||
show_err('old_tel', html);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
hide_err('old_tel');
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if (id == 'email')
|
||||
{
|
||||
var email = $("#email").val();
|
||||
var arg = /^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,})$/;
|
||||
if (!arg.test(email))
|
||||
{
|
||||
var html = '请检查邮箱格式';
|
||||
show_err('email', html);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
hide_err('email');
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function update_pwd()
|
||||
{
|
||||
var old_pwd = $("#old_pwd").val();
|
||||
var password = $("#password").val();
|
||||
|
||||
var data = {
|
||||
old_password: old_pwd,
|
||||
password: password,
|
||||
};
|
||||
|
||||
if (!check_format('password') || !check_format('re_password'))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: '/index/customer/update_pwd',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (res) {
|
||||
if (res.code == 200)
|
||||
{
|
||||
alert(res.msg);
|
||||
location.reload();
|
||||
}
|
||||
else if (res.code == -2)
|
||||
{
|
||||
var html = res.msg;
|
||||
show_err('old_pwd');
|
||||
}
|
||||
else
|
||||
{
|
||||
alert(res.msg);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function bind_email()
|
||||
{
|
||||
var email = $("#email").val();
|
||||
var data = {
|
||||
email: email
|
||||
};
|
||||
if (!check_format('email'))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: '/index/customer/bind_email',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (res) {
|
||||
if (res.code == 200)
|
||||
{
|
||||
alert(res.msg);
|
||||
location.reload();
|
||||
}
|
||||
else if (res.code < 0)
|
||||
{
|
||||
var html = res.msg;
|
||||
show_err('email', html);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function update_tel()
|
||||
{
|
||||
var old_tel = $("#old_tel").val();
|
||||
var new_tel = $("#new_tel").val();
|
||||
var captcha = $("#captcha3").val();
|
||||
|
||||
var data = {
|
||||
old_telephone: old_tel,
|
||||
new_telephone: new_tel,
|
||||
captcha: captcha
|
||||
};
|
||||
|
||||
if (!check_format('new_tel') || !check_format('old_tel'))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: '/index/customer/update_tel',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (res) {
|
||||
if (res.code == 200)
|
||||
{
|
||||
alert(res.msg);
|
||||
location.reload();
|
||||
}
|
||||
else if (res.code == -2)
|
||||
{
|
||||
var html = res.msg;
|
||||
show_err('old_tel', html);
|
||||
}
|
||||
else
|
||||
{
|
||||
alert(res.msg);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
var sendsms_flag = 1;
|
||||
function get_captcha(id)
|
||||
{
|
||||
if (id == 'captcha1')
|
||||
{
|
||||
var telephone = '<?php echo $customer_info['telephone']; ?>';
|
||||
}
|
||||
else if (id == 'captcha3')
|
||||
{
|
||||
var telephone = $("#new_tel").val();
|
||||
if (!check_format('new_tel'))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (sendsms_flag == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var data = {
|
||||
telephone: telephone
|
||||
};
|
||||
|
||||
$.ajax({
|
||||
url: '/index/customer/sendsms',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function(data) {
|
||||
if (data.code) {
|
||||
//设置button效果,开始计时
|
||||
curCount = 60;
|
||||
$(".get_new_captcha").attr("disabled", "true");
|
||||
$(".get_new_captcha").html("重新获取" + curCount + "秒");
|
||||
InterValObj = window.setInterval(SetRemainTime, 1000); //启动计时器,1秒执行一次
|
||||
sendsms_flag = 0;
|
||||
setTimeout(function() {
|
||||
sendsms_flag = 1;
|
||||
}, 60000);
|
||||
} else {
|
||||
alert(data.msg);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
function SetRemainTime() {
|
||||
if (curCount < 1) {
|
||||
window.clearInterval(InterValObj); //停止计时器
|
||||
InterValObj = null;
|
||||
$(".get_new_captcha").removeAttr("disabled"); //启用按钮
|
||||
$(".get_new_captcha").html("获取短信验证码");
|
||||
} else {
|
||||
curCount--;
|
||||
$(".get_new_captcha").html("重新获取" + curCount + "秒");
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
function hide_err(id)
|
||||
{
|
||||
if (id == 'old_pwd')
|
||||
{
|
||||
$('#err_oldpwd').html('');
|
||||
$('#old_pwd').css('border', '1px solid #dedfe0');
|
||||
}
|
||||
else if (id == 'new_pwd')
|
||||
{
|
||||
$('#err_pwd').html('');
|
||||
$('#password').css('border', '1px solid #dedfe0');
|
||||
}
|
||||
else if (id == 're_pwd')
|
||||
{
|
||||
$('#err_repwd').html('');
|
||||
$('#re_password').css('border', '1px solid #dedfe0');
|
||||
}
|
||||
else if (id == 'email')
|
||||
{
|
||||
$('#err_email').html('');
|
||||
$('#email').css('border', '1px solid #dedfe0');
|
||||
}
|
||||
else if (id == 'old_tel')
|
||||
{
|
||||
$('#err_oldtel').html('');
|
||||
$('#old_tel').css('border', '1px solid #dedfe0');
|
||||
}
|
||||
else if (id == 'new_tel')
|
||||
{
|
||||
$('#err_newtel').html('');
|
||||
$('#new_tel').css('border', '1px solid #dedfe0');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function show_err(id, html)
|
||||
{
|
||||
if (id == 'old_pwd')
|
||||
{
|
||||
$('#err_oldpwd').html(html);
|
||||
$('#old_pwd').css('border', '1px solid red');
|
||||
}
|
||||
else if (id == 'new_pwd')
|
||||
{
|
||||
$('#err_pwd').html(html);
|
||||
$('#password').css('border', '1px solid red');
|
||||
}
|
||||
else if (id == 're_pwd')
|
||||
{
|
||||
$('#err_repwd').html(html);
|
||||
$('#re_password').css('border', '1px solid red');
|
||||
}
|
||||
else if (id == 'email')
|
||||
{
|
||||
$('#err_email').html(html);
|
||||
$('#email').css('border', '1px solid red');
|
||||
}
|
||||
else if (id == 'old_tel')
|
||||
{
|
||||
$('#err_oldtel').html(html);
|
||||
$('#old_tel').css('border', '1px solid red');
|
||||
}
|
||||
else if (id == 'new_tel')
|
||||
{
|
||||
$('#err_newtel').html(html);
|
||||
$('#new_tel').css('border', '1px solid red');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
254
app/index/view/customer/register.phtml
Executable file
254
app/index/view/customer/register.phtml
Executable file
@@ -0,0 +1,254 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
{include file="include/head-product" /}
|
||||
<script type="text/javascript">
|
||||
var navID = "1";
|
||||
</script>
|
||||
</head>
|
||||
<body class="bg-gray">
|
||||
<!-- 注册 -->
|
||||
<div class="login" style="margin-top:186px;">
|
||||
<div class="swt-Container">
|
||||
<div class="login_content_register">
|
||||
<div class="text-c" style="margin-bottom: 2vw"><a href="__ORICOROOT__"><img src="/uploads/default/logo-black.png"></a></div>
|
||||
<div class="title text-c">
|
||||
<!-- <span class="accounts blue cursor_p">手机注册</span> -->
|
||||
<!--<ul>
|
||||
<li class="accounts blue cursor_p">手机注册</li>
|
||||
<li class="short_letter cursor_p">邮箱注册</li>
|
||||
</ul>-->
|
||||
</div>
|
||||
<div class="content content_01">
|
||||
<li class="margin-b-7"><input type="text" value="" onclick="handle_focus('telephone')" onblur="check_format('telephone')" id="telephone" placeholder="请输入手机号码"></li>
|
||||
<li class="margin-b-7"><input type="text" value="" id="captcha1" placeholder="请输入验证码">
|
||||
<button class="Obtain cursor_pcursor_p" onclick="get_captcha('captcha1')">获取验证码</button>
|
||||
</li>
|
||||
<div id="err_tel"></div>
|
||||
</div>
|
||||
<div class="content content_02" style="display: none;">
|
||||
<li class="margin-b-7"><input type="text" value="" id="email" placeholder="请输入邮箱"></li>
|
||||
<li class="margin-b-7"><input type="text" value="" id="captcha2" placeholder="请输入验证码">
|
||||
<div class="Obtain cursor_p" onclick="get_captcha('captcha2')">获取验证码</div>
|
||||
</li>
|
||||
</div>
|
||||
|
||||
<div class="tjdl">
|
||||
<button class="tjbtn" onclick="register()">注册</button>
|
||||
</div>
|
||||
<div class="Register text-r">
|
||||
<a href="login.html" class="f_blue">立即登录</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-c login_bottom">2015 ORICO Technologies Co.,Ltd 版权所有(<a target="_blank" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=44030702002297" >粤ICP备15025109号-3</a>)
|
||||
<p> <a target="_blank" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=44030702002297" ><img src=""/>粤公网安备 44030702002297号 <img src="__PUBLIC__/web/images/orico_co_icon.png" style="vertical-align: middle;"></a></p>
|
||||
</div>
|
||||
<!-- 注册 e -->
|
||||
|
||||
<!-- bottom s -->
|
||||
<!-- bottom e -->
|
||||
</body>
|
||||
</html>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$(".accounts").click(function(){
|
||||
$(this).siblings().removeClass("blue");
|
||||
$(this).addClass("blue");
|
||||
$(".content_02").hide();
|
||||
$(".content_01").show();
|
||||
})
|
||||
$(".short_letter").click(function(){
|
||||
$(this).siblings().removeClass("blue");
|
||||
$(this).addClass("blue");
|
||||
$(".content_01").hide();
|
||||
$(".content_02").show();
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
function isNull(data) {
|
||||
return (data == "" || data == undefined || data == null) ? true : false;
|
||||
}
|
||||
function trim(str) {
|
||||
return str.replace(/(^\s*)|(\s*$)/g, '');
|
||||
}
|
||||
|
||||
function validEmail(email) {
|
||||
//对电子邮件的验证
|
||||
var reg = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;
|
||||
return reg.test(email);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
function handle_focus(id)
|
||||
{
|
||||
if (id == 'telephone')
|
||||
{
|
||||
$('#telephone').css('border', '1px solid #dedfe0');
|
||||
$('#err_tel').html('');
|
||||
}
|
||||
}
|
||||
|
||||
function check_format(id)
|
||||
{
|
||||
if (id == 'telephone')
|
||||
{
|
||||
var telephone = $("#telephone").val();
|
||||
var arg = /^1[3456789]\d{9}$/;
|
||||
if (!arg.test(telephone))
|
||||
{
|
||||
var html = '<span style="color: red">请检查手机号格式</span>';
|
||||
$('#err_tel').html(html);
|
||||
$('#telephone').css('border', '1px solid red');
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#telephone').css('border', '1px solid #dedfe0');
|
||||
$('#err_tel').html('');
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function register()
|
||||
{
|
||||
var telephone = $("#telephone").val();
|
||||
var email = $("#email").val();
|
||||
var flag = 0; // 标记手机还是邮箱注册
|
||||
if (telephone)
|
||||
{
|
||||
var captcha = $("#captcha1").val();
|
||||
data = {
|
||||
telephone: telephone,
|
||||
captcha: captcha
|
||||
};
|
||||
flag = 1;
|
||||
}
|
||||
else if (email)
|
||||
{
|
||||
var captcha = $("#captcha2").val();
|
||||
data = {
|
||||
email: email,
|
||||
captcha: captcha
|
||||
};
|
||||
flag = 2;
|
||||
alert('邮箱注册暂不可用');
|
||||
return;
|
||||
}
|
||||
|
||||
if (!check_format('telephone'))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: '/index/customer/new_register',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function(res) {
|
||||
if (res.code == 200)
|
||||
{
|
||||
location.href = '/index/customer/personal';
|
||||
}
|
||||
if (res.code < 0)
|
||||
{
|
||||
if (flag == 1)
|
||||
{
|
||||
var html = '<span style="color: red">' + res.msg + '</span>';
|
||||
$('#err_tel').html(html);
|
||||
}
|
||||
else if (flag == 2)
|
||||
{
|
||||
var html = '<span style="color: red">' + res.msg + '</span>';
|
||||
$('#err_tel').html(html);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
var sendsms_flag = 1;
|
||||
function get_captcha(type)
|
||||
{
|
||||
if (type == 'captcha1')
|
||||
{
|
||||
var url = '/index/customer/sendsms';
|
||||
var telephone = $("#telephone").val();
|
||||
var data = {
|
||||
register: 1,
|
||||
telephone: telephone
|
||||
};
|
||||
|
||||
if (sendsms_flag == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!check_format('telephone'))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if (type == 'captcha2')
|
||||
{
|
||||
alert('邮箱注册暂不可用');
|
||||
return;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: url,
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function(data) {
|
||||
if (data.code > 0) {
|
||||
//设置button效果,开始计时
|
||||
curCount = 60;
|
||||
$(".Obtain").attr("disabled", "true");
|
||||
$(".Obtain").html("重新获取" + curCount + "秒");
|
||||
InterValObj = window.setInterval(SetRemainTime, 1000); //启动计时器,1秒执行一次
|
||||
sendsms_flag = 0;
|
||||
setTimeout(function() {
|
||||
sendsms_flag = 1;
|
||||
}, 60000);
|
||||
} else {
|
||||
alert(data.msg);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
function SetRemainTime() {
|
||||
if (curCount < 1) {
|
||||
window.clearInterval(InterValObj); //停止计时器
|
||||
InterValObj = null;
|
||||
$(".Obtain").removeAttr("disabled"); //启用按钮
|
||||
$(".Obtain").html("获取短信验证码");
|
||||
} else {
|
||||
curCount--;
|
||||
$(".Obtain").html("重新获取" + curCount + "秒");
|
||||
}
|
||||
}
|
||||
|
||||
$(document).keyup(function(e) {
|
||||
var code = e.keyCode;
|
||||
if (code == 13)
|
||||
{
|
||||
register();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
44
app/index/view/customer/regsuccess.phtml
Executable file
44
app/index/view/customer/regsuccess.phtml
Executable file
@@ -0,0 +1,44 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
{include file="include/head-product" /}
|
||||
<script type="text/javascript">
|
||||
var navID = "1";
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<!--top-->
|
||||
<header class="header-PC header-Product">
|
||||
<div id="header" class="theme-black">
|
||||
{include file="include/top" /}
|
||||
{include file="include/top-header" /}
|
||||
</div>
|
||||
</header>
|
||||
<!--top End-->
|
||||
|
||||
<!-- 新闻详情页 s -->
|
||||
<div class="zhuce1">
|
||||
<div class="w1200">
|
||||
|
||||
<ul class="w1000 zclist zclist1">
|
||||
|
||||
<li>
|
||||
<p class="ts3">注册成功!请检查邮箱激活邮件...,如果没有收到邮件请注意查看拦截的邮件</p>
|
||||
<p class="ts4">如果您查看拦截邮件还是没收到激活邮件,请联系在线客服QQ:XXXX 工作时间:09:00--18:00</p>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- 新闻详情页 e -->
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
|
||||
});
|
||||
</script>
|
||||
<!-- bottom s -->
|
||||
{include file="include/bottom2023" /}
|
||||
<!-- bottom e -->
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user