作者 杨乐
1 个管道 的构建 通过 耗费 5 秒

提交

... ... @@ -12,7 +12,7 @@ $(document).ready(function() {
newCode = url.substr(6)
newCodes = newCode.split("&");
var ncode = newCodes[0]
// console.log(ncode);
console.log(ncode);
var header1 = {
"Content-Type": "application/x-www-form-urlencoded"
}
... ... @@ -21,6 +21,12 @@ $(document).ready(function() {
//传回code值 微信登录
ajax('/login/loginCheck', "POST", header1, params, function(res) {
console.log(res);
//res.data
//id:"1351093655816945665"
//status:1
//status1:2
//token:'****'
//w_name:null
var header2 = {
"Content-Type": "application/x-www-form-urlencoded",
"token": res.data.token
... ... @@ -29,26 +35,20 @@ $(document).ready(function() {
// alert("登录成功!")
localStorage.setItem("token", res.data.token);
localStorage.setItem("userId", res.data.id);
//查看个人信息
ajax("/login/userInfo", "GET", header2, function(res) {}, function(res) {
console.log(res);
})
// if (res.data.status === 1) {
// window.location.href = 'save.html'
// } else if (res.data.Status1 === 2) {
// window.location.href = 'participated.html'
// } else {
// window.location.href = 'index.html'
// }
//绑定账号的用户授权
var params = { code: ncode }
//绑定账号的用户授权
ajax('/login/loginCheck1', "PUT", header2, params, function(res) {
console.log(res);
}, function(res) {
console.log(res);
})
console.log(res);
}, function(res) {
console.log(res);
})
// if (res.data.status === 1) {
// window.location.href = 'save1.html'
// } else if (res.data.Status1 === 2) {
// window.location.href = 'participated.html'
// } else {
// window.location.href = 'index.html'
// }
}, function(res) { console.log(res); })
... ... @@ -153,12 +153,23 @@ function setPersonal() {
}
//请求授权地址,跳转二维码登录页
function setEWM() {
var url = "http://start-line.cn/login.html";
console.log(url);
var header = {
"Content-Type": "application/x-www-form-urlencoded"
}
ajax("/login/loginInit", "GET", header, function(res) {}, function(res) {
var params = {
backUrl: url
}
ajax("/login/loginInit", "GET", header, params, function(res) {
console.log(res);
window.location.href = res.data
}, function(res) {
console.log(res);
window.location.href = res.data
}, function(res) {
console.log(res);
})
// $('#phone-login').hide()
// $('#EWM-login').show()
... ...
... ... @@ -272,6 +272,12 @@
}
@media (max-width: 768px) {
.shang_box {
width: 240px;
height: 340px;
left: 0;
margin-left: 0px;
}
.active-click {
box-shadow: 0px 10px 32px 0px #f2a252;
}
... ...
... ... @@ -226,7 +226,6 @@ function payment() {
// 支付下单获取订单号
ajax("/orderLog/orderAdd", "POST", header, params, function(res) {
console.log(res);
console.log(res);
console.log(res.data);
console.log(paymentType);
var params1 = {
... ... @@ -235,6 +234,13 @@ function payment() {
}
//支付类型paymentType : 1微信 2支付宝
if (paymentType == 1) {
var params1 = {
id: res.data,
type: screenType
}
console.log(res.data);
console.log(screenType);
console.log(params1);
$(".hide_box").fadeToggle();
$(".shang_box").fadeToggle();
//微信支付
... ... @@ -244,9 +250,10 @@ function payment() {
$(".shang_payimg").html(title)
//订单号
console.log(res1.data.outTradeNo);
//计时器
//微信支付轮询
var params3 = { id: res1.data.outTradeNo }
var timeInterval = setInterval(function() {
ajax("/orderLog/test", "GET", header1, { id: res1.data.outTradeNo }, function(res2) {
ajax("/orderLog/test", "GET", header1, params3, function(res2) {
console.log(res2.data);
if (res2.data == '2') {
clearInterval(timeInterval)
... ... @@ -260,7 +267,13 @@ function payment() {
// $(".hide_box").fadeToggle();
// $(".shang_box").fadeToggle();
//支付宝支付
ajax("/zfbPay/alipay", "GET", header1, params1, function(res) {
var url1 = 'http://start-line.cn/personalCenter.html'
var params3 = {
id: res.data,
type: screenType,
returnUrl: url1
}
ajax("/zfbPay/alipay", "GET", header1, params3, function(res) {
console.log(res);
$(".zhifubao_form").html(res)
}, function(res) {})
... ...
... ... @@ -26,6 +26,25 @@
<link href='http://fonts.googleapis.com/css?family=Asap:400,700' rel='stylesheet' type='text/css'>
<style>
.input_all {
width: 50%;
padding: 10px;
}
.input_all div {
font-size: 18pt;
font-family: Helvetica;
text-align: left;
color: #323232;
}
.input_all input {
border: none;
border-bottom: 1px solid #969696;
font-family: PingFangSC;
padding-left: 0;
}
.header-right-yuan {
width: 50px;
height: 50px;
... ... @@ -49,7 +68,7 @@
border: 10px solid #97DAB6;
flex: 4;
padding: 50px;
height: 550px;
/* height: 550px; */
}
.save-right {
... ... @@ -162,39 +181,35 @@
<div>让企业更多了解你</div>
</div>
<div class="save-right1">
<div style="display: flex;">
<div style="padding-right: 40px;">
<p style="font-family: Helvetica;"></p>
<input id='surname' style="border: none;font-family: PingFangSC;border-bottom: 1px solid #969696;padding-left: 0;width: 350px;" class="save-input-info" placeholder="E.g. 张">
<div style="padding: 20px;display: flex;flex-wrap: wrap;">
<div class="input_all">
<div></div>
<input id='surname' placeholder="E.g. 张" />
</div>
<div>
<p style="font-family: Helvetica;"></p>
<input id='userName' style="border: none;font-family: PingFangSC;border-bottom: 1px solid #969696;padding-left: 0;width: 350px;" placeholder="E.g. 小明">
<div class="input_all">
<div></div>
<input id='userName' placeholder="E.g. 小明" />
</div>
</div>
<div style="display: flex;margin-top: 40px;">
<div style="padding-right: 40px;">
<p style="font-family: Helvetica;">学校</p>
<input id='school' style="border: none;font-family: PingFangSC;border-bottom: 1px solid #969696;padding-left: 0;width: 350px;" placeholder="E.g. 上海财经大学">
<div class="input_all">
<div>学校</div>
<input id='school' placeholder="E.g. 上海财经大学" />
</div>
<div>
<p style="font-family: Helvetica;">专业</p>
<input id="specialty" style="border: none;font-family: PingFangSC;border-bottom: 1px solid #969696;padding-left: 0;width: 350px;" placeholder="E.g. 金融学专业">
<div class="input_all">
<div>专业</div>
<input id='specialty' placeholder="E.g. 金融学专业" />
</div>
</div>
<div style="display: flex;margin-top: 40px;">
<div style="padding-right: 40px;">
<p style="font-family: Helvetica;">手机号</p>
<input id="phone" style="border: none;font-family: PingFangSC;border-bottom: 1px solid #969696;padding-left: 0;width: 350px;" placeholder="E.g. 15612388888">
<div class="input_all">
<div>手机号</div>
<input id='phone' placeholder="E.g. 15612388888" />
</div>
<div>
<p style="font-family: Helvetica;">邮箱</p>
<input id="emailAddress" type="text" style="border: none;font-family: PingFangSC;border-bottom: 1px solid #969696;padding-left: 0;width: 350px;" placeholder="E.g. student001@start-line.com">
<div class="input_all">
<div>邮箱</div>
<input id='emailAddress' placeholder="E.g. student001@start-line.com" />
</div>
</div>
<div class="btnSave" style="display: flex;place-items: center;margin: 110px;justify-content: flex-end;">
<h5 style="position: absolute;border-radius: 50%;background-color: #66CA94;z-index: 2;width: 50px;height: 50px;opacity: 0.5;margin-right:10px"></h5>
<a style="position: relative;z-index: 5;color: #323232;font-family: PingFangSC;cursor: pointer;font-size: 18px;">确定保存</a>
<div class="btnSave " style="display: flex;place-items: center;margin-right: 15%;justify-content: flex-end; ">
<h5 style="position: absolute;border-radius: 50%;background-color: #66CA94;z-index: 2;width: 50px;height: 50px;opacity: 0.5;margin-right:10px "></h5>
<a style="position: relative;z-index: 5;color: #323232;font-family: PingFangSC;cursor: pointer;font-size: 18px; ">确定保存</a>
</div>
</div>
<div class="save-right">
... ...
$(document).ready(function() {
var header = {
"Content-Type": "application/x-www-form-urlencoded",
"token": localStorage.getItem('token'),
}
ajax("/login/userInfo", "GET", header, params, function(res) {
console.log(res);
alert('保存成功!')
window.location.href = 'index.html'
}, function(res) {
console.log(res);
})
// var header = {
// "Content-Type": "application/x-www-form-urlencoded",
// "token": localStorage.getItem('token'),
// }
// ajax("/login/userInfo", "GET", header, function(res) {
// console.log(res);
// alert('保存成功!')
// window.location.href = 'index.html'
// }, function(res) {
// console.log(res);
// })
});
... ...
<html>
<head>
<!-- META DATA -->
<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="Free Bootstrap Themes - Free Responsive Html5 Templates">
<meta name="author" content="#">
<title>Study</title>
<!-- Bootstrap Core CSS -->
<link rel="stylesheet" href="css/bootstrap.min.css" type="text/css">
<!-- <link rel="stylesheet" href="css/bootstrap1.min.css" type="text/css"> -->
<!-- Owl Carousel Assets -->
<link href="owl-carousel/owl.carousel.css" rel="stylesheet">
<link href="owl-carousel/owl.theme.css" rel="stylesheet">
<!-- Custom CSS -->
<link rel="stylesheet" href="css/style2.css">
<!-- Custom Fonts -->
<link rel="stylesheet" href="font-awesome-4.4.0/css/font-awesome.min.css" type="text/css">
<link href='http://fonts.googleapis.com/css?family=Asap:400,700' rel='stylesheet' type='text/css'>
<style>
.header-right-yuan {
width: 50px;
height: 50px;
}
.save-all {
display: flex;
background-color: #FCFBFD;
margin: 0 10%;
}
.save-left {
flex: 2;
}
.save-left p {
color: #66CA94;
}
.save-right1 {
border: 10px solid #97DAB6;
flex: 4;
padding: 50px;
}
.save-right {
display: none;
}
.save-left div {
font-size: 40px;
font-family: SourceHanSansCN, SourceHanSansCN-Regular;
font-weight: 400;
text-align: left;
color: #323232;
line-height: 60px;
}
.login-footer-all {
display: none;
}
.input_all {
width: 50%;
padding: 10px;
}
.input_all div {
font-size: 18pt;
font-family: Helvetica;
text-align: left;
color: #323232;
}
.input_all input {
border: none;
border-bottom: 1px solid #969696;
font-family: PingFangSC;
padding-left: 0;
}
@media (max-width: 768px) {
.header-txt1 {
margin: 25px 20px;
place-items: center;
}
.header-right-yuan {
width: 35px;
height: 35px;
}
.header-img1 {
width: 25%;
}
.header-right-btn {
margin-right: 0px;
bottom: 0px
}
.save-all {
display: flex;
flex-direction: column;
background-color: #FCFBFD;
margin: 80px 10px 0;
}
.save-right1 {
display: none;
}
.save-right {
display: block;
border: 10px solid #97DAB6;
flex: 4;
padding: 20px;
height: 550px;
margin-top: 20px;
margin-bottom: 40px;
}
.save-input-title {
font-family: Helvetica;
font-size: 14px;
padding-bottom: 10px;
}
.save-left p {
font-size: 9px;
padding-left: 20px;
}
.save-left div {
padding-left: 20px;
font-size: 14px;
font-family: PingFangSC, PingFangSC-Semibold;
text-align: left;
color: #323232;
line-height: 24px;
}
.login-footer-all {
display: flex;
background: #323232;
flex-direction: column;
place-items: center;
display: flex;
}
}
</style>
</head>
<body>
<header>
<nav>
<div class="header-txt1" style="display: flex;justify-content: space-between;">
<div class="header-img1">
<img src="./img/portfolio/B1.png" style="width: 100%;">
</div>
<div class="header-right1">
<!-- <div class="header-btnL">
<a href="aboutUs.html">
<div class="header-loginBtn" style="color: #323232;border-bottom: 1px solid #323232;margin-right: 30px;">加入我们</div>
</a>
</div> -->
<!-- <a class="header-right-btn"> -->
<a class="header-right-btn" onclick="setPersonal()">
<img src="./img/portfolio/circle.png" class="header-right-yuan">
</a>
</div>
</div>
</nav>
</header>
<div class="save-all">
<div class="save-left">
<p>Complete Your Background.</p>
<div>完善你的信息</div>
<div>让企业更多了解你</div>
</div>
<div class="save-right1">
<div style="padding: 20px;display: flex;flex-wrap: wrap;">
<div class="input_all">
<div></div>
<input id='surname' placeholder="E.g. 张" />
</div>
<div class="input_all">
<div></div>
<input id='userName' placeholder="E.g. 小明" />
</div>
<div class="input_all">
<div>学校</div>
<input id='school' placeholder="E.g. 上海财经大学" />
</div>
<div class="input_all">
<div>专业</div>
<input id='specialty' placeholder="E.g. 金融学专业" />
</div>
<div class="input_all">
<div>手机号</div>
<input id='phone' placeholder="E.g. 15612388888" />
</div>
<div class="input_all">
<div>邮箱</div>
<input id='emailAddress' placeholder="E.g. student001@start-line.com" />
</div>
<div class="input_all">
<div>验证码</div>
<div style="display: flex;border-bottom: 1px solid #969696;place-items: center;">
<input id='verificationCode' placeholder="123456" style="border-bottom: none;flex: 1;" />
<button style="font-size: 18px;
flex: 1;
border: none;
background: none;
cursor: pointer;
font-family: PingFangSC, PingFangSC-Medium;
font-weight: 500;
text-align: right;
color: #66ca94;" id="code-btn">获取验证码</button>
</div>
</div>
</div>
<div class="btnSave" style="display: flex;place-items: center;margin-right: 15%;justify-content: flex-end; ">
<h5 style="position: absolute;border-radius: 50%;background-color: #66CA94;z-index: 2;width: 50px;height: 50px;opacity: 0.5;margin-right:10px "></h5>
<a style="position: relative;z-index: 5;color: #323232;font-family: PingFangSC;cursor: pointer;font-size: 18px; ">确定保存</a>
</div>
</div>
<div class="save-right">
<div style="display: flex;flex-direction: column; ">
<div style="padding-bottom: 10px; ">
<p class="save-input-title "></p>
<input id='surname' style="border: none;font-family: PingFangSC;border-bottom: 1px solid #969696;padding-left: 0;width: 100%; " class="save-input-info " placeholder="E.g. 张 ">
</div>
<div style="padding-bottom: 10px; ">
<p class="save-input-title "></p>
<input id='userName' style="border: none;font-family: PingFangSC;border-bottom: 1px solid #969696;padding-left: 0;width: 100%; " placeholder="E.g. 小明 ">
</div>
<div style="padding-bottom: 10px; ">
<p class="save-input-title ">学校</p>
<input id='school' style="border: none;font-family: PingFangSC;border-bottom: 1px solid #969696;padding-left: 0;width: 100%; " placeholder="E.g. 上海财经大学 ">
</div>
<div style="padding-bottom: 10px; ">
<p class="save-input-title ">专业</p>
<input id="specialty" style="border: none;font-family: PingFangSC;border-bottom: 1px solid #969696;padding-left: 0;width: 100%; " placeholder="E.g. 金融学专业 ">
</div>
<div style="padding-bottom: 10px; ">
<p class="save-input-title ">手机号</p>
<input id="phone" style="border: none;font-family: PingFangSC;border-bottom: 1px solid #969696;padding-left: 0;width: 100%; " placeholder="E.g. 15612388888 ">
</div>
<div style="padding-bottom: 10px; ">
<p class="save-input-title ">邮箱</p>
<input id="emailAddress" type="text " style="background: none;border: none;font-family: PingFangSC;border-bottom: 1px solid #969696;padding-left: 0;width: 100%; " placeholder="E.g. student001@start-line.com ">
</div>
</div>
<div style="width: 100%; height: 40px; font-size: 9px; font-family: Helvetica; text-align: justify; color: #323232; line-height: 20px; ">start-line虚拟实习体验项目均由资深职场人士设计打造,项目涉及的行业知、办公技能、工作任务均来源金融行业。</div>
<div class="btnSave" style=" text-align: center; background: #66ca94; border-radius: 25px; padding: 9px 30px; width: 120px; color: #323232; font-size: 12px; margin: 40px auto 10px; ">
<!-- <h5 style="position: absolute;border-radius: 50%;background-color: #66CA94;z-index: 2;width: 50px;height: 50px;opacity: 0.5;margin-right:10px "></h5>
<a style="position: relative;z-index: 5;color: #323232;font-family: PingFangSC;cursor: pointer;font-size: 18px; ">确定保存</a> -->
立即注册
</div>
<div style="font-size: 9px; font-family: Helvetica; text-align: justify; color: #969696; line-height: 20px; ">start-line虚拟实习体验项目均由资深职场人士设计打造,项目涉及的行业知、办公技能。</div>
</div>
</div>
<div class="login-footer-all">
<div class="login-footer-img" style="width: 25%;margin-top: 45px; ">
<img src="img/portfolio/whiteLogo.png" width="100% ">
</div>
<div style="color: #fff; font-family: PingFangSC, PingFangSC-Regular; text-align: center; font-size: 9px;margin-top: 12px; ">成功职场第一步,从Start-Line开始</div>
<div style="color: #66CA94;font-size: 12px;font-family: PingFangSC, PingFangSC-Regular;margin: 60px 0 20px; ">关注Start-Line</div>
<div style="width: 25%;margin-bottom: 200px; ">
<img src="img/portfolio/EWM.png" width="100% ">
</div>
</div>
<!-- jQuery -->
<script type="text/javascript" src="js/jquery-2.1.1.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<!-- Custom Theme JavaScript -->
<script src="js/agency.js"></script>
<script src="./save1.js"></script>
<!-- Plugin JavaScript -->
<script src="js/jquery.easing.min.js"></script>
<script src="js/classie.js"></script>
<script src="js/cbpAnimatedHeader.js"></script>
<script src="config.js"></script>
<!-- carousel -->
<script src="owl-carousel/owl.carousel.js"></script>
<script>
$(document).ready(function() {
$("#owl-brand").owlCarousel({
autoPlay: 3000,
items: 1,
itemsDesktop: [1199, 1],
itemsDesktopSmall: [979, 2],
navigation: false,
navigationText: ['<i class="fa fa-chevron-left fa-5x "></i>', '<i class="fa fa-chevron-right fa-5x"></i>']
});
});
</script>
</body>
</html>
\ No newline at end of file
... ...
$(document).ready(function() {
// var header = {
// "Content-Type": "application/x-www-form-urlencoded",
// "token": localStorage.getItem('token'),
// }
// ajax("/login/userInfo", "GET", header, function(res) {
// console.log(res);
// alert('保存成功!')
// window.location.href = 'index.html'
// }, function(res) {
// console.log(res);
// })
var code = ''; //接受验证码
var reg_phone = /^1[3|4|5|6|7|8][0-9]\d{8}$/;
$("#code-btn").click(function() {
console.log(111111111);
var count = 60;
var phone = $("#phone").val(); //获取手机号
if (!reg_phone.test(phone)) { //验证手机是否符合格式
alert("请填写正确的手机号");
return false;
}
//开始计时
$("#code-btn").attr('disabled', 'disabled');
$("#code-btn").html("倒计时" + count + "秒");
var timer = setInterval(function() {
count--;
$("#code-btn").html("倒计时" + count + "秒");
if (count == 0) {
clearInterval(timer);
$("#code-btn").attr("disabled", false); //启用按钮
$("#code-btn").html("重新发送验证码");
code = ""; //清除验证码。如果不清除,过时间后,输入收到的验证码依然有效
}
}, 1000);
var header1 = {
"Content-Type": "application/x-www-form-urlencoded"
}
var params1 = { phoneNumber: phone }
//获取验证码接口
ajax('/login/codeLogin', "GET", header1, params1, function(res) {
console.log(res);
}, function(res) {})
});
});
//获取用户VIP信息判断是否是VIP
function setPersonal() {
alert('请完善个人信息!')
}
$(".btnSave").click(function() {
//姓
var inputSurname = $("#surname").val();
console.log(inputSurname);
//名
var inputUserName = $("#userName").val();
console.log(inputUserName);
//专业(null)
var inputSpecialty = $("#specialty").val();
console.log(inputSpecialty);
//学校
var inputSchool = $("#school").val();
console.log(inputSchool);
//手机号
var inputPhone = $("#phone").val();
console.log(inputPhone);
//邮箱
var inputEmailAddress = $("#emailAddress").val();
console.log(inputEmailAddress);
//验证码
var verificationCode = $("#verificationCode").val();
console.log(verificationCode);
var reg_phone = /^1[3|4|5|6|7|8][0-9]\d{8}$/;
if (inputSurname.length === 0) {
alert("姓氏不能为空!")
} else if (inputUserName.length === 0) {
alert("名字不能为空!")
} else if (inputSchool.length === 0) {
alert("学校不能为空!")
} else if (inputPhone.length === 0) {
alert("手机号码不能为空!")
} else if (!reg_phone.test(inputPhone)) {
alert("请填写正确的手机号");
return false;
} else if (verificationCode.length === 0) {
alert("验证码不能为空!")
} else if (inputEmailAddress.length === 0) {
alert("邮箱不能为空!")
} else if (/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(inputEmailAddress) == false) {
alert("邮箱格式不正确,请重新填写!")
} else {
var header = {
"Content-Type": "application/json",
"token": localStorage.getItem('token'),
}
var params = JSON.stringify({
code: verificationCode,
emailAddress: inputEmailAddress,
id: localStorage.getItem("userId"),
img: null,
phoneNumber: inputPhone,
specialty: inputSpecialty,
school: inputSchool,
surname: inputSurname,
userName: inputUserName
})
ajax("/login/updateUsers", "PUT", header, params, function(res) {
console.log(res);
alert('保存成功!')
window.location.href = 'index.html'
}, function(res) {
alert(res.responseJSON.msg)
console.log(res);
})
}
})
\ No newline at end of file
... ...