|
@@ -1,6 +1,5 @@
|
|
|
//招标公告
|
|
|
var Tender = {
|
|
|
- status:false,
|
|
|
keyWordDialog: null,
|
|
|
getKeyWordDialog: function(clickLi){
|
|
|
if(this.keyWordDialog == null){
|
|
@@ -18,7 +17,6 @@ var Tender = {
|
|
|
};
|
|
|
//中标公告
|
|
|
var Bid = {
|
|
|
- status:false,
|
|
|
keyWordDialog: null,
|
|
|
getKeyWordDialog: function(clickLi){
|
|
|
if(this.keyWordDialog == null){
|
|
@@ -152,11 +150,120 @@ function getCredit(){
|
|
|
return score
|
|
|
}
|
|
|
var snopshot=[];
|
|
|
+function showAlls(){
|
|
|
+ var n=0,str=[],sel=[];
|
|
|
+ for(var i in snopshot){
|
|
|
+ if(snopshot[i]){
|
|
|
+ n++;
|
|
|
+ str.push((i=="tender")?"招标公告":"中标公告")
|
|
|
+ sel.push("types="+i)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(n>0){
|
|
|
+ var num=getCredit();
|
|
|
+ var pay=1000*n, rem=num-pay,strs="扣除后将剩余"+rem+"积分";
|
|
|
+ var contents="您添加了"+n+"个信息栏目("+str.join("、")+"),确认后系统将每月扣除"+pay+"积分,您目前的积分余额是"+num+"积分,";
|
|
|
+ if(rem<0){
|
|
|
+ $("#credit_yes").unbind("click").hide()
|
|
|
+ strs="请充值或去赚积分。";
|
|
|
+ }else{
|
|
|
+ $("#credit_yes").unbind("click").bind("click",function(e){
|
|
|
+ $("#rule-content").text(contents+strs)
|
|
|
+ $(".tip-dialog").show();
|
|
|
+ $("#tip-dialog-back").unbind("click").bind("click",function(e){
|
|
|
+ $("#tip-dialog-back").unbind("click");
|
|
|
+ $.ajax({
|
|
|
+ dataType:"json",
|
|
|
+ url:"/member/credit/swordfishpay",
|
|
|
+ data:sel.join("&"),
|
|
|
+ type:"POST",
|
|
|
+ async:false,
|
|
|
+ success:function(msg){
|
|
|
+ if(msg){
|
|
|
+ if(msg.flag){
|
|
|
+ //有session
|
|
|
+ if(msg.oprstatus){
|
|
|
+ //扣积分操作成功
|
|
|
+ $(".visible").hide()
|
|
|
+ }else{
|
|
|
+ //扣积分操作无效
|
|
|
+ alert("操作无效,请重新进入页剑鱼页面后操作")
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ //无session
|
|
|
+ alert("请重新进入页剑鱼页面后操作")
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error:function(x,st,err){
|
|
|
+ alert("请稍后再试"+st)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ window.location.reload()
|
|
|
+ })
|
|
|
+ $("html,body").addClass("overflow-hidden");
|
|
|
+ })
|
|
|
+ }
|
|
|
+ $("#txt_tip").text(contents+strs)
|
|
|
+ $(".visible").show()
|
|
|
+ }else{
|
|
|
+ $("#credit_yes").unbind("click")
|
|
|
+ $(".visible").hide()
|
|
|
+ }
|
|
|
+}
|
|
|
|
|
|
-function showSnopshot(){
|
|
|
+function showSnopshot(module,type,on){
|
|
|
//提示扣积分
|
|
|
- alert(getCredit())
|
|
|
- $(".credit-tip").show()
|
|
|
+ //alert(getCredit())
|
|
|
+ if(type==0){//初始化
|
|
|
+ //是开启状态
|
|
|
+ if (!eval("msgset."+module+".i_status")){
|
|
|
+ snopshot[module]=true
|
|
|
+ showAlls()
|
|
|
+ }else{
|
|
|
+ //显示天数
|
|
|
+ var days=eval("msgset."+module+".days")
|
|
|
+ var tiptxt="本栏目推送服务期还剩<d style='color:red'>"+days+"</d>天"
|
|
|
+ if(winWidth<341){
|
|
|
+ tiptxt="服务期还剩<d style='color:red'>"+days+"</d>天"
|
|
|
+ }
|
|
|
+ $("#"+module+" .show-days").html(tiptxt)
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ }else if(type==1){//提交修改时
|
|
|
+ if(on){
|
|
|
+ if(module=="tender"){
|
|
|
+ if(typeof(msgset.tender) != "undefined"){
|
|
|
+ if(!msgset.tender.i_status){
|
|
|
+ if (!msgset.tender.i_status){
|
|
|
+ snopshot[module]=true
|
|
|
+ }else{
|
|
|
+ snopshot[module]=false
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ snopshot[module]=true
|
|
|
+ }
|
|
|
+ }else if(module=="bid"){
|
|
|
+ if(typeof(msgset.bid) != "undefined"){
|
|
|
+ if(!msgset.bid.i_status){
|
|
|
+ if (!msgset.bid.i_status){
|
|
|
+ snopshot[module]=true
|
|
|
+ }else{
|
|
|
+ snopshot[module]=false
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ snopshot[module]=true
|
|
|
+ }
|
|
|
+ }
|
|
|
+ showAlls()
|
|
|
+ }else{
|
|
|
+ snopshot[module]=false
|
|
|
+ showAlls()
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
function commonAjaxReq(object,module){
|
|
@@ -167,21 +274,9 @@ function commonAjaxReq(object,module){
|
|
|
};
|
|
|
if($("#"+module+"-on-off").hasClass("open")){
|
|
|
//开服务要校验
|
|
|
- if(module=="tender"){
|
|
|
- if(typeof(msgset.tender) != "undefined"){
|
|
|
- if(!msgset.tender.i_switchstatus){
|
|
|
- snopshot["tender"]=true
|
|
|
- showSnopshot()
|
|
|
- }
|
|
|
- }
|
|
|
- }else if(module=="bid"){
|
|
|
- if(typeof(msgset.bid) != "undefined"){
|
|
|
- if(!msgset.bid.i_switchstatus){
|
|
|
- snopshot["bid"]=true
|
|
|
- showSnopshot()
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ showSnopshot(module,1,1)
|
|
|
+ }else{
|
|
|
+ showSnopshot(module,1,0)
|
|
|
}
|
|
|
var keysString = "",scopeString = "";
|
|
|
var thisClass = this;
|
|
@@ -268,7 +363,9 @@ function commonAjaxReq(object,module){
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
+var winWidth=300;
|
|
|
$(function(){
|
|
|
+ winWidth=$(window).width();
|
|
|
var turnOn = function(obj){
|
|
|
obj.addClass("open");
|
|
|
var liobj = obj.parents("li");
|
|
@@ -318,7 +415,7 @@ $(function(){
|
|
|
if(msgset.tender.i_switchstatus){
|
|
|
turnOn($("#tender-on-off"));
|
|
|
//判断要不要还原提示
|
|
|
- if
|
|
|
+ showSnopshot("tender",0)
|
|
|
}
|
|
|
}
|
|
|
if(typeof(msgset.bid) != "undefined"){
|
|
@@ -327,6 +424,7 @@ $(function(){
|
|
|
if(msgset.bid.i_switchstatus){
|
|
|
turnOn($("#bid-on-off"));
|
|
|
//判断要不要还原提示
|
|
|
+ showSnopshot("bid",0)
|
|
|
}
|
|
|
}
|
|
|
//开关
|