|
@@ -81,12 +81,7 @@
|
|
|
|
|
|
var words = ""
|
|
|
var isInTSguide = false;//订阅向导
|
|
|
- var isVipSub = false;//是不是VIP
|
|
|
var firstTime = {{.T.selectTime}};
|
|
|
- var isPassCount = false; //提示信息
|
|
|
- var haskey = false;//是否有关键词
|
|
|
- var isOnTail = false;//是否在试用
|
|
|
- var isExpire = 0;//到期天数3 2 1
|
|
|
var userId = "";
|
|
|
var selectCity = "";
|
|
|
|
|
@@ -115,30 +110,133 @@
|
|
|
$(".listcontent").scroll(function () {
|
|
|
scrollTop = $(this).scrollTop();
|
|
|
});
|
|
|
+ this.InitPersonal=function(r){
|
|
|
+ $("#sub_manager").click(tokeyset);
|
|
|
+ $(".tab_left .area").hide();
|
|
|
+ $(".vip_banner").show();
|
|
|
+ if (r.isPassCount) {
|
|
|
+ $(".open_remind").show();
|
|
|
+ }
|
|
|
+ if (r.isExpire < 0 && r.isOnTail == -1) {
|
|
|
+ if (localStorage.getItem("nv_vip_" + userId) == null) {
|
|
|
+ $(".nv_renew_toast").show();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (!firstPage.length > 0 && !r.haskey) {
|
|
|
+ if (sessionStorage && (sessionStorage.keysetindexToHistory == "1" || sessionStorage.keysetindexToHistory == "2" || sessionStorage.keysetindexToHistory == "3")) {
|
|
|
+ sessionStorage.removeItem("keysetindexToHistory");
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (firstTime != "") {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ history.pushState({}, "", "");
|
|
|
+ if (isInTSguide) {
|
|
|
+ if (localStorage) {
|
|
|
+ localStorage.removeItem("tsGuide_status");
|
|
|
+ }
|
|
|
+ window.location.href = '/jyapp/tenderSubscribe/guide';
|
|
|
+ } else {
|
|
|
+ window.location.href = '/jyapp/wxkeyset/keyset/index';
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.InitVip=function(r){
|
|
|
+ $("#sub_manager").click(tosetpage);
|
|
|
+ $(".vip_report").show();
|
|
|
+ $(".tab_left .area").show();
|
|
|
+ if (!r.haskey) {
|
|
|
+ $(".set_keyword").show();
|
|
|
+ if (r.isPassCount && (localStorage.isPassCount == null || localStorage.isPassCount != date.split("-")[2])) {
|
|
|
+ localStorage.isPassCount = date.split("-")[2]
|
|
|
+ weuiDialog();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (r.isOnTail != 1) {
|
|
|
+ if (r.isExpire > 1) {
|
|
|
+ $(".renew_toast .isExpire").text(r.isExpire);
|
|
|
+ $(".renew_toast").show();
|
|
|
+ } else if (r.isExpire > 0) {
|
|
|
+ $(".renew_toast").find(".other").hide();
|
|
|
+ $(".renew_toast").find(".today").show();
|
|
|
+ $(".renew_toast").show();
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (r.isExpire > 1) {
|
|
|
+ $("._renew_toast .isExpire").text(r.isExpire);
|
|
|
+ $("._renew_toast").show();
|
|
|
+ } else if (r.isExpire > 0) {
|
|
|
+ $("._renew_toast").find(".other").hide();
|
|
|
+ $("._renew_toast").find(".today").show();
|
|
|
+ $("._renew_toast").show();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $.post("/subscribepay/report/tip?t=" + new Date().getTime(), null, function (r) {
|
|
|
+ if (r.unread > 0) {
|
|
|
+ $(".vip_report>a").show();
|
|
|
+ }
|
|
|
+ if (r.tip) {
|
|
|
+ if (r.tip.type == 2) {
|
|
|
+ $(".vip_report_tip .weekly>span").text("周");
|
|
|
+ } else {
|
|
|
+ $(".vip_report_tip .weekly>span").text("月");
|
|
|
+ }
|
|
|
+ $(".vip_report_tip .term").text(new Date(Number(r.tip.startdate + "000")).Format("yyyy年M月d日") + "-" + new Date(Number(r.tip.enddate + "000")).Format("yyyy年M月d日"));
|
|
|
+ $('.vip_report_tip').fadeIn();
|
|
|
+ $('.vip_report_todetail').on('click', function () {
|
|
|
+ updateReportStatus(1, r.tip.startdate, r.tip.enddate, r.tip.pushcount);
|
|
|
+ });
|
|
|
+ $('.weui-dialog img.vip_report_tip_close').click(function () {
|
|
|
+ $('.vip_report_tip').fadeOut();
|
|
|
+ updateReportStatus(0);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ $(".vip_report").click(function () {
|
|
|
+ window.location.href = "/vipreport/page/subreport.html";
|
|
|
+ });
|
|
|
+ }
|
|
|
+ var thisClass = this;
|
|
|
$.post("/jyapp/myinfo?t="+new Date().getTime(),null,function(r){
|
|
|
if(r.hasEnt){
|
|
|
if(r.userType=="vip"){
|
|
|
$(".switch").addClass("switch-vip");
|
|
|
$(".switch>span").text("VIP订阅");
|
|
|
+ thisClass.InitVip(r);
|
|
|
}else if (r.userType=="ent"){
|
|
|
$(".switch").addClass("switch-ent");
|
|
|
$(".switch>span").text(r.entName);
|
|
|
+ $(".switch").click(function(){
|
|
|
+ window.location.href='/page_entniche/page/sub_mode/switch_mode.html';
|
|
|
+ });
|
|
|
+ $("#sub_manager").click(function(){
|
|
|
+ $.post("/entniche/ent/entinfo",null,function(r){
|
|
|
+ if(r.data.admin_system){
|
|
|
+ window.location.href='/page/sub_management/sub_management_system.html';
|
|
|
+ }else if(r.data.admin_department){
|
|
|
+ window.location.href='/page/sub_management/sub_management_department.html';
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
}else{
|
|
|
$(".switch").addClass("switch-personal");
|
|
|
$(".switch>span").text("标讯订阅(个人版)");
|
|
|
+ thisClass.InitPersonal(r);
|
|
|
}
|
|
|
$(".switch").click(function(){
|
|
|
- window.location.href='';
|
|
|
+ window.location.href='/page_entniche/page/sub_mode/switch_mode.html';
|
|
|
});
|
|
|
}else{
|
|
|
if(r.userType=="vip"){
|
|
|
$(".switch").addClass("only-vip");
|
|
|
$(".switch>span").text("VIP订阅");
|
|
|
- $(".switch").click(tosetpage);
|
|
|
+ $(".switch").click(tosetpage);
|
|
|
+ thisClass.InitVip(r);
|
|
|
}else{
|
|
|
$(".switch").addClass("only-personal");
|
|
|
$(".switch>span").text("¥5.8 开通VIP");
|
|
|
$(".switch").click(tointroducepage);
|
|
|
+ thisClass.InitPersonal(r);
|
|
|
}
|
|
|
}
|
|
|
});
|
|
@@ -151,14 +249,6 @@
|
|
|
hasNextPage = sessionStorage.historypushHasNextPage == "true" ? true : false;
|
|
|
scrollTop = sessionStorage.historypushScrollTop;
|
|
|
dataCache = JSON.parse(sessionStorage.historypushDataCache);
|
|
|
- isVipSub = sessionStorage.isVipSub == "true" ? true : false;
|
|
|
- ;
|
|
|
- isPassCount = sessionStorage.isPassCount == "true" ? true : false;
|
|
|
- ;
|
|
|
- haskey = sessionStorage.haskey == "true" ? true : false;
|
|
|
- ;
|
|
|
- isOnTail = sessionStorage.isOnTail;
|
|
|
- isExpire = sessionStorage.isExpire;
|
|
|
userId = sessionStorage.userId;
|
|
|
firstTime = sessionStorage.getItem(userId + "_searchTime");
|
|
|
selectCity = sessionStorage.getItem(userId + "_selectCity");
|
|
@@ -192,18 +282,8 @@
|
|
|
lasttime = data.thistime;
|
|
|
firstPage = data.data;
|
|
|
hasNextPage = data.hasNextPage;
|
|
|
- isVipSub = data.isVipSub;
|
|
|
- sessionStorage.isVipSub = isVipSub;
|
|
|
userId = data.userId;
|
|
|
sessionStorage.userId = userId;
|
|
|
- isPassCount = data.isPassCount;
|
|
|
- sessionStorage.isPassCount = isPassCount;
|
|
|
- haskey = data.haskey;
|
|
|
- sessionStorage.haskey = haskey;
|
|
|
- isOnTail = data.isOnTail;
|
|
|
- sessionStorage.isOnTail = isOnTail;
|
|
|
- isExpire = data.isExpire;
|
|
|
- sessionStorage.isExpire = isExpire;
|
|
|
sessionStorage.setItem(userId + "_searchTime", firstTime);
|
|
|
showPage();
|
|
|
},
|
|
@@ -265,96 +345,6 @@
|
|
|
$(".tab_left .time").show();
|
|
|
//地区渲染
|
|
|
mapData();
|
|
|
- //
|
|
|
- if (!isVipSub) {
|
|
|
- $("#sub_manager").click(function(){
|
|
|
- setSessionStorage();
|
|
|
- window.location.href = '/jyapp/wxkeyset/keyset/index';
|
|
|
- });
|
|
|
- $(".tab_left .area").hide();
|
|
|
- $(".vip_banner").show();
|
|
|
- //$(".listcontent").css("margin-top","2rem");
|
|
|
- if (isPassCount) {
|
|
|
- $(".open_remind").show();
|
|
|
- }
|
|
|
- if (parseInt(isExpire) < 0 && parseInt(isOnTail) == -1) {
|
|
|
- if (localStorage.getItem("nv_vip_" + userId) == null) {
|
|
|
- $(".nv_renew_toast").show();
|
|
|
- }
|
|
|
- }
|
|
|
- if (!firstPage.length > 0 && !haskey) {
|
|
|
- if (sessionStorage && (sessionStorage.keysetindexToHistory == "1" || sessionStorage.keysetindexToHistory == "2" || sessionStorage.keysetindexToHistory == "3")) {
|
|
|
- sessionStorage.removeItem("keysetindexToHistory");
|
|
|
- return
|
|
|
- }
|
|
|
- if (firstTime != "") {
|
|
|
- return
|
|
|
- }
|
|
|
- history.pushState({}, "", "");
|
|
|
- if (isInTSguide) {
|
|
|
- if (localStorage) {
|
|
|
- localStorage.removeItem("tsGuide_status");
|
|
|
- }
|
|
|
- window.location.href = '/jyapp/tenderSubscribe/guide';
|
|
|
- } else {
|
|
|
- window.location.href = '/jyapp/wxkeyset/keyset/index';
|
|
|
- }
|
|
|
- }
|
|
|
- } else {
|
|
|
- if (!haskey) {
|
|
|
- $(".set_keyword").show();
|
|
|
- if (isPassCount && (localStorage.isPassCount == null || localStorage.isPassCount != date.split("-")[2])) {
|
|
|
- localStorage.isPassCount = date.split("-")[2]
|
|
|
- weuiDialog();
|
|
|
- }
|
|
|
- }
|
|
|
- if (parseInt(isOnTail) != 1) {
|
|
|
- if (parseInt(isExpire) > 1) {
|
|
|
- $(".renew_toast .isExpire").text(parseInt(isExpire));
|
|
|
- $(".renew_toast").show();
|
|
|
- } else if (parseInt(isExpire) > 0) {
|
|
|
- $(".renew_toast").find(".other").hide();
|
|
|
- $(".renew_toast").find(".today").show();
|
|
|
- $(".renew_toast").show();
|
|
|
- }
|
|
|
- } else {
|
|
|
- if (parseInt(isExpire) > 1) {
|
|
|
- $("._renew_toast .isExpire").text(parseInt(isExpire));
|
|
|
- $("._renew_toast").show();
|
|
|
- } else if (parseInt(isExpire) > 0) {
|
|
|
- $("._renew_toast").find(".other").hide();
|
|
|
- $("._renew_toast").find(".today").show();
|
|
|
- $("._renew_toast").show();
|
|
|
- }
|
|
|
- }
|
|
|
- $("#sub_manager").click(tosetpage);
|
|
|
- $(".vip_report").show();
|
|
|
- $(".tab_left .area").show();
|
|
|
- $.post("/subscribepay/report/tip?t=" + new Date().getTime(), null, function (r) {
|
|
|
- if (r.unread > 0) {
|
|
|
- $(".vip_report>a").show();
|
|
|
- }
|
|
|
- if (r.tip) {
|
|
|
- if (r.tip.type == 2) {
|
|
|
- $(".vip_report_tip .weekly>span").text("周");
|
|
|
- } else {
|
|
|
- $(".vip_report_tip .weekly>span").text("月");
|
|
|
- }
|
|
|
- $(".vip_report_tip .term").text(new Date(Number(r.tip.startdate + "000")).Format("yyyy年M月d日") + "-" + new Date(Number(r.tip.enddate + "000")).Format("yyyy年M月d日"));
|
|
|
- $('.vip_report_tip').fadeIn();
|
|
|
- $('.vip_report_todetail').on('click', function () {
|
|
|
- updateReportStatus(1, r.tip.startdate, r.tip.enddate, r.tip.pushcount);
|
|
|
- });
|
|
|
- $('.weui-dialog img.vip_report_tip_close').click(function () {
|
|
|
- $('.vip_report_tip').fadeOut();
|
|
|
- updateReportStatus(0);
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
- $(".vip_report").click(function () {
|
|
|
- window.location.href = "/vipreport/page/subreport.html";
|
|
|
- });
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
//下拉刷新
|
|
@@ -767,6 +757,12 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ //免费用户关键词设置
|
|
|
+ function tokeyset() {
|
|
|
+ setSessionStorage();
|
|
|
+ window.location.href = '/jyapp/wxkeyset/keyset/index';
|
|
|
+ }
|
|
|
+
|
|
|
//介绍页
|
|
|
function tointroducepage() {
|
|
|
setSessionStorage();
|
|
@@ -1023,10 +1019,11 @@
|
|
|
.app-layout-header>ul>li:last-child{
|
|
|
font-size: 15px;
|
|
|
align-self: center;
|
|
|
- }
|
|
|
- .app-layout-header>ul>li:last-child>img{
|
|
|
- width:14px;
|
|
|
- margin-right: 5px;
|
|
|
+ padding-left: 19px;
|
|
|
+ background-image: url("/jyapp/images/sub_manager.png");
|
|
|
+ background-size: 14px;
|
|
|
+ background-repeat: no-repeat;
|
|
|
+ background-position: left center;
|
|
|
}
|
|
|
.app-layout-header .switch{
|
|
|
padding: 0px 10px;
|
|
@@ -1112,7 +1109,7 @@
|
|
|
<ul>
|
|
|
<li>订阅</li>
|
|
|
<li><div class="switch"><span></div></span></li>
|
|
|
- <li id="sub_manager"><img src="/jyapp/images/sub_manager.png">订阅管理</li>
|
|
|
+ <li id="sub_manager">订阅管理</li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
<div class="app-layout-content-b">
|