5 Star 1 Fork 1

烟雨平生 / 跨境电商借卖平台前端

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
bvo-wallerAccountRegister.html 6.76 KB
一键复制 编辑 Web IDE 原始数据 按行查看 历史
烟雨平生 提交于 2019-08-08 16:34 . admin
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Responsive Admin Dashboard Template">
<meta name="keywords" content="admin,dashboard">
<meta name="author" content="skcats">
<!-- The above 6 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<!-- Title -->
<title>钱包注册</title>
<!-- Styles -->
<link href="assets/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="assets/plugins/icomoon/style.css" rel="stylesheet">
<link href="assets/plugins/uniform/css/default.css" rel="stylesheet" />
<link href="assets/plugins/switchery/switchery.min.css" rel="stylesheet" />
<!-- Theme Styles -->
<link href="assets/css/ecaps.min.css" rel="stylesheet">
<style type="text/css">
.help-block {
margin-bottom: 0px;
}
</style>
</head>
<body>
<!-- Page Inner -->
<div class="page-inner" style="height: -webkit-fill-available;">
<div class="page-title">
<h3 class="breadcrumb-header">钱包注册</h3>
</div>
<!--
<div class="alert alert-default" role="alert">
Simple, clean and engaging charts for designers and developers.
</div> -->
<div id="main-wrapper">
<div class="row">
<div class="col-md-6 col-md-offset-3">
<div class="panel panel-white">
<div class="panel-body">
<!--注册表单
用户名ID:userAccount
邮箱ID:email
密码ID:password
注册按钮ID:register
-->
<form class="form-horizontal" action="">
<div class="form-group">
<label for="userAccount" class="col-sm-2 control-label">Name:</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="userAccount" placeholder="请输入正确用户名格式">
<p class="help-block">Example block-level help text here.</p>
</div>
</div>
<div class="form-group">
<label for="email" class="col-sm-2 control-label">Email:</label>
<div class="col-sm-10">
<input type="email" class="form-control" id="email" placeholder="请输入正确邮箱格式">
<p class="help-block">Example block-level help text here.</p>
</div>
</div>
<div class="form-group">
<label for="password" class="col-sm-2 control-label">Password:</label>
<div class="col-sm-10">
<input type="password" class="form-control" id="password" maxlength="11" placeholder="请输入您的密码">
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<a class="btn btn-success" id="register" style="margin-top:10px;margin-bottom:-14px;">注册</a>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div><!-- Main Wrapper -->
<div class="page-footer">
</div>
</div><!-- /Page Inner -->
<!-- Javascripts -->
<script src="assets/plugins/jquery/jquery-3.1.0.min.js"></script>
<script src="assets/plugins/bootstrap/js/bootstrap.min.js"></script>
<script src="assets/plugins/jquery-slimscroll/jquery.slimscroll.min.js"></script>
<script src="assets/plugins/uniform/js/jquery.uniform.standalone.js"></script>
<script src="assets/plugins/switchery/switchery.min.js"></script>
<script src="assets/js/ecaps.min.js"></script>
<script type="text/javascript">
window.onload = function() {
var userAccount = document.querySelector("#userAccount"), //获取用户名
email = document.querySelector("#email"), //获取邮箱号码
password = document.querySelector("#password"), //获取手机号码
items = document.querySelectorAll(".help-block"), //获取所有提示文段的下标
oBtn = document.querySelector("#register");
var test1 = false,
test2 = false;
userAccount.onfocus = function() {
items[0].innerHTML = "6-30位字母、数字或'_'";
items[0].style.color = "green";
};
userAccount.onblur = function() {
var reg = /^\w{6,30}$/;
if (this.value == "") {
items[0].innerHTML = "请您务必写入用户名!";
items[0].style.color = "red";
} else {
if (!reg.exec(userAccount.value)) {
items[0].innerHTML = "6-30位字母、数字或'_'";
items[0].style.color = "red";
} else {
items[0].innerHTML = "格式正确";
items[0].style.color = "green";
test1 = true;
}
}
};
//-------------------------------------------------------------账号结束;
email.onfocus = function() {
items[1].innerHTML = "请输入您邮箱的正确格式";
items[1].style.color = "green";
};
email.onblur = function() {
var reg = /^\w+@\w+.[a-zA-Z]{2,3}(.[a-zA-Z]{2,3})?$/;
if (this.value == "") {
items[1].innerHTML = "请您务必写入邮箱!";
items[1].style.color = "red";
} else {
if (!reg.exec(email.value)) {
items[1].innerHTML = "请输入邮箱正确格式";
items[1].style.color = "red";
} else {
items[1].innerHTML = "格式正确";
items[1].style.color = "green";
test2 = true;
}
}
};
//----------------------------------------------------------------------邮箱结束
};
// localStorage.setItem('user_id',103);
$("#register").click(function() {
var formdata = {
account_name: $("#userAccount").val(),
email: $("#email").val(),
password: $("#password").val(),
user_id:localStorage.getItem('user_id')
};
$.ajax({
url: "http://localhost:88/wallet/add",
method: 'post',
dataType: 'json',
contentType: 'application/json',
headers: {
"GMC-ACCESS-TOKEN": localStorage.getItem('token')
},
data:formdata,
async: false,
success: function(data,status) {
console.log(data);
console.log(status);
if (data['success']) {
console.log(data);
window.location.href = 'http://localhost:88/bvo-gmcwallerAccount.html?account=' + $("#userAccount").val();
} else {
alert('fail');
}
},
error: function(err) {
console.log(err);
}
});
/* $.post("http://localhost:88/wallet/add", {
account_name: $("#userAccount").val(),
email: $("#email").val(),
password: $("#password").val(),
user_id:localStorage.getItem('user_id')
}, function(data, status) {
console.log(data);
console.log(status);
if (data['success']) {
console.log(data);
window.location.href = 'http://localhost:88/bvo-gmcwallerAccount.html?account=' + $("#userAccount").val();
} else {
alert('fail');
}
}) */
});
</script>
</body>
</html>
HTML/CSS
1
https://gitee.com/LGlogo/gmcbrand.git
git@gitee.com:LGlogo/gmcbrand.git
LGlogo
gmcbrand
跨境电商借卖平台前端
develop

搜索帮助

14c37bed 8189591 565d56ea 8189591