init
This commit is contained in:
163
app/us/view/customer/activation.phtml
Executable file
163
app/us/view/customer/activation.phtml
Executable file
@@ -0,0 +1,163 @@
|
||||
<!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">
|
||||
<header class="header-PC header-Index">
|
||||
<div id="header" class="theme-white">
|
||||
{include file="include/top" /}
|
||||
{include file="include/top-header" /}
|
||||
</div>
|
||||
</header>
|
||||
{include file="include/top-header-mobile" /}
|
||||
<div class="Swt-Banner position-r">
|
||||
<img src="__PUBLIC__/weben/images/customer/activate.jpg" alt=""/>
|
||||
<div class="text-c position-a f-White activation_all">
|
||||
|
||||
<p class="font-28">Activate your account</p>
|
||||
|
||||
<p class="font-11">We’re excited to have you with us!</p>
|
||||
|
||||
<p class="font-11">We have sent an Activation Email to below Email address.</p>
|
||||
|
||||
<p class="font-11">Please open the mail to complete registration.</p>
|
||||
<p class="font-11"><?php echo $email; ?></p>
|
||||
|
||||
<span class="cursor_p"><p class="activation font-11" onclick="register()" id="btn_send" >Resend the Email</p></span>
|
||||
</div>
|
||||
|
||||
<div class="text-c activation_bottom" style="position: fixed; bottom: 2vw;">2015 ORICO Technologies Co.,Ltd copyright(<a target="_blank" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=44030702002297" >GuangDong ICP No. 15,025,109</a>)</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
function register()
|
||||
{
|
||||
var time = 10;
|
||||
|
||||
var email = '<?php echo isset($email) ? $email : ''; ?>';
|
||||
var arg = /^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,})$/;
|
||||
if (!arg.test(email))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var data = {
|
||||
email: email,
|
||||
re_send: 1
|
||||
};
|
||||
$.ajax({
|
||||
url: '/us/customer/new_register',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function(res) {
|
||||
if (res.code == 200)
|
||||
{
|
||||
var timer = setInterval(function () {
|
||||
if(time == 0){
|
||||
location.href = '/us/customer/activation.html?email=' + email;
|
||||
clearInterval(timer);
|
||||
}else {
|
||||
//$("#btn_send").html(time+"S");
|
||||
$("#btn_send").hide();
|
||||
time--;
|
||||
}
|
||||
},1000);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
alert(res.msg);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
/*头部菜单栏*/
|
||||
$( function () {
|
||||
|
||||
var $category = $( ".navlist" );
|
||||
$category.hide();
|
||||
$( ".navul li" ).mouseleave( function () {
|
||||
$( this ).children( "a" ).addClass( "aons" );
|
||||
$( ".nav" ).removeAttr("style");
|
||||
$( ".navlist_c" ).removeAttr("style");
|
||||
$( ".navul" ).find( "a" ).removeClass("menu_a");
|
||||
$( this ).find("span").removeClass("arrow-down");
|
||||
$(".all-logo").show();
|
||||
$(".all-logo-black").hide();
|
||||
//$( this ).children( "dl" ).stop( true, true ).slideUp( 500 );
|
||||
$( this ).children( "dl" ).stop().slideUp( 500 );
|
||||
|
||||
} );
|
||||
$( ".navul li" ).mouseenter( function () {
|
||||
$category.hide();
|
||||
$( ".nav" ).css("background-color", "#FFFFFF");
|
||||
$( ".navul" ).find( "a" ).addClass("menu_a");
|
||||
$(this).find("span").addClass("arrow-down");
|
||||
$(".all-logo").hide();
|
||||
$(".all-logo-black").show();
|
||||
//$( this ).children( "dl" ).stop( true, true ).slideDown( 500 );
|
||||
$( this ).children( "dl" ).stop().slideDown( 500 );
|
||||
} );
|
||||
//搜索框
|
||||
$( ".top-R span" ).click( function () {
|
||||
$( ".search" ).slideToggle();
|
||||
} );
|
||||
// 城市
|
||||
$( ".zg" ).click( function () {
|
||||
$( ".topnav" ).slideToggle(500);
|
||||
} );
|
||||
|
||||
$(".icon-close").click(function(){
|
||||
$( ".topnav" ).slideUp(500);
|
||||
})
|
||||
|
||||
} );
|
||||
/*底部菜单弹出*/
|
||||
var body_width = $(window).width();
|
||||
if(body_width < 767){
|
||||
$(function(){
|
||||
$(".footl dt").click(function(){
|
||||
$(this).nextAll().toggle(500);
|
||||
$(this).children("span").toggleClass( "arrow-r" )
|
||||
}).mouseout(function(){
|
||||
$(".bottom_cn_box").hide();
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
/*新导航*/
|
||||
$(function(){
|
||||
$(".ca_lists").mouseover(function(){
|
||||
$(this).addClass('on').siblings().removeClass('on');
|
||||
$(this).siblings().children('div').hide();
|
||||
$(this).children('div').show();
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
167
app/us/view/customer/activation20191114.phtml
Executable file
167
app/us/view/customer/activation20191114.phtml
Executable file
@@ -0,0 +1,167 @@
|
||||
<!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">
|
||||
<header class="header-PC header-Index">
|
||||
<div id="header" class="theme-white">
|
||||
{include file="include/top" /}
|
||||
{include file="include/top-header" /}
|
||||
</div>
|
||||
</header>
|
||||
{include file="include/top-header-mobile" /}
|
||||
<div class="Swt-Banner position-r">
|
||||
<img src="__PUBLIC__/weben/images/customer/activate.jpg" alt=""/>
|
||||
<div class="text-c position-a f-White activation_all">
|
||||
|
||||
<p class="font-28">Activate your account</p>
|
||||
|
||||
<p class="font-11">We’re excited to have you with us!</p>
|
||||
|
||||
<p class="font-11">We have sent an Activation Email to below Email address.</p>
|
||||
|
||||
<p class="font-11">Please open the mail to complete registration.</p>
|
||||
<p class="font-11"><?php echo $email; ?></p>
|
||||
|
||||
<span class="cursor_p"><p class="activation font-11" onclick="register()">Resend the Email</p></span>
|
||||
</div>
|
||||
|
||||
<div class="text-c activation_bottom" style="position: fixed; bottom: 2vw;">2015 ORICO Technologies Co.,Ltd copyright(<a target="_blank" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=44030702002297" >GuangDong ICP No. 15,025,109</a>)</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- 注册 -->
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- 注册 e -->
|
||||
|
||||
<!-- 新闻详情页 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">
|
||||
function register()
|
||||
{
|
||||
var email = '<?php echo isset($email) ? $email : ''; ?>';
|
||||
var arg = /^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,})$/;
|
||||
if (!arg.test(email))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var data = {
|
||||
email: email,
|
||||
re_send: 1
|
||||
};
|
||||
$.ajax({
|
||||
url: '/us/customer/new_register',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function(res) {
|
||||
if (res.code == 200)
|
||||
{
|
||||
location.href = '/us/customer/activation.html?email=' + email;
|
||||
}
|
||||
else
|
||||
{
|
||||
alert(res.msg);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
/*头部菜单栏*/
|
||||
$( function () {
|
||||
|
||||
var $category = $( ".navlist" );
|
||||
$category.hide();
|
||||
$( ".navul li" ).mouseleave( function () {
|
||||
$( this ).children( "a" ).addClass( "aons" );
|
||||
$( ".nav" ).removeAttr("style");
|
||||
$( ".navlist_c" ).removeAttr("style");
|
||||
$( ".navul" ).find( "a" ).removeClass("menu_a");
|
||||
$( this ).find("span").removeClass("arrow-down");
|
||||
$(".all-logo").show();
|
||||
$(".all-logo-black").hide();
|
||||
//$( this ).children( "dl" ).stop( true, true ).slideUp( 500 );
|
||||
$( this ).children( "dl" ).stop().slideUp( 500 );
|
||||
|
||||
} );
|
||||
$( ".navul li" ).mouseenter( function () {
|
||||
$category.hide();
|
||||
$( ".nav" ).css("background-color", "#FFFFFF");
|
||||
$( ".navul" ).find( "a" ).addClass("menu_a");
|
||||
$(this).find("span").addClass("arrow-down");
|
||||
$(".all-logo").hide();
|
||||
$(".all-logo-black").show();
|
||||
//$( this ).children( "dl" ).stop( true, true ).slideDown( 500 );
|
||||
$( this ).children( "dl" ).stop().slideDown( 500 );
|
||||
} );
|
||||
//搜索框
|
||||
$( ".top-R span" ).click( function () {
|
||||
$( ".search" ).slideToggle();
|
||||
} );
|
||||
// 城市
|
||||
$( ".zg" ).click( function () {
|
||||
$( ".topnav" ).slideToggle(500);
|
||||
} );
|
||||
|
||||
$(".icon-close").click(function(){
|
||||
$( ".topnav" ).slideUp(500);
|
||||
})
|
||||
|
||||
} );
|
||||
/*底部菜单弹出*/
|
||||
var body_width = $(window).width();
|
||||
if(body_width < 767){
|
||||
$(function(){
|
||||
$(".footl dt").click(function(){
|
||||
$(this).nextAll().toggle(500);
|
||||
$(this).children("span").toggleClass( "arrow-r" )
|
||||
}).mouseout(function(){
|
||||
$(".bottom_cn_box").hide();
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
/*新导航*/
|
||||
$(function(){
|
||||
$(".ca_lists").mouseover(function(){
|
||||
$(this).addClass('on').siblings().removeClass('on');
|
||||
$(this).siblings().children('div').hide();
|
||||
$(this).children('div').show();
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
430
app/us/view/customer/bind_phone.phtml
Executable file
430
app/us/view/customer/bind_phone.phtml
Executable file
@@ -0,0 +1,430 @@
|
||||
<!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:180px;">
|
||||
<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 accounts blue cursor_p text-c">Retrieve Password</div>
|
||||
<div class="des accounts cursor_p text-c">We’ll send you a link so you can reset your password.</div>
|
||||
<div class="content">
|
||||
<li class="margin-b-5">
|
||||
<input type="text" onfocus="hide_err('email')" onblur="check_format('email')" id="email" placeholder="Email Address">
|
||||
<div id="err_email" style="color: red"></div>
|
||||
</li>
|
||||
<div class="tjdl">
|
||||
<button class="tjbtn" onclick="update_forget_pwd('update_by_email')">Sumbit</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="Register">
|
||||
<a href="__ORICOROOT__<?php echo url('/register'); ?>" class="left">Registry</a>
|
||||
<a href="__ORICOROOT__<?php echo url('/login'); ?>" class="right">Login</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-c login_bottom">2015 ORICO Technologies Co.,Ltd copyright(<a target="_blank" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=44030702002297" >GuangDong ICP No. 15,025,109</a>)</div>
|
||||
<!-- 注册 e -->
|
||||
|
||||
<!-- 新闻详情页 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">The password must contain 8-20 characters and at least two types of characters.</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"> Two password inconsistencies </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">Please check the E-mail</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">Error Mail Form</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>
|
||||
226
app/us/view/customer/forgetpwd.phtml
Executable file
226
app/us/view/customer/forgetpwd.phtml
Executable file
@@ -0,0 +1,226 @@
|
||||
<!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:180px;">
|
||||
<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 accounts blue cursor_p text-c">Change Password</div>
|
||||
<div class="content">
|
||||
<li class="margin-b-5">
|
||||
<input type="password" id="password" onfocus="hide_err('password')" onblur="check_format('password')" placeholder="New password">
|
||||
<div id="err_password"></div>
|
||||
</li>
|
||||
<li class="margin-b-5">
|
||||
<input type="password" id="re_password" onfocus="hide_err('re_password')" onblur="check_format('re_password')" placeholder="Confirm New Password">
|
||||
<div id="err_re_password"></div>
|
||||
</li>
|
||||
<div class="tjdl">
|
||||
<button class="tjbtn" onclick="update_forget_pwd()">Sumbit</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="Register">
|
||||
<a href="__ORICOROOT__<?php echo url('/register'); ?>" class="left">Registry</a>
|
||||
<a href="__ORICOROOT__<?php echo url('/login'); ?>" class="right">Login</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-c login_bottom">2015 ORICO Technologies Co.,Ltd copyright(<a target="_blank" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=44030702002297" >GuangDong ICP No. 15,025,109</a>)</div>
|
||||
<!-- 注册 e -->
|
||||
|
||||
<!-- 新闻详情页 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">
|
||||
function update_forget_pwd() {
|
||||
|
||||
var password = $("#password").val();
|
||||
var re_password = $("#re_password").val();
|
||||
var token = '<?php echo isset($token) ? $token : ''; ?>';
|
||||
var data = {
|
||||
token: token,
|
||||
password: password
|
||||
};
|
||||
|
||||
if (!check_format('password') || !check_format('re_password'))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: '/us/customer/change_password',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (res) {
|
||||
if (res.code == 200)
|
||||
{
|
||||
alert(res.msg);
|
||||
location.href = '/us/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')
|
||||
{
|
||||
var re_password = $("#re_password").val();
|
||||
if (re_password != '')
|
||||
{
|
||||
check_format('re_password');
|
||||
}
|
||||
|
||||
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">The password must contain 8-20 characters and at least two types of characters.</span>';
|
||||
show_err('password', html);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
hide_err('password');
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if (id == 're_password')
|
||||
{
|
||||
var password = $("#password").val();
|
||||
var re_password = $("#re_password").val();
|
||||
if (password != re_password)
|
||||
{
|
||||
var html = '<span style="color: red"> Two password inconsistencies </span>';
|
||||
show_err('re_password', html);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
hide_err('re_password');
|
||||
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;
|
||||
|
||||
if (code == 13)
|
||||
{
|
||||
update_forget_pwd();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
function hide_err(id)
|
||||
{
|
||||
if (id == 'password')
|
||||
{
|
||||
var err_id = 'err_password';
|
||||
var input_id = 'password';
|
||||
}
|
||||
else if (id == 're_password')
|
||||
{
|
||||
var err_id = 'err_re_password';
|
||||
var input_id = 're_password';
|
||||
}
|
||||
|
||||
$('#' + err_id).html('');
|
||||
$('#' + input_id).css('border', '1px solid #dedfe0');
|
||||
}
|
||||
|
||||
function show_err(id, html)
|
||||
{
|
||||
if (id == 'password')
|
||||
{
|
||||
var err_id = 'err_password';
|
||||
var input_id = 'password';
|
||||
}
|
||||
else if (id == 're_password')
|
||||
{
|
||||
var err_id = 'err_re_password';
|
||||
var input_id = 're_password';
|
||||
}
|
||||
|
||||
$('#' + 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>
|
||||
229
app/us/view/customer/forgetpwd_email.phtml
Executable file
229
app/us/view/customer/forgetpwd_email.phtml
Executable file
@@ -0,0 +1,229 @@
|
||||
<!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:180px;">
|
||||
<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 accounts blue cursor_p text-c">Retrieve Password</div>
|
||||
<div class="des accounts cursor_p text-c margin-t-10vw">We’ll send you a link so you can reset your password.</div>
|
||||
<div class="content">
|
||||
<li class="margin-b-5">
|
||||
<input type="text" onfocus="hide_err('email')" onblur="check_format('email')" id="email" placeholder="Email Address">
|
||||
<div id="err_email" style="color: red"></div>
|
||||
</li>
|
||||
<div class="tjdl">
|
||||
<button class="tjbtn" onclick="update_forget_pwd('update_by_email')">Sumbit</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="Register">
|
||||
<a href="__ORICOROOT__<?php echo url('/register'); ?>" class="left">Registry</a>
|
||||
<a href="__ORICOROOT__<?php echo url('/login'); ?>" class="right">Login</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-c login_bottom">2015 ORICO Technologies Co.,Ltd copyright(<a target="_blank" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=44030702002297" >GuangDong ICP No. 15,025,109</a>)</div>
|
||||
<!-- 注册 e -->
|
||||
|
||||
<!-- 新闻详情页 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">
|
||||
function update_forget_pwd() {
|
||||
|
||||
var password = $("#password").val();
|
||||
var re_password = $("#re_password").val();
|
||||
var token = '<?php echo isset($token) ? $token : ''; ?>';
|
||||
var data = {
|
||||
token: token,
|
||||
password: password
|
||||
};
|
||||
|
||||
if (!check_format('password') || !check_format('re_password'))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: '/us/customer/change_password',
|
||||
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')
|
||||
{
|
||||
var re_password = $("#re_password").val();
|
||||
if (re_password != '')
|
||||
{
|
||||
check_format('re_password');
|
||||
}
|
||||
|
||||
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">The password must contain 8-20 characters and at least two types of characters.</span>';
|
||||
show_err('password', html);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
hide_err('password');
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if (id == 're_password')
|
||||
{
|
||||
var password = $("#password").val();
|
||||
var re_password = $("#re_password").val();
|
||||
if (password != re_password)
|
||||
{
|
||||
var html = '<span style="color: red"> Two password inconsistencies </span>';
|
||||
show_err('re_password', html);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
hide_err('re_password');
|
||||
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;
|
||||
|
||||
if (code == 13)
|
||||
{
|
||||
update_forget_pwd();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
function hide_err(id)
|
||||
{
|
||||
if (id == 'password')
|
||||
{
|
||||
var err_id = 'err_password';
|
||||
var input_id = 'password';
|
||||
}
|
||||
else if (id == 're_password')
|
||||
{
|
||||
var err_id = 'err_re_password';
|
||||
var input_id = 're_password';
|
||||
}
|
||||
|
||||
$('#' + err_id).html('');
|
||||
$('#' + input_id).css('border', '1px solid #dedfe0');
|
||||
}
|
||||
|
||||
function show_err(id, html)
|
||||
{
|
||||
if (id == 'password')
|
||||
{
|
||||
var err_id = 'err_password';
|
||||
var input_id = 'password';
|
||||
}
|
||||
else if (id == 're_password')
|
||||
{
|
||||
var err_id = 'err_re_password';
|
||||
var input_id = 're_password';
|
||||
}
|
||||
|
||||
$('#' + 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>
|
||||
151
app/us/view/customer/index.phtml
Executable file
151
app/us/view/customer/index.phtml
Executable file
@@ -0,0 +1,151 @@
|
||||
<!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 f-black text-c"><span class="cursor_p">Welcome Back</span></div>
|
||||
<div class="content content_01">
|
||||
<li class="margin-b-5">
|
||||
<input type="text" id="email" onfocus="hide_err('email')" onblur="check_format('email')" placeholder="Email Address">
|
||||
<div id="err_email" style="color: red"></div>
|
||||
</li>
|
||||
<li class="margin-b-5">
|
||||
<input type="password" onfocus="hide_err('password')" id="password" placeholder="Password">
|
||||
<div id="err_password" style="color: red"></div>
|
||||
</li>
|
||||
<div id="err_block" style="color: red"></div>
|
||||
|
||||
<div class="tjdl">
|
||||
<a class="tjbtn" id="submit-btn" onclick="login()">Login</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="Register">
|
||||
<a href="__ORICOROOT__<?php echo url('/register'); ?>" class="left">Registry</a>
|
||||
<a href="__ORICOROOT__<?php echo url('/customer/retrieve_password'); ?>" class="right"> Forget password?</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='toLogin()'><img src="__PUBLIC__/web/images/customer/weixin.png" height="33"></a>
|
||||
</div>-->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- 登录 -->
|
||||
|
||||
|
||||
<!-- bottom s -->
|
||||
{include file="include/footer" /}
|
||||
<!-- bottom e -->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<script type="text/javascript">
|
||||
function show_err(id, html)
|
||||
{
|
||||
var err_id = '#err_' + id;
|
||||
var input_id = '#' + id;
|
||||
|
||||
$(err_id).html(html);
|
||||
$(input_id).css('border', '1px solid red');
|
||||
}
|
||||
|
||||
function hide_err(id)
|
||||
{
|
||||
var err_id = '#err_' + id;
|
||||
var input_id = '#' + id;
|
||||
|
||||
$(err_id).html('');
|
||||
$('err_block').html('');
|
||||
$(input_id).css('border', '1px solid #dedfe0');
|
||||
}
|
||||
|
||||
function check_format(id)
|
||||
{
|
||||
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 = 'Please check the E-mail';
|
||||
show_err(id, html);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
hide_err(id);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function login()
|
||||
{
|
||||
var email = $("#email").val();
|
||||
var password = $("#password").val();
|
||||
var data = {
|
||||
email: email,
|
||||
password: password
|
||||
};
|
||||
|
||||
if (!check_format('email'))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: '/us/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 = '/us/customer/personal';
|
||||
}
|
||||
}
|
||||
else if (res.code < 0)
|
||||
{
|
||||
var html = res.msg;
|
||||
$('#err_block').html(html);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(document).keyup(function(e) {
|
||||
var code = e.keyCode;
|
||||
if (code == 13)
|
||||
{
|
||||
login();
|
||||
}
|
||||
|
||||
});
|
||||
</script>
|
||||
114
app/us/view/customer/index1.phtml
Executable file
114
app/us/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/us/view/customer/information.phtml
Executable file
42
app/us/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/bottom" /}
|
||||
<!-- bottom e -->
|
||||
</body>
|
||||
</html>
|
||||
233
app/us/view/customer/my_collection.phtml
Executable file
233
app/us/view/customer/my_collection.phtml
Executable file
@@ -0,0 +1,233 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
|
||||
<meta charset="UTF-8">
|
||||
<title>Favorite</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__/customer/personal"><li>Manage Your Account</li></a>
|
||||
<a href="__ORICOROOT__/customer/my_collection"><li class="people_blue">Favorite</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>User:<?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'>Batch Management</i></div>
|
||||
<div class="u_admin02" style="display: none">
|
||||
<i class="cursor_p"><input type="checkbox" class="check" name="check" value="">Select All</i>
|
||||
<i class='delete cursor_p'>Delete</i>
|
||||
<i class='cancel cursor_p'>Cancel</i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="test-r">
|
||||
<div class="u_cate">
|
||||
Classify:<a class="<?php if ($cid == 0): ?> f_blue <?php endif; ?>" href="__ORICOROOT__/customer/my_collection">All</a>
|
||||
<?php if (!empty($productCategory)): ?>
|
||||
<?php foreach($productCategory as $key => $value): ?>
|
||||
<a class="<?php if ($cid == $value['id']): ?> f_blue <?php endif; ?>" href="__ORICOROOT__/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="__ORICOROOT__/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>Confirm Delete?</p>
|
||||
<span class="bg_red cursor_p">Confirm</span>
|
||||
<span class="bg_gray cursor_p">Cancel</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<a href="__ORICOROOT__/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;" > You haven't collected any products yet. </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>Confirm Delete?</p>
|
||||
<span class="bg_red cursor_p">Confirm</span>
|
||||
<span class="bg_gray cursor_p">Cancel</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/bottom" /}
|
||||
<!-- bottom e -->
|
||||
</body>
|
||||
</html>
|
||||
<script type="text/javascript">
|
||||
function cancel_collection(product_id, type=0)
|
||||
{
|
||||
if (product_id == '')
|
||||
{
|
||||
alert(' Please choose the product first. ');
|
||||
$(".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>
|
||||
|
||||
233
app/us/view/customer/personal.phtml
Executable file
233
app/us/view/customer/personal.phtml
Executable file
@@ -0,0 +1,233 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
|
||||
<meta charset="UTF-8">
|
||||
<title>My Center</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__/customer/personal.html"><li class="people_blue">Manage Your Account</li></a>
|
||||
<a href="__ORICOROOT__/customer/my_collection.html"><li>Favorite</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>User:<?php echo $customer_info['firstname']; ?></div>
|
||||
<!--<div class="">修改个人信息</div>-->
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="people_AC">
|
||||
<div class="title"><span class="text-l">Account Security</span></div>
|
||||
<?php if (!empty($customer_info)): ?>
|
||||
<ul>
|
||||
<li>
|
||||
<div class="u_before">
|
||||
<div class="left">Password</div>
|
||||
<div class="right cursor_p">Change Password</div>
|
||||
</div>
|
||||
<div class="u_after b_bottom" style="display: none;">
|
||||
<?php if ($customer_info['have_pwd']): ?>
|
||||
<div class="m-bottom">
|
||||
<label>Original Password</label>
|
||||
<input id="old_password" onfocus="hide_err('old_password')" class="form-control input_class" type="password">
|
||||
<div id="err_old_password" style="color: red"></div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="m-bottom">
|
||||
<label>New Password</label>
|
||||
<input onfocus="hide_err('new_password')" onblur="check_format('new_password')" id="new_password" class="form-control input_class" type="password">
|
||||
<div id="err_new_password" style="color: red"></div>
|
||||
</div>
|
||||
<div class="m-bottom">
|
||||
<label>Confirm Password</label>
|
||||
<input onfocus="hide_err('re_password')" onblur="check_format('re_password')" id="re_password" class="form-control input_class" type="password">
|
||||
<div id="err_re_password" style="color: red"></div>
|
||||
</div>
|
||||
|
||||
<div class="u_button">
|
||||
<a class="u_button_blue" onclick="update_pwd()">Confirm</a>
|
||||
<a class="u_button_gray">Cancel</a>
|
||||
<a href="__ORICOROOT__/customer/retrieve_password.html">
|
||||
<span class="forget_button f_blue">Forget Password</span>
|
||||
</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();
|
||||
})
|
||||
})
|
||||
/*批量管理*/
|
||||
$(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/bottom" /}
|
||||
<!-- bottom e -->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<script type="text/javascript">
|
||||
function check_format(id)
|
||||
{
|
||||
if (id == 'new_password')
|
||||
{
|
||||
var re_password = $("#re_password").val();
|
||||
if (re_password != '')
|
||||
{
|
||||
check_format('re_password');
|
||||
}
|
||||
|
||||
var password = $("#new_password").val();
|
||||
var arg = /^(?![a-zA-z]+$)(?!\d+$)(?![!@#$%^&*-.]+$)[a-zA-Z\d!@#$%^&*-.]{8,20}$/;
|
||||
if (!arg.test(password))
|
||||
{
|
||||
var html = 'The password must contain 8-20 characters and at least two types of characters.';
|
||||
show_err('new_password', html);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
hide_err('new_password');
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
else if (id == 're_password')
|
||||
{
|
||||
var password = $("#new_password").val();
|
||||
var re_password = $("#re_password").val();
|
||||
if (password != re_password)
|
||||
{
|
||||
var html = 'Two password inconsistencies';
|
||||
show_err('re_password', html);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
hide_err('re_password');
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function update_pwd()
|
||||
{
|
||||
var old_password = $("#old_password").val();
|
||||
var password = $("#new_password").val();
|
||||
|
||||
var data = {
|
||||
old_password: old_password,
|
||||
password: password,
|
||||
};
|
||||
|
||||
if (!check_format('new_password') || !check_format('re_password'))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: '/us/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_password', html);
|
||||
}
|
||||
else
|
||||
{
|
||||
alert(res.msg);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
function show_err(id, html)
|
||||
{
|
||||
var err_id = '#err_' + id;
|
||||
var input_id = '#' + id;
|
||||
|
||||
$(err_id).html(html);
|
||||
$(input_id).css('border', '1px solid red');
|
||||
}
|
||||
|
||||
function hide_err(id)
|
||||
{
|
||||
var err_id = '#err_' + id;
|
||||
var input_id = '#' + id;
|
||||
|
||||
$(err_id).html('');
|
||||
$(input_id).css('border', '1px solid #dedfe0');
|
||||
}
|
||||
</script>
|
||||
272
app/us/view/customer/register.phtml
Executable file
272
app/us/view/customer/register.phtml
Executable file
@@ -0,0 +1,272 @@
|
||||
<!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 f-black text-c"><span class="cursor_p">Create Account</span></div>
|
||||
<div class="content">
|
||||
<ul>
|
||||
<li class="margin-b-7">
|
||||
<input type="text" onfocus="hide_err('email')" onblur="check_format('email')" id="email" placeholder="Email Address">
|
||||
<div id="err_email" style="color: red"></div>
|
||||
</li>
|
||||
<li class="margin-b-7">
|
||||
<input type="password" onfocus="hide_err('password')" onblur="check_format('password')" id="password" placeholder="Password">
|
||||
<div id="err_password" style="color: red"></div>
|
||||
</li>
|
||||
<li class="margin-b-7 overflow-f">
|
||||
<input type="text" onfocus="hide_err('captcha')" id="captcha" placeholder="Enter Captcha">
|
||||
<div class="w_right text-center">
|
||||
<img id="verifyimg" src="/captcha/authcode.html" class="img-responsive ">
|
||||
</div>
|
||||
<div id="err_captcha" style="color: red; width:100%; overflow: hidden; margin-top:1vw;"></div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="tjdl">
|
||||
<button class="tjbtn" onclick="register()">Registry</button>
|
||||
</div>
|
||||
<div class="Register text-r">
|
||||
<a href="login.html" class="f_blue">Login</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-c login_bottom">2015 ORICO Technologies Co.,Ltd copyright(<a target="_blank" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=44030702002297" >GuangDong ICP No. 15,025,109</a>)</div>
|
||||
<!-- 注册 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 show_err(id, html)
|
||||
{
|
||||
var err_id = '#err_' + id;
|
||||
var input_id = '#' + id;
|
||||
|
||||
$(err_id).html(html);
|
||||
$(input_id).css('border', '1px solid red');
|
||||
}
|
||||
|
||||
function hide_err(id)
|
||||
{
|
||||
var err_id = '#err_' + id;
|
||||
var input_id = '#' + id;
|
||||
|
||||
$(err_id).html('');
|
||||
$(input_id).css('border', '1px solid #dedfe0');
|
||||
}
|
||||
|
||||
function check_format(id)
|
||||
{
|
||||
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 = 'Please check the E-mail';
|
||||
show_err(id, html);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
hide_err(id);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if (id == 'password')
|
||||
{
|
||||
var password = $("#password").val();
|
||||
var arg = /^(?![a-zA-z]+$)(?!\d+$)(?![!@#$%^&*-.]+$)[a-zA-Z\d!@#$%^&*-.]{8,20}$/;
|
||||
if (!arg.test(password))
|
||||
{
|
||||
var html = 'The password must contain 8-20 characters and at least two types of characters.';
|
||||
show_err(id, html);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
hide_err(id);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function register()
|
||||
{
|
||||
var email = $("#email").val();
|
||||
var password = $("#password").val();
|
||||
var captcha = $("#captcha").val();
|
||||
var data = {
|
||||
email: email,
|
||||
password: password,
|
||||
captcha: captcha
|
||||
}
|
||||
|
||||
if (!check_format('email') || !check_format('password'))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: '/us/customer/new_register',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function(res) {
|
||||
if (res.code == 200)
|
||||
{
|
||||
location.href = '/us/customer/activation.html?email=' + email;
|
||||
}
|
||||
if (res.code < 0)
|
||||
{
|
||||
$("#verifyimg").trigger('click');
|
||||
if (res.code == -4)
|
||||
{
|
||||
var html = 'Captcha Error';
|
||||
show_err('captcha', html);
|
||||
}
|
||||
else if (res.code == -5)
|
||||
{
|
||||
var html = res.msg;
|
||||
show_err('email', html);
|
||||
}
|
||||
else
|
||||
{
|
||||
alert(res.msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
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("Sent Again" + curCount + "S");
|
||||
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>
|
||||
|
||||
<script type="text/javascript">
|
||||
$("#verifyimg").click(function(event) {
|
||||
event.preventDefault();
|
||||
$img = $("#verifyimg");
|
||||
$img.attr("src", "/captcha/authcode.html?t=" + Math.random());
|
||||
//$img.attr("src", $img.attr("src").substring(0, 21) + "?" + Math.random());
|
||||
//jQuery(this).attr("src", "<?php echo url('/admin/authcode/verify');?>?" + Math.random());
|
||||
});
|
||||
</script>
|
||||
195
app/us/view/customer/retrieve_password.phtml
Executable file
195
app/us/view/customer/retrieve_password.phtml
Executable file
@@ -0,0 +1,195 @@
|
||||
<!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:180px;">
|
||||
<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 accounts blue cursor_p text-c">Retrieve Password</div>
|
||||
<div class="des accounts cursor_p text-c margin-t-10vw">We’ll send you a link so you can reset your password.</div>
|
||||
<div class="content">
|
||||
<li class="margin-b-5">
|
||||
<input type="text" onfocus="hide_err('email')" onblur="check_format('email')" id="email" placeholder="Email Address">
|
||||
<div id="err_email" style="color: red"></div>
|
||||
</li>
|
||||
<div class="tjdl">
|
||||
<button class="tjbtn" onclick="update_by_email()">Sumbit</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="Register">
|
||||
<a href="__ORICOROOT__<?php echo url('/register'); ?>" class="left">Registry</a>
|
||||
<a href="__ORICOROOT__<?php echo url('/login'); ?>" class="right">Login</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-c login_bottom">2015 ORICO Technologies Co.,Ltd copyright(<a target="_blank" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=44030702002297" >GuangDong ICP No. 15,025,109</a>)</div>
|
||||
<!-- 注册 e -->
|
||||
|
||||
<!-- 新闻详情页 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">
|
||||
function update_by_email()
|
||||
{
|
||||
var email = $("#email").val();
|
||||
var data = {
|
||||
email: email,
|
||||
};
|
||||
|
||||
if (!check_format('email'))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: '/us/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('password', html);
|
||||
}
|
||||
else
|
||||
{
|
||||
alert(res.msg);
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
function check_format(id)
|
||||
{
|
||||
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">Error Mail Form</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;
|
||||
if (code == 13)
|
||||
{
|
||||
update_by_email();
|
||||
}
|
||||
});
|
||||
</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 == 'email')
|
||||
{
|
||||
var err_id = 'err_email';
|
||||
var input_id = 'email';
|
||||
$('#' + err_id).html('');
|
||||
$('#' + input_id).css('border', '1px solid #dedfe0');
|
||||
}
|
||||
}
|
||||
|
||||
function show_err(id, html)
|
||||
{
|
||||
if (id == 'email')
|
||||
{
|
||||
var err_id = 'err_email';
|
||||
var input_id = 'email';
|
||||
$('#' + 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>
|
||||
Reference in New Issue
Block a user