123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136 |
- $(function(){
-
- var h = $(window).height();
- var w = $(window).width();
-
- $('.menu').on('click',function(){
- $(".sidebar_box").animate({right:"0"});
- $('.ground').css({"width":w,"height":h});
- })
-
- $('.sidebar_img').on('click',function(){
- $(".sidebar_box").animate({right:"-100%"});
- $('.ground').css({"width":'0',"height":'0'});
- })
-
- $('.ground').on('click',function(){
- $(".sidebar_box").animate({right:"-100%"});
- $(this).css({"width":'0',"height":'0'});
- })
- $('.m_language').on('click',function(){
- $('.m_language_text').toggle();
- })
- $('.m_language_text span').on('click',function(){
- $(this).parent().attr('id','none');
- console.log(1);
- })
-
-
- $(window).scroll(function (){
- var ster = $(this).scrollTop();
- navign(ster);
- });
-
- $('.m_hqDiscountgb').on('click',function(){
- $('.m_hqDiscount_box').hide();
- })
- $('.flonh').on('click',function(){
- $('.m_hqDiscount_box').show();
- })
-
- PublicAction.AjaxSend(
- {
- CORID:'wflbtn',
- }
- );
-
-
- })
-
- var dir = $(document).scrollTop();
- navign(dir);
- function navign(st){
- if(st >180){
- $('.y_header').css('background','rgba(0,0,0,0.6)');
- }else if(st>80 && st <= 180){
- $('.y_header').css('background','rgba(0,0,0,0.2)');
- }else{
- $('.y_header').css('background','rgba(0,0,0,0)');
- }
- }
- var myDate = new Date;
- var year = myDate.getFullYear();
- var yue = myDate.getMonth()+1;
- if (yue<10) {
- yue= '0' + yue;
- }else if(yue == 13){
- yue = '01';
- };
- function mGetDate(yue){
- var date = new Date();
- var year = date.getFullYear();
- var d = new Date(year,parseInt(yue), 0);
- return d.getDate();
- }
- var whtmltimes = year + '/'+ yue + '/' + mGetDate(yue);
- var whtmltime = year + '/'+ yue + '/' +'01'+'-'+ year + '/'+ yue + '/' + mGetDate(yue);
- var time_yxq= whtmltime;
- var timew =whtmltimes
- $('.youxiaoqi_sj').html('有效期至:'+timew+'');
- var cookie = {
-
- set:function(key,val,time){
- var date=new Date();
- var expiresDays=time;
- date.setTime(date.getTime()+expiresDays*24*3600*1000);
- document.cookie=key + "=" + val +";expires="+date.toGMTString();
- },
-
- get:function(key){
-
- var getCookie = document.cookie.replace(/[ ]/g,"");
- var arrCookie = getCookie.split(";")
- var tips;
- for(var i=0;i<arrCookie.length;i++){
- var arr=arrCookie[i].split("=");
- if(key==arr[0]){
- tips=arr[1];
- break;
- }
- }
- return tips;
- },
-
- delete:function(key){
- var date = new Date();
- date.setTime(date.getTime()-10000);
- document.cookie = key + "=v; expires =" +date.toGMTString();
- }
- }
|