|
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="regist.aspx.cs" Inherits="web.Web.Site.regist" %>
|
|
|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
|
<head runat="server">
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
|
<meta charset="utf-8" />
|
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1" />
|
|
|
<title>注册</title>
|
|
|
<meta name="description" content="" />
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
|
<!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
|
|
|
|
|
|
<!-- CSS -->
|
|
|
<link rel="stylesheet" href="css/owl.carousel.css" />
|
|
|
<link rel="stylesheet" href="css/bootstrap.min.css" />
|
|
|
<link rel="stylesheet" href="css/font-awesome.min.css" />
|
|
|
<link rel="stylesheet" href="css/style.css" />
|
|
|
<link rel="stylesheet" href="css/ionicons.min.css" />
|
|
|
<link rel="stylesheet" href="css/animate.css" />
|
|
|
<link rel="stylesheet" href="css/responsive.css" />
|
|
|
<link href="//cdn.bootcss.com/bootstrap-validator/0.5.3/css/bootstrapValidator.min.css" rel="stylesheet" />
|
|
|
<!-- Js -->
|
|
|
<script src="js/vendor/modernizr-2.6.2.min.js"></script>
|
|
|
<script src="js/vendor/jquery-1.10.2.min.js"></script>
|
|
|
<script>window.jQuery || document.write('<script src="js/vendor/jquery-1.10.2.min.js"><\/script>')</script>
|
|
|
<script src="js/bootstrap.min.js"></script>
|
|
|
<script src="js/owl.carousel.min.js"></script>
|
|
|
<script src="js/plugins.js"></script>
|
|
|
<script src="js/min/waypoints.min.js"></script>
|
|
|
<script src="js/jquery.counterup.js"></script>
|
|
|
<script src="//cdn.bootcss.com/bootstrap-validator/0.5.3/js/bootstrapValidator.min.js"></script>
|
|
|
|
|
|
|
|
|
<script src="js/main.js"></script>
|
|
|
|
|
|
|
|
|
<script>
|
|
|
$(function () {
|
|
|
$("#yaoqingma").val( getYQM());
|
|
|
$("#btnSubmit").click(function () {
|
|
|
if (!$("#isAgree").is(':checked')) {
|
|
|
alert("请先阅读并同意MYSHIPING用户协议!");
|
|
|
return;
|
|
|
}
|
|
|
$("#form1").bootstrapValidator('validate');//提交验证
|
|
|
if ($("#form1").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
|
|
var yyzz = null;
|
|
|
if (document.getElementById("yyzzfile") != undefined) {
|
|
|
yyzz = document.getElementById("yyzzfile").files[0];
|
|
|
}
|
|
|
var phone = $("#txtPhone").val();
|
|
|
var pwd = $("#txtPwd").val();
|
|
|
var pwd2 = $("#txtPwd2").val();
|
|
|
var vcode = $("#txtVCode").val();
|
|
|
var email = $("#txtEmail").val();
|
|
|
var comname = $("#comname").val();
|
|
|
var username = $("#username").val();
|
|
|
var realname = $("#realname").val();
|
|
|
var yaoqingma = $("#yaoqingma").val();
|
|
|
var gslx = $("#selGSLX").val();
|
|
|
var COMTYPE = $("#selGSLX").find("option:selected").text();
|
|
|
var formData = new FormData();
|
|
|
formData.append('action', 'sign');
|
|
|
formData.append('phone', phone);
|
|
|
formData.append('pwd', pwd);
|
|
|
formData.append('pwd2', pwd2);
|
|
|
formData.append('vcode', vcode);
|
|
|
formData.append('email', email);
|
|
|
formData.append('comname', comname);
|
|
|
formData.append('yyzz', yyzz);
|
|
|
formData.append('username', username);
|
|
|
formData.append('realname', realname);
|
|
|
formData.append('yaoqingma', yaoqingma);
|
|
|
formData.append('gslx', gslx);
|
|
|
formData.append('COMTYPE', COMTYPE);
|
|
|
formData.append('c', getQueryString("c"));
|
|
|
|
|
|
$.ajax({
|
|
|
url: 'index.aspx',
|
|
|
type: 'post',
|
|
|
data: formData,
|
|
|
processData: false,
|
|
|
contentType: false,
|
|
|
async: true,
|
|
|
success: function (data) {
|
|
|
|
|
|
if (data == 'success') {
|
|
|
$("#loginusername").val(username);
|
|
|
$("#loginpwd").val(pwd);
|
|
|
alert("注册成功!");
|
|
|
$("#txtPhone").val('');
|
|
|
$("#txtPwd").val('');
|
|
|
$("#txtPwd2").val('');
|
|
|
$("#txtVCode").val('');
|
|
|
$("#txtEmail").val('');
|
|
|
$("#comname").val('');
|
|
|
$("#username").val('');
|
|
|
$("#realname").val('');
|
|
|
$("#txtyyzz").val('');
|
|
|
$("#txtVCode").val('');
|
|
|
$("#yaoqingma").val('');
|
|
|
$('#searchModal').modal('hide');
|
|
|
|
|
|
|
|
|
} else {
|
|
|
alert(data);
|
|
|
}
|
|
|
},
|
|
|
error: function () {
|
|
|
alert("操作失败!");
|
|
|
}
|
|
|
})
|
|
|
} else {
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
$("#form1").bootstrapValidator({
|
|
|
message: 'This value is not valid',
|
|
|
// 定义未通过验证的状态图标
|
|
|
feedbackIcons: {/*输入框不同状态,显示图片的样式*/
|
|
|
valid: 'glyphicon glyphicon-ok',
|
|
|
invalid: 'glyphicon glyphicon-remove',
|
|
|
validating: 'glyphicon glyphicon-refresh'
|
|
|
},
|
|
|
// 字段验证
|
|
|
fields: {
|
|
|
// 手机号码
|
|
|
phone: {
|
|
|
validators: {
|
|
|
notEmpty: {
|
|
|
message: '手机号码不能为空'
|
|
|
},
|
|
|
stringlength: {
|
|
|
min: 11,
|
|
|
max: 11,
|
|
|
message: '请输入11位手机号码'
|
|
|
},
|
|
|
regexp: {
|
|
|
regexp: /^1[3|4|5|6|7|8|9]{1}[0-9]{9}$/,
|
|
|
message: '请输入正确的手机号码'
|
|
|
},
|
|
|
remote: {
|
|
|
message: '手机号已注册',
|
|
|
type: "POST",
|
|
|
delay: 2000,
|
|
|
url: 'index.aspx',
|
|
|
data: { action: 'checkphone', phone: $("#txtPhone").val() }
|
|
|
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
|
|
|
// 密码
|
|
|
pwd: {
|
|
|
message: '密码非法',
|
|
|
validators: {
|
|
|
notEmpty: {
|
|
|
message: '密码不能为空'
|
|
|
},
|
|
|
// 限制字符串长度
|
|
|
stringLength: {
|
|
|
min: 3,
|
|
|
max: 20,
|
|
|
message: '密码长度必须位于3到20之间'
|
|
|
},
|
|
|
// 相同性检测
|
|
|
identical: {
|
|
|
// 需要验证的field
|
|
|
field: 'pwd2',
|
|
|
message: '两次密码输入不一致'
|
|
|
},
|
|
|
// 基于正则表达是的验证
|
|
|
regexp: {
|
|
|
regexp: /^[a-zA-Z0-9_\.]+$/,
|
|
|
message: '密码由数字字母下划线和.组成'
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
|
|
|
// 确认密码
|
|
|
pwd2: {
|
|
|
message: '密码非法',
|
|
|
validators: {
|
|
|
notEmpty: {
|
|
|
message: '密码不能为空'
|
|
|
},
|
|
|
// 限制字符串长度
|
|
|
stringLength: {
|
|
|
min: 3,
|
|
|
max: 20,
|
|
|
message: '密码长度必须位于3到20之间'
|
|
|
},
|
|
|
// 相同性检测
|
|
|
identical: {
|
|
|
// 需要验证的field
|
|
|
field: 'pwd',
|
|
|
message: '两次密码输入不一致'
|
|
|
},
|
|
|
// 基于正则表达是的验证
|
|
|
regexp: {
|
|
|
regexp: /^[a-zA-Z0-9_\.]+$/,
|
|
|
message: '密码由数字字母下划线和.组成'
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
|
|
|
// 电子邮箱
|
|
|
email: {
|
|
|
validators: {
|
|
|
notEmpty: {
|
|
|
message: '邮箱地址不能为空'
|
|
|
},
|
|
|
emailAddress: {
|
|
|
message: '请输入正确的邮箱地址'
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
//公司名
|
|
|
comname: {
|
|
|
validators: {
|
|
|
notEmpty: {
|
|
|
message: '公司名不能为空'
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
//营业执照
|
|
|
//txtyyzz: {
|
|
|
// trigger: "change",
|
|
|
// validators: {
|
|
|
// notEmpty: {
|
|
|
// message: '请上传营业执照'
|
|
|
// }
|
|
|
// }
|
|
|
//},
|
|
|
//用户名
|
|
|
username: {
|
|
|
validators: {
|
|
|
notEmpty: {
|
|
|
message: '用户名不能为空'
|
|
|
}, stringLength: {
|
|
|
min: 4,
|
|
|
max: 10,
|
|
|
message: '用户名长度请介于4到10位,可由字母,数字,下划线或.组成。'
|
|
|
},
|
|
|
// 基于正则表达是的验证
|
|
|
regexp: {
|
|
|
regexp: /^[a-zA-Z0-9_.]+$/,
|
|
|
message: '用户名长度请介于4到10位,可由字母,数字,下划线或.组成。'
|
|
|
},
|
|
|
remote: {
|
|
|
message: '用户已存在',
|
|
|
type: "POST",
|
|
|
delay: 2000,
|
|
|
url: 'index.aspx',
|
|
|
data: { action: 'checkusername', username: $("#username").val() }
|
|
|
|
|
|
}
|
|
|
}
|
|
|
|
|
|
},
|
|
|
//真实姓名
|
|
|
realname: {
|
|
|
validators: {
|
|
|
notEmpty: {
|
|
|
message: '请填写真实姓名'
|
|
|
},
|
|
|
// 限制字符串长度
|
|
|
stringLength: {
|
|
|
min: 0,
|
|
|
max: 5,
|
|
|
message: '姓名超长,请精简长度。'
|
|
|
},
|
|
|
}
|
|
|
},
|
|
|
//邀请码
|
|
|
yaoqingma: {
|
|
|
validators: {
|
|
|
// 基于正则表达是的验证
|
|
|
regexp: {
|
|
|
regexp: /^[a-zA-Z0-9_.]+$/,
|
|
|
message: '邀请码由数字字母下划线和.组成'
|
|
|
}
|
|
|
}
|
|
|
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
|
|
|
$("#selGSLX").find("option").remove();
|
|
|
var url = 'http://47.104.73.97:8654/Interface/CustSrv.ashx';
|
|
|
var param = { name: "comauth", ac: "sel" };
|
|
|
|
|
|
$.ajax({
|
|
|
url: url,
|
|
|
type: 'POST',
|
|
|
async: true,
|
|
|
dataType: 'jsonp',
|
|
|
jsonp: "jsoncallback",
|
|
|
data: param,
|
|
|
timeout: 10000,
|
|
|
success: function (t) {
|
|
|
|
|
|
var data = eval(t).Data;
|
|
|
$.each(data, function (index, item) {
|
|
|
var t = item.text;
|
|
|
var v = item.value;
|
|
|
$("#selGSLX").append("<option value=" + v + ">" + t + "</option>");
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
|
|
|
})
|
|
|
|
|
|
function checkEmail() {
|
|
|
var msg = $("#txtSMsg").val();
|
|
|
if (msg.length < 10) {
|
|
|
alert("请输入十字以上的意见或建议!");
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
|
|
|
//倒计时
|
|
|
var countdown = 60;
|
|
|
function getCode(val) {
|
|
|
$("#form1").bootstrapValidator('validate');//提交验证
|
|
|
if ($("#form1").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
|
|
var formData = new FormData();
|
|
|
var phone = $("#txtPhone").val();
|
|
|
formData.append('action', 'code');
|
|
|
formData.append('phone', phone);
|
|
|
$.ajax({
|
|
|
url: 'index.aspx',
|
|
|
type: 'post',
|
|
|
data: formData,
|
|
|
processData: false,
|
|
|
contentType: false,
|
|
|
async: true,
|
|
|
success: function (data) {
|
|
|
alert(data);
|
|
|
|
|
|
},
|
|
|
error: function () {
|
|
|
alert("操作失败!");
|
|
|
}
|
|
|
})
|
|
|
settime(val);
|
|
|
} else {
|
|
|
//alert("请填写完整信息");
|
|
|
}
|
|
|
}
|
|
|
function getCodef(val) {
|
|
|
$("#form2").bootstrapValidator('validate');//提交验证
|
|
|
if ($("#form2").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
|
|
var formData = new FormData();
|
|
|
var phone = $("#ftxtPhone").val();
|
|
|
formData.append('action', 'code');
|
|
|
formData.append('phone', phone);
|
|
|
$.ajax({
|
|
|
url: 'index.aspx',
|
|
|
type: 'post',
|
|
|
data: formData,
|
|
|
processData: false,
|
|
|
contentType: false,
|
|
|
async: true,
|
|
|
success: function (data) {
|
|
|
alert(data);
|
|
|
|
|
|
},
|
|
|
error: function () {
|
|
|
alert("操作失败!");
|
|
|
}
|
|
|
})
|
|
|
settime(val);
|
|
|
} else {
|
|
|
//alert("请填写完整信息");
|
|
|
}
|
|
|
}
|
|
|
function settime(val) {
|
|
|
if (countdown == 0) {
|
|
|
val.removeAttribute("disabled");
|
|
|
val.innerHTML = "获取验证码";
|
|
|
countdown = 60;
|
|
|
return false;
|
|
|
} else {
|
|
|
val.setAttribute("disabled", true);
|
|
|
val.innerHTML = "重新发送(" + countdown + ")";
|
|
|
countdown--;
|
|
|
}
|
|
|
setTimeout(function () {
|
|
|
settime(val);
|
|
|
}, 1000);
|
|
|
}
|
|
|
function open_win(t) {
|
|
|
if (t == '0') {
|
|
|
window.open("http://www.myshipping.net/Web/Site/plugin.html", "_blank", "toolbar=yes, location=yes, directories=no, status=no, menubar=yes, scrollbars=yes, resizable=no, copyhistory=yes, width=400, height=400")
|
|
|
|
|
|
} else if (t == '1') {
|
|
|
window.open("http://www.myshipping.net/Web/Site/doc.html", "_blank", "toolbar=yes, location=yes, directories=no, status=no, menubar=yes, scrollbars=yes, resizable=no, copyhistory=yes, width=400, height=400")
|
|
|
|
|
|
}
|
|
|
}
|
|
|
///获取QuertString
|
|
|
function getQueryString(name) {
|
|
|
var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i');
|
|
|
var r = window.location.search.substr(1).match(reg);
|
|
|
if (r != null) {
|
|
|
return unescape(r[2]);
|
|
|
}
|
|
|
return null;
|
|
|
}
|
|
|
function getYQM() {
|
|
|
var url = location.search; //获取url中"?"符后的字串
|
|
|
|
|
|
if (url.indexOf("?") != -1) {
|
|
|
var str = url.substr(1);
|
|
|
return decodeURI(str);
|
|
|
|
|
|
}
|
|
|
return null;
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
</head>
|
|
|
|
|
|
<body>
|
|
|
<div class="container">
|
|
|
<div class="page-header">
|
|
|
<h1>用户注册</h1>
|
|
|
</div>
|
|
|
<form id="form1" class="form-horizontal">
|
|
|
<div class="form-group">
|
|
|
<label for="username" class="col-sm-2 control-label">用户名</label>
|
|
|
<div class="col-sm-10">
|
|
|
<input type="text" id="username" class="form-control" name="username"
|
|
|
placeholder="用户名" />
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
<label for="realname" class="col-sm-2 control-label">真实姓名</label>
|
|
|
<div class="col-sm-10">
|
|
|
<input type="text" id="realname" class="form-control" name="realname"
|
|
|
placeholder="真实姓名" />
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
<label for="phone" class="col-sm-2 control-label">手机号</label>
|
|
|
<div class="col-sm-10">
|
|
|
<input type="text" id="txtPhone" class="form-control" name="phone"
|
|
|
placeholder="手机号" />
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
<div class="form-group">
|
|
|
<label for="email" class="col-sm-2 control-label">邮箱</label>
|
|
|
<div class="col-sm-10">
|
|
|
<input type="text" id="txtEmail" class="form-control" name="email"
|
|
|
placeholder="邮箱" />
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="form-group">
|
|
|
<label for="pwd" class="col-sm-2 control-label">密码</label>
|
|
|
<div class="col-sm-10">
|
|
|
<input type="password" id="txtPwd" name="pwd" class="form-control"
|
|
|
placeholder="请输密码" />
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="form-group">
|
|
|
<label for="pwd2" class="col-sm-2 control-label">确认密码</label>
|
|
|
<div class="col-sm-10">
|
|
|
<input type="password" id="txtPwd2" name="pwd2" class="form-control"
|
|
|
placeholder="请输密码" />
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="form-group">
|
|
|
<label for="comname" class="col-sm-2 control-label">公司名称</label>
|
|
|
<div class="col-sm-10">
|
|
|
<input type="text" id="comname" name="comname" class="form-control"
|
|
|
placeholder="公司名称" />
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
<%-- <div class="row form-group">
|
|
|
<label for="middle-name" class="control-label col-md-3 col-sm-3 col-xs-12">营业执照</label>
|
|
|
<div class="col-sm-4">
|
|
|
<input id="yyzzfile" class="picfile" name="yyzzfile" type="file" style="display: none" />
|
|
|
<div class="input-append">
|
|
|
<input id="txtyyzz" name="txtyyzz" style="width: 90%" placeholder="营业执照" class="form-control" type="text" />
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="col-sm-4">
|
|
|
<a class="btn btn-primary" style="margin-bottom: 0px;" onclick="$('input[id=yyzzfile]').click();">选择</a>
|
|
|
</div>
|
|
|
</div>--%>
|
|
|
<div class="row form-group">
|
|
|
<label for="vcode" class="col-sm-2 control-label">手机验证码</label>
|
|
|
<div class="col-sm-4">
|
|
|
<input type="text" name="vcode" style="width: 90%" id="txtVCode" class="form-control"
|
|
|
placeholder="验证码" />
|
|
|
</div>
|
|
|
<div class="col-sm-4">
|
|
|
<button type="button" onclick="getCode(this);" class="btn btn-default">获取验证码</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="form-group">
|
|
|
<label for="yaoqingma" class="col-sm-2 control-label">邀请码</label>
|
|
|
<div class="col-sm-10">
|
|
|
<input type="text" id="yaoqingma" name="yaoqingma" class="form-control" value="QDCYLM"
|
|
|
placeholder="邀请码,若没有可不填" />
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="form-group">
|
|
|
<label for="gslx" class="col-sm-2 control-label">公司类型</label>
|
|
|
<div class="col-sm-10">
|
|
|
<select name="gslx" id="selGSLX" class="form-control">
|
|
|
</select>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="row form-group" style="text-align: center; margin-top: 20px">
|
|
|
|
|
|
<input type="checkbox" checked="checked" id="isAgree" />
|
|
|
<label>阅读并接受<a target="_blank" href="protocal.html">《MyShipping用户协议》</a></label>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="form-group">
|
|
|
<div class="col-sm-offset-2 col-sm-4">
|
|
|
<button type="button" id="btnSubmit" name="submit" class="btn btn-primary">注册</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</form>
|
|
|
</div>
|
|
|
|
|
|
</body>
|
|
|
</html>
|