|
@@ -52,14 +52,15 @@ $(function(){
|
|
|
$('.banner_box ul li').eq(curidx+1).find('img').attr('src',simg)
|
|
|
})
|
|
|
//导航
|
|
|
+ var headt=$('header').clone();
|
|
|
$(window).scroll(function(){
|
|
|
- var scrolltop=$(document).scrollTop()
|
|
|
- if(scrolltop>400){
|
|
|
- $('header').addClass('h_fix')
|
|
|
- $('body').css({paddingTop:'74px'})
|
|
|
- }else{
|
|
|
- $('header').removeClass('h_fix')
|
|
|
- $('body').css({paddingTop:0})
|
|
|
+ var scrolltop=$(document).scrollTop()
|
|
|
+ if(scrolltop>600){
|
|
|
+ headt.addClass('h_fix');
|
|
|
+ $('body').append(headt)
|
|
|
+ $('.h_fix').slideDown(200)
|
|
|
+ }else{
|
|
|
+ $('.h_fix').slideUp(200)
|
|
|
}
|
|
|
});
|
|
|
|
|
@@ -141,11 +142,46 @@ $(function(){
|
|
|
})
|
|
|
$('form').submit(function(){
|
|
|
var Suser=$('#Lo_user').val();
|
|
|
- var Spass=$('#Lo_pass').val();
|
|
|
+ var Spass=$('#Lo_pass').val();
|
|
|
+ var check_experts=$('#checks').prop('checked');
|
|
|
+ var experts=check_experts?0:1;
|
|
|
+ console.log(Suser,Spass,experts)
|
|
|
if(Suser==''||Spass==''||Suser=='用户名/邮箱/手机'||Spass=='请输入密码'){
|
|
|
return false;
|
|
|
}else{
|
|
|
- return true;
|
|
|
+ $.ajax({
|
|
|
+ method: "POST",
|
|
|
+ dataType: "json",
|
|
|
+ url: globalConfig.context + "/signin",
|
|
|
+ data: {
|
|
|
+ "mobile": Suser,
|
|
|
+ "password": Spass,
|
|
|
+ "type": experts,
|
|
|
+ "remember": false,
|
|
|
+ },
|
|
|
+ success: function (rest) {
|
|
|
+ if (rest.error && rest.error.length) {
|
|
|
+ message.warning(rest.error[0].message);
|
|
|
+ } else {
|
|
|
+ var data = rest.data;
|
|
|
+ if (data && data.requestURI) {
|
|
|
+ var path = globalConfig.context + data.requestURI
|
|
|
+ if (data.queryString) {
|
|
|
+ path += '?' + data.queryString;
|
|
|
+ }
|
|
|
+ if (window.location.hash) {
|
|
|
+ path += window.location.hash;
|
|
|
+ }
|
|
|
+ window.location.href = path;
|
|
|
+ } else {
|
|
|
+ window.location.href = globalConfig.context + "/user/account/index.html";
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
}
|
|
|
})
|
|
|
|