鸿基html转换软件,3.html · 鸿基梦/lenovowolf - Gitee.com

狼图

/*版本控制*/

function freshUrl(){

var curUrl=window.location.href;

function timestamp(url){

// var getTimestamp=Math.random();

var getTimestamp=new Date().getTime();

if(url.indexOf("timestamp=")>-1){

var timer=+new Date;

var index1=url.indexOf('timestamp=')+'timestamp='.length;

var index2=index1+13;

url=url.replace(url.substr(index1,index2),timer);

}else{

url=url+"?timestamp="+getTimestamp

}

return url;

}

if(curUrl.indexOf('timestamp=')!=-1){

var curTimer=+new Date;

var strIndex=curUrl.indexOf('timestamp=')+'timestamp='.length;

var timer=curUrl.substr(strIndex);

if(curTimer-timer>5000){

window.location.href=timestamp(curUrl);

}

}else{

window.location.href=timestamp(curUrl);

}

}

freshUrl();

/*中英文切换*/

$(function(){

/*function ec(){

$('#ce').click(function(){

$(this).css({'z-index':'1','opacity':'0'});

$('#ee').css({'z-index':'2','opacity':'1'});

$('.tab img').each(function(index) {

var self_=$(this);

self_.attr('src',self_.attr('src').replace('/cn/','/en/'));

});

});

$('#ee').click(function(){

$(this).css({'z-index':'1','opacity':'0'});

$('#ce').css({'z-index':'2','opacity':'1'});

$('.tab img').each(function(index) {

var self_=$(this);

self_.attr('src',self_.attr('src').replace('/en/','/cn/'));

});

});

}

ec();*/

/*屏幕适配*/

function screenChange(){

var $tabW=$('.tabc').width();

var $tabH=$('.tabc').height();

if($tabW>$tabH&&$tabW/$tabH>2){

$('.tabc_div').css({'width':'68%','left':'16%'});

$('.wolfhead').css({'width':'44%','left':'28%'});

}else if($tabH>$tabW&&$tabH/$tabW>2){

$('.tabc_div').css({'width':'68%','left':'16%'});

$('.wolfhead').css({'width':'44%','left':'28%'});

}else if($tabW>$tabH&&$tabW/$tabH>568/320){

$('.tabc_div').css({'width':'74%','left':'11%'});

}else if($tabH>$tabW&&$tabH/$tabW>568/320){

$('.tabc_div').css({'width':'74%','left':'11%'});

}else{

$('.tabc_div').css({'width':'85%','left':'7%'});

$('.wolfhead').css({'width':'50%','left':'25%'});

}

if($('body').attr('hs')==0)

$('.clickh').removeClass('clickh').addClass('clickh1');

else

$('.clickh1').removeClass('clickh1').addClass('clickh');

}

screenChange();

window.addEventListener('resize',screenChange);

});

var a = location.href.split('#')[0];

$.ajax({

url: './wechat.php',

type: 'POST',

dataType: 'json',

data: {url: a},

complete: function(xhr, textStatus) {

//called when complete

},

success: function(json) {

main(json)

},

error: function(json) {}

});

function main(json) {

wx.config({

debug: false,

appId: 'wx29c765fedd72a774',

timestamp: json.timestamp,

nonceStr: json.noncestr,

signature: json.signature,

jsApiList: [

'checkJsApi',

'onMenuShareTimeline',

'onMenuShareAppMessage',

'onMenuShareQQ',

'onMenuShareWeibo'

]

});

}

一键复制

编辑

Web IDE

原始数据

按行查看

历史

你可能感兴趣的:(鸿基html转换软件)