|
@@ -37,6 +37,39 @@ function afterJyObjInit(){
|
|
|
redSpotOnMenu({{session "s_m_openid"}});
|
|
|
}
|
|
|
function initpage(){
|
|
|
+ $.ajax({
|
|
|
+ type: 'post',
|
|
|
+ url: '/jyapp/front/hasPushHistory?t='+new Date().getTime(),
|
|
|
+ data: {},
|
|
|
+ async: false,
|
|
|
+ dataType: 'json',
|
|
|
+ success: function(data){
|
|
|
+ success = data.success;
|
|
|
+ lasttime = data.thistime;
|
|
|
+ firstPage = data.data;
|
|
|
+ if(data.data.length>0){
|
|
|
+ a_visitedindex = data.data[0].a_visitedindex;
|
|
|
+ }
|
|
|
+ if(!success && !data.haskey){
|
|
|
+ if(sessionStorage&&(sessionStorage.keysetindexToHistory=="1"||sessionStorage.keysetindexToHistory=="2"||sessionStorage.keysetindexToHistory=="3")){
|
|
|
+ sessionStorage.removeItem("keysetindexToHistory");
|
|
|
+ }else{
|
|
|
+ history.pushState({},"","");
|
|
|
+ if(data.isInTSguide){
|
|
|
+ if(localStorage){
|
|
|
+ localStorage.removeItem("tsGuide_status");
|
|
|
+ }
|
|
|
+ window.location.href='/jyapp/tenderSubscribe/guide';
|
|
|
+ }else{
|
|
|
+ window.location.href='/jyapp/wxkeyset/keyset/index';
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error: function(xhr, type){
|
|
|
+ hasNoData();
|
|
|
+ }
|
|
|
+ });
|
|
|
new FastClick(document.body);
|
|
|
$("#gotosetpage").click(function(){
|
|
|
setSessionStorage();
|
|
@@ -86,7 +119,7 @@ function initpage(){
|
|
|
noMoreData(wxflag,1);
|
|
|
}
|
|
|
$(window).scrollTop(scrollTop);
|
|
|
- sessionStorage.removeItem("historypushDataCache");
|
|
|
+ // sessionStorage.removeItem("historypushDataCache");
|
|
|
sessionStorage.removeItem("historypushListCache");
|
|
|
sessionStorage.removeItem("historypushTableCache");
|
|
|
sessionStorage.removeItem("historypushLasttimeCache");
|
|
@@ -95,39 +128,39 @@ function initpage(){
|
|
|
sessionStorage.removeItem("historypushCount");
|
|
|
localStorage.removeItem("listortable"+{{.T._id}},"T");
|
|
|
}else{
|
|
|
- $.ajax({
|
|
|
- type: 'post',
|
|
|
- url: '/jyapp/front/hasPushHistory?t='+new Date().getTime(),
|
|
|
- data: {},
|
|
|
- async: false,
|
|
|
- dataType: 'json',
|
|
|
- success: function(data){
|
|
|
- success = data.success;
|
|
|
- lasttime = data.thistime;
|
|
|
- firstPage = data.data;
|
|
|
- if(data.data.length>0){
|
|
|
- a_visitedindex = data.data[0].a_visitedindex;
|
|
|
- }
|
|
|
- if(!success && !data.haskey){
|
|
|
- if(sessionStorage&&(sessionStorage.keysetindexToHistory=="1"||sessionStorage.keysetindexToHistory=="2"||sessionStorage.keysetindexToHistory=="3")){
|
|
|
- sessionStorage.removeItem("keysetindexToHistory");
|
|
|
- }else{
|
|
|
- history.pushState({},"","");
|
|
|
- if(data.isInTSguide){
|
|
|
- if(localStorage){
|
|
|
- localStorage.removeItem("tsGuide_status");
|
|
|
- }
|
|
|
- window.location.href='/jyapp/tenderSubscribe/guide';
|
|
|
- }else{
|
|
|
- window.location.href='/jyapp/wxkeyset/keyset/index';
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- error: function(xhr, type){
|
|
|
- hasNoData();
|
|
|
- }
|
|
|
- });
|
|
|
+ // $.ajax({
|
|
|
+ // type: 'post',
|
|
|
+ // url: '/jyapp/front/hasPushHistory?t='+new Date().getTime(),
|
|
|
+ // data: {},
|
|
|
+ // async: false,
|
|
|
+ // dataType: 'json',
|
|
|
+ // success: function(data){
|
|
|
+ // success = data.success;
|
|
|
+ // lasttime = data.thistime;
|
|
|
+ // firstPage = data.data;
|
|
|
+ // if(data.data.length>0){
|
|
|
+ // a_visitedindex = data.data[0].a_visitedindex;
|
|
|
+ // }
|
|
|
+ // if(!success && !data.haskey){
|
|
|
+ // if(sessionStorage&&(sessionStorage.keysetindexToHistory=="1"||sessionStorage.keysetindexToHistory=="2"||sessionStorage.keysetindexToHistory=="3")){
|
|
|
+ // sessionStorage.removeItem("keysetindexToHistory");
|
|
|
+ // }else{
|
|
|
+ // history.pushState({},"","");
|
|
|
+ // if(data.isInTSguide){
|
|
|
+ // if(localStorage){
|
|
|
+ // localStorage.removeItem("tsGuide_status");
|
|
|
+ // }
|
|
|
+ // window.location.href='/jyapp/tenderSubscribe/guide';
|
|
|
+ // }else{
|
|
|
+ // window.location.href='/jyapp/wxkeyset/keyset/index';
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ // error: function(xhr, type){
|
|
|
+ // hasNoData();
|
|
|
+ // }
|
|
|
+ // });
|
|
|
if(!success){
|
|
|
hasNoData();
|
|
|
return;
|
|
@@ -500,7 +533,7 @@ function beforeJump(eid,h,sds){
|
|
|
if(dataCache[i].a_visitedindex.length>0){
|
|
|
visitedArr = dataCache[i].a_visitedindex;
|
|
|
if(JSON.stringify(visitedArr).indexOf(eid)<0){
|
|
|
- dataCache[i].a_visitedindex = visitedArr.push(eid)
|
|
|
+ dataCache[i].a_visitedindex = visitedArr.push(eid);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -520,7 +553,7 @@ function setSessionStorage(){
|
|
|
}
|
|
|
|
|
|
function setVisitedIndex(obj,eid){
|
|
|
- console.log(obj.hasClass("visited")+"--------");
|
|
|
+ // console.log(obj.hasClass("visited")+"--------");
|
|
|
if(obj.find("a.bt").hasClass("visit")||obj.hasClass("visited")){
|
|
|
return;
|
|
|
}
|