Bladeren bron

Merge branch 'dev2.7' of http://192.168.3.207:10080/qmx/qfw into dev2.7

wangshan 5 jaren geleden
bovenliggende
commit
9469ca07ec

+ 14 - 2
common/src/qfw/util/jy/user_merge.go

@@ -36,12 +36,12 @@ func AutoMerge(mg mongodb.MongodbSim, sess *httpsession.Session) (bool, error) {
 	}
 	otherUser := &map[string]interface{}{}
 	if s_m_phone != "" {
-		otherUser, _ = mg.FindOneByField("user", bson.M{"s_phone": s_m_phone, "s_m_phone": bson.M{"$ne": s_m_phone}}, nil)
+		otherUser, _ = mg.FindOneByField("user", bson.M{"i_appid": 2, "s_phone": s_m_phone, "s_m_phone": bson.M{"$ne": s_m_phone}}, nil)
 		if otherUser == nil || len(*otherUser) == 0 { //微信端合并 app端
 			return true, nil
 		}
 	} else {
-		otherUser, _ = mg.FindOneByField("user", bson.M{"s_m_phone": s_phone, "s_phone": bson.M{"$ne": s_phone}}, nil)
+		otherUser, _ = mg.FindOneByField("user", bson.M{"i_appid": 2, "s_m_phone": s_phone, "s_phone": bson.M{"$ne": s_phone}}, nil)
 		if otherUser == nil || len(*otherUser) == 0 { //app端合并 微信端
 			return true, nil
 		}
@@ -116,11 +116,23 @@ func checNullkeyset(a_key interface{}) bool {
 }
 
 func MergeData(mg mongodb.MongodbSim, saveRes, otherRes *map[string]interface{}) bool {
+	saveResIsWx := qutil.ObjToString((*saveRes)["s_phone"]) == ""
 	for k, v := range *otherRes {
 		if _, ok := (*saveRes)[k]; !ok {
 			(*saveRes)[k] = v
+		} else if k == "s_unionid" { //s_unionid保留微信
+			if !saveResIsWx {
+				(*saveRes)[k] = (*otherRes)[k]
+			}
+		} else if k == "o_jy" || k == "o_vipjy" {
+			if saveResIsWx { //保留app推送开关设置
+				(*qutil.ObjToMap((*saveRes)[k]))["i_apppush"] = (*qutil.ObjToMap((*otherRes)[k]))["i_apppush"]
+			} else { //保留微信推送开关设置
+				(*qutil.ObjToMap((*saveRes)[k]))["i_wxpush"] = (*qutil.ObjToMap((*otherRes)[k]))["i_wxpush"]
+			}
 		}
 	}
+	(*saveRes)["i_ispush"] = 1
 	delete(*saveRes, "s_m_phone")
 	if !mg.UpdateById("user", qutil.BsonIdToSId((*saveRes)["_id"]), saveRes) {
 		return false

+ 6 - 0
core/src/loanadorigin.json

@@ -0,0 +1,6 @@
+{
+  "origin": {
+    "loan_wx_background": "公众号回复",
+    "loan_other_origin": "其他"
+  }
+}

+ 15 - 0
core/src/qfw/coreconfig/LoanAdConfig.go

@@ -0,0 +1,15 @@
+/**
+*企业贷款广告配置
+**/
+package coreconfig
+
+import (
+	"qfw/util"
+)
+
+//
+var LoanAdOrigin map[string]interface{}
+
+func readLoanAdOriginConfig() {
+	util.ReadConfig("./loanadorigin.json", &LoanAdOrigin)
+}

+ 1 - 0
core/src/qfw/coreconfig/coreconfig.go

@@ -14,4 +14,5 @@ func init() {
 	readluckDraw()
 	readflop()
 	readDiscountConfig()
+	readLoanAdOriginConfig()
 }

+ 1 - 5
core/src/qfw/manage/auth.go

@@ -7,7 +7,6 @@ import (
 	cutil "qfw/coreutil"
 	"time"
 
-	. "qfw/coreconfig"
 	"qfw/util"
 
 	"github.com/go-xweb/xweb"
@@ -39,7 +38,7 @@ func (this *EntAuth) ListReq() {
 		}
 		var sql = ``
 		if queryStr != "" {
-			sql += ` and name like '%` + queryStr + `%' `
+			sql += ` and ( name like '%` + queryStr + `%' or phone ='` + queryStr + `')`
 		}
 		if status != "" {
 			sql += fmt.Sprintf(` and auth_status = %s `, status)
@@ -64,9 +63,6 @@ func (this *EntAuth) Detail(id string) error {
 	if rData == nil || len(*rData) == 0 {
 		return errors.New("not find data")
 	}
-	(*rData)["legal_idcard_front"] = SysConfig.JyWebdomain + (*rData)["legal_idcard_front"].(string)
-	(*rData)["legal_idcard_after"] = SysConfig.JyWebdomain + (*rData)["legal_idcard_after"].(string)
-	(*rData)["license"] = SysConfig.JyWebdomain + (*rData)["license"].(string)
 	this.T["data"] = rData
 	return this.Render("/manage/auth/detail.html", &this.T)
 }

+ 24 - 1
core/src/qfw/manage/loan.go

@@ -3,7 +3,9 @@ package manage
 import (
 	"github.com/go-xweb/xweb"
 	"gopkg.in/mgo.v2/bson"
+	"qfw/coreconfig"
 	mgo "qfw/util/mongodb"
+	"qfw/util/redis"
 	"time"
 )
 
@@ -25,6 +27,7 @@ type LoanAction struct {
 	show_classification   xweb.Mapper `xweb:"/manage/jy_loan/showclassification"`      //查看分类
 	save_classification   xweb.Mapper `xweb:"/manage/jy_loan/saveclassification"`      //保存分类
 	updata_classification xweb.Mapper `xweb:"/manage/jy_loan/updataclassification"`    //更新分类
+	get_ad_count          xweb.Mapper `xweb:"/manage/jy_loan/getadcount"`              //获取广告统计
 }
 
 type Front struct {
@@ -32,13 +35,14 @@ type Front struct {
 	login                xweb.Mapper    `xweb:"/manage/jyloan/list"`
 	visitList            xweb.Mapper    `xweb:"/manage/loan/visitlist"`
 	evaluationlist       xweb.Mapper    `xweb:"/manage/loan/evaluationlist"`          //评估列表页面
-	evaluationdetail    xweb.Mapper    `xweb:"/manage/jy_loan/evaluationdetail"`        //评估详情页面
+	evaluationdetail     xweb.Mapper    `xweb:"/manage/jy_loan/evaluationdetail"`        //评估详情页面
 	clasifylist          xweb.Mapper    `xweb:"/manage/loan/clasifylist"`
 	setting              xweb.Mapper    `xweb:"/manage/loan/setting"`
 	classset             xweb.Mapper    `xweb:"/manage/loan/classSet.html"`
 	passwordchange       xweb.Mapper    `xweb:"/loan/passwordChange.html"`
 	clue                 xweb.Mapper    `xweb:"/manage/loan/cluelist"`
 	show_clue            xweb.Mapper    `xweb:"/manage/jy_loan/show_clue"`
+	ad_count             xweb.Mapper    `xweb:"/manage/loan/adcount"`
 }
 
 
@@ -68,6 +72,10 @@ func (this *Front)Setting()error{
 	return this.Render("/manage/loan/classSet.html")
 }
 
+func (this *Front)Ad_count()error{
+	return this.Render("/manage/loan/loanAd.html")
+}
+
 //func (this *Front)Classset()error{
 //	return this.Render("./classSet.html")
 //}
@@ -631,5 +639,20 @@ func valida(uid,pwd,mtype string)bool{
 }
 
 
+func (this *LoanAction)Get_ad_count(){
+	userId := this.GetSession("userId")
+	if userId != nil{
+		origin := coreconfig.LoanAdOrigin["origin"].(map[string]interface{})
+		data := make(map[string]interface{})
+		for k,v := range origin{
+			count :=redis.GetInt("other",k)
+			data[v.(string)] = count
+
+		}
+		this.ServeJson(map[string]interface{}{
+			"data":data,
+		})
+	}
+}
 
 

+ 1 - 1
core/src/timetask.json

@@ -1 +1 @@
-{"comment":{"c_rate":720,"commentrate":900},"market":{"demand":{"attr":["i_hits","i_bids","i_status"],"timepoint":"2020-03-28 15:56:01"},"service":{"attr":["i_hits","i_sales","i_comments","i_score","i_appcounts"],"timepoint":"2020-03-28 15:56:06"}},"marketisstart":true,"marketrate":300}
+{"comment":{"c_rate":720,"commentrate":900},"market":{"demand":{"attr":["i_hits","i_bids","i_status"],"timepoint":"2020-03-28 15:56:01"},"service":{"attr":["i_hits","i_sales","i_comments","i_score","i_appcounts"],"timepoint":"2020-03-28 15:56:06"}},"marketisstart":true,"marketrate":300}

+ 15 - 0
core/src/web/staticres/loan/css/style.css

@@ -17,6 +17,21 @@
 
 }
 
+#adcount{
+    width: 200px;
+    height: 50px;
+    text-align: center;
+    line-height: 50px;
+    position: absolute;
+    background-color:rgb(86, 119, 252);
+    border-color: rgba(255, 0, 0, 0);
+    border-width: 0px;
+    border-style: solid;
+    box-shadow: rgba(0, 0, 0, 0.24) 0px 8px 8px 0px;
+    border-radius: 2px;
+    margin-top: 157px;
+    margin-left: 292px;
+}
 
 #visit{
     width: 200px;

+ 8 - 1
core/src/web/templates/manage/auth/detail.html

@@ -1,6 +1,6 @@
 <html>
 <head>
-    <title>课程详情</title>
+    <title>企业审核</title>
     {{include "/common/inc.html"}}
     <link href="{{Msg "seo" "cdn"}}/css/message.css" rel="stylesheet">
     <script src="/js/validform-min.js"></script>
@@ -167,6 +167,13 @@
                                 </div>
                             </div>
                             
+                            <div class="form-group">
+                                <label class="col-sm-3 control-label" for="name">绑定手机号</label>
+                                <div class="col-sm-3">
+                                    <input class="form-control" readonly="readonly" value="{{.T.data.phone}}"/>
+                                </div>
+                            </div>
+                            
                             <div class="form-group">
                                 <label class="col-sm-3 control-label" for="name">营业执照:</label>
                                 <div class="col-sm-5">

+ 17 - 40
core/src/web/templates/manage/loan/clue.html

@@ -44,7 +44,7 @@
         }
 
         .table > thead > tr > th:nth-child(4) {
-            width: 4%;
+            width: 5%;
         }
 
         .table > thead > tr > th:nth-child(5) {
@@ -134,49 +134,30 @@
     <div style="width: 120px;height: 40px;position: relative;float: right;">
         <a id="return" href="/manage/loan/cluelist"> 返回上一级</a>
     </div>
-    <div class="row" style="width:96%; margin:0 auto;">
+    <div class="row" style="width:96%; margin:0 auto; position: relative">
         {{include "/manage/slider.html"}}
 
         <div id="content">
             <div id="audit" style="margin-top: 20px"></div>
         </div>
-        <div class="record" style="display: none">
-            <div style="float: left;
-    position: relative;
-    margin-left: 214px;
-    margin-top: -600px;
-    width: 200px;
-    height: 200px;
-overflow-y: auto;">
+        <div class="record" style="margin-left: 214px;
+    /* height: auto; */
+    display: flex;
+    justify-content: space-around;
+    position: absolute;
+    top: 140px;">
+            <div style="width: 200px;height: 200px;overflow-y: auto;">
                <span style="font-size: 24px;">1 回访记录:</span>
                 <div id="visit_record"></div>
             </div>
-            <div style="
-    position: relative;
-    float: left;
-    margin-left: 419px;
-    margin-top: -600px;
-    width: 200px;
-    height: 200px;
-    overflow-y: auto;
-
-">
+            <div style="width: 200px;height: 200px;overflow-y: auto;float: left;position: relative;margin-left: 25px;">
                 <span style=" font-size: 24px;">2 评估意见:</span>
                 <div id="evaluation"></div>
             </div>
-            <div style="
-    position: relative;
-    float: right;
-    margin-right: 10px;
-    margin-top: -600px;
-    width: 580px;
-    height: 200px;
-    font-size: 24px;
-">
+            <div style="width: 500px;height: 200px;font-size: 24px; float: left;position: relative;margin-left: 25px;">
                 <span >3 分类意见:</span>
                 <textarea id="classify_msg" name="classify_msg" style="margin-left: 100px;"></textarea>
-                <div style="padding-left: 97px;
-    margin-top: 30px;">
+                <div style="">
                     <input  type="button" style="width: 90px; height: 33px; left: 1166px; top: 852px; z-index: 22; background-color: rgb(202, 198, 133); border-color: rgb(187, 187, 187); border-width: 1px; border-style: solid; border-radius: 4px; font-size: 14px; text-align: center; font-weight: normal; font-style: normal; opacity: 1;" value="提交" onclick="submit()">
                 </div>
                 <div style="padding-left: 357px;
@@ -230,18 +211,14 @@ overflow-y: auto;">
                     }
                 },
                 {
-                    title: "申请日期", field: "price", callback: function (d) {
-                        return timestampToTime(d.application_time)
+                    title: "企业联系方式", field: "price", callback: function (d) {
+                        return d.phoneNum
 
                     }
                 },
                 {
-                    title: "回访人", field: "person",callback:function (d) {
-                        if (typeof(d.visit_person) != "undefined"){
-                            return d.visit_person
-                        }else{
-                            return ""
-                        }
+                    title: "企业联系人", field: "person",callback:function (d) {
+                        return d.username
                     }
                 },
                 {
@@ -337,7 +314,7 @@ overflow-y: auto;">
         if(content!=""&&classify!=""){
             $.ajax({
                 url: "/manage/jy_loan/cluesave",
-                method: "post",
+                type: "post",
                 data: {
                     "classify_msg":content,
                     "uid":uid,

+ 5 - 5
core/src/web/templates/manage/loan/evaluationdetail.html

@@ -36,7 +36,7 @@
         }
 
         .table > thead > tr > th:nth-child(1) {
-            width: 13%;
+            width: 12%;
         }
 
         .table > thead > tr > th:nth-child(2) {
@@ -48,7 +48,7 @@
         }
 
         .table > thead > tr > th:nth-child(4) {
-            width: 7%;
+            width: 8%;
         }
 
         .table > thead > tr > th:nth-child(5) {
@@ -56,7 +56,7 @@
         }
 
         .table > thead > tr > th:nth-child(6) {
-            width: 6%;
+            width: 7%;
             /*text-align: center;*/
         }
         .table > thead > tr > th:nth-child(7) {
@@ -64,7 +64,7 @@
             /*text-align: center;*/
         }
         .table > thead > tr > th:nth-child(8) {
-            width: 15%;
+            width: 14%;
             /*text-align: center;*/
         }
         .table > thead > tr > th:nth-child(9) {
@@ -294,7 +294,7 @@
             datatype: "json",
             data: {"uid":uid},
             async: false,
-            method: "POST",
+            type: "POST",
             success:function (d) {
                 var visit_record="";
                 visit_record = format(d.data[0].visit_msg);

+ 4 - 4
core/src/web/templates/manage/loan/evaluationlist.html

@@ -33,7 +33,7 @@
         }
 
         .table > thead > tr > th:nth-child(4) {
-            width: 7%;
+            width: 8%;
         }
 
         .table > thead > tr > th:nth-child(5) {
@@ -41,7 +41,7 @@
         }
 
         .table > thead > tr > th:nth-child(6) {
-            width: 6%;
+            width: 7%;
             /*text-align: center;*/
         }
         .table > thead > tr > th:nth-child(7) {
@@ -49,7 +49,7 @@
             /*text-align: center;*/
         }
         .table > thead > tr > th:nth-child(8) {
-            width: 15%;
+            width: 14%;
             /*text-align: center;*/
         }
         .table > thead > tr > th:nth-child(9) {
@@ -233,7 +233,7 @@
             datatype: "json",
             data: {"uid":uid},
             async: false,
-            method: "POST",
+            type: "POST",
             success:function (d) {
                 var visit_record="";
                 visit_record = format(d.data[0].visit_msg);

+ 115 - 0
core/src/web/templates/manage/loan/loanAd.html

@@ -0,0 +1,115 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <script src="/js/jquery.js"></script>
+    <title>广告统计</title>
+    <style>
+        *{
+            margin: 0;
+            padding: 0;
+        }
+        html,body{
+            height: 100%;
+            width: 100%;
+        }
+        .set-content{
+            margin: 0 auto;
+            width: 1000px;
+            padding-top: 100px;
+        }
+        .title{
+            color: #1a1a1a;
+            font-size: 18px;
+        }
+        .table-content{
+            display: flex;
+            justify-content: center;
+            margin: 50px auto 0;
+            font-size: 14px;
+            color: #1a1a1a;
+        }
+        table tr{
+            height: 35px;
+            line-height: 35px;
+        }
+        table {
+            border-right:1px solid #999;
+            border-bottom:1px solid #999
+        }
+        table td{
+            text-align: center;
+            border-left:1px solid #999;
+            border-top:1px solid #999
+        }
+        #return{
+            float: right;
+            margin-right: 27px;
+            margin-top: 10px;
+            font-weight: 400;
+            font-size: 16px;
+            color: rgba(94, 126, 240, 1);
+            font-style: normal;
+            letter-spacing: 0px;
+            text-decoration: none;
+        }
+        .fontset{
+            color: rgb(94, 126, 240);
+        }
+    </style>
+</head>
+<body>
+<div class="set-content">
+    <div style="width: 120px;height: 40px;position: relative;float: right;">
+        <a id="return" href="/manage/jyloan/list"> 返回上一级</a>
+    </div>
+    <div class="table-content">
+        <table cellspacing="0" id="table">
+            <thead>
+            <tr>
+                <td style="width: 200px">入口来源</td>
+                <td style="width: 200px">线索计数</td>
+            </tr>
+
+            </thead>
+        </table>
+    </div>
+</div>
+<script>
+    $(function () {
+        $.ajax({
+            url:"/manage/jy_loan/getadcount",
+            datatype:"json",
+            method:"GET",
+            success:function (r) {
+                if (r.length !==0){
+                    var table = new Array();
+                    for (var t in r.data){
+                        if (r.data.hasOwnProperty(t)){
+                            console.log("t",t)
+                            console.log(r.data[t])
+                            var html = "<tr><td class='fontset' style='width: 200px'>"+t+'</td><td class="fontset" style="width: 200px">'+r.data[t]+"</td></tr>"
+                            table.push(html)
+                        }
+
+                    }
+                    var l = table.toString();
+                    l+= "<tr>\n" +
+                        "                <td style=\"width: 200px\"></td>\n" +
+                        "                <td style=\"width: 200px\"></td>\n" +
+                        "            </tr>\n" +
+                        "            <tr>\n" +
+                        "                <td style=\"width: 200px\"></td>\n" +
+                        "                <td style=\"width: 200px\"></td>\n" +
+                        "            </tr>"
+                    }
+
+                $("thead").append(l)
+            }
+        })
+    })
+    
+</script>
+</body>
+</html>

+ 5 - 2
core/src/web/templates/manage/loan/manage.html

@@ -4,7 +4,7 @@
     <meta charset="UTF-8">
     <title>系统管理</title>
     {{include "/common/inc.html"}}
-    <link type="text/css" rel="stylesheet" href="/loan/css/style.css">
+    <link href="/loan/css/style.css?v={{Msg "seo" "version"}}" rel="stylesheet">
     <style>
         #jyloan{
             background-color: #f5f5f5;
@@ -42,7 +42,8 @@
         <hr class="horizontalline" style="margin-left: 210px">
         <div class="arrow"><span style="color: #0aa0f5">></span></div>
         <div id="classify" onclick="show_modal(3)"><span >3 线索分类</span></div>
-        <div id="setting" onclick="show_modal(4)"><span>4 分类设置</span></div>
+        <div id="adcount" onclick="show_modal(4)"><span>广告统计</span></div>
+        <div id="setting" onclick="show_modal(5)"><span>分类设置</span></div>
     </div>
     <!-- modal -->
 
@@ -78,6 +79,8 @@
             window.location.href = "/manage/loan/evaluationlist"
         }else if (index == 3){
             window.location.href = "/manage/loan/cluelist"
+        }else if(index == 4){
+            window.location.href = "/manage/loan/adcount"
         }else{
             window.location.href = "/manage/loan/setting"
         }

+ 9 - 13
core/src/web/templates/manage/loan/show_clue.html

@@ -46,7 +46,7 @@
         }
 
         .table > thead > tr > th:nth-child(4) {
-            width: 4%;
+            width: 5%;
         }
 
         .table > thead > tr > th:nth-child(5) {
@@ -141,7 +141,7 @@
 
         <div id="content">
             <div id="audit" style="margin-top: 20px"></div>
-            <div class="record" style="display: none">
+            <div class="record" style="display: flex;justify-content: space-around;position: absolute;top: 94px;">
                 <div style="height: 300px;width: 200px;overflow-y: auto;float: left;overflow-x: hidden;margin-top: 10px">
                <span style="font-size: 24px;">1 回访记录:</span>
                     <div id="visit_record"></div>
@@ -156,7 +156,7 @@
                 </div>
             </div>
             <div id="back">
-                <input  type="button" style="width: 90px; height: 33px; z-index: 22; background-color: rgb(202, 198, 133); border-color: rgb(187, 187, 187); border-width: 1px; border-style: solid; border-radius: 4px; font-size: 14px; text-align: center; font-weight: normal; font-style: normal; opacity: 1; float: right;margin-right: 200px;margin-top: 10px" value="返回" onclick="backup()">
+                <input  type="button" style="width: 90px; height: 33px; z-index: 22; background-color: rgb(202, 198, 133); border-color: rgb(187, 187, 187); border-width: 1px; border-style: solid; border-radius: 4px; font-size: 14px; text-align: center; font-weight: normal; font-style: normal; opacity: 1; float: right;margin-right: 200px;margin-top: 320px" value="返回" onclick="backup()">
             </div>
         </div>
 
@@ -204,27 +204,23 @@
                         }
                     },
                     {
-                        title: "申请日期", field: "price", callback: function (d) {
-                            return timestampToTime(d.application_time)
-
+                        title: "企业联系人", field: "person",callback:function (d) {
+                            return d.username
                         }
                     },
                     {
-                        title: "回访人", field: "person",callback:function (d) {
-                            if (typeof(d.visit_person) != "undefined"){
-                                return d.visit_person
-                            }else{
-                                return ""
-                            }
+                        title: "企业联系方式", field: "phonenum", callback: function (d) {
+                            return d.phoneNum
                         }
                     },
                     {
-                        title: "回访日期", field: "phonenum", callback: function (d) {
+                        title: "回访日期", field: "price", callback: function (d) {
                             if (typeof (d.visit_time) !="undefined"){
                                 return d.visit_time
                             }else{
                                 return ""
                             }
+
                         }
                     },
                     {

+ 18 - 9
core/src/web/templates/manage/loan/visit.html

@@ -51,7 +51,7 @@
         }
 
         .table > thead > tr > th:nth-child(6) {
-            width: 6%;
+            width: 7%;
             /*text-align: center;*/
         }
         .table > thead > tr > th:nth-child(7) {
@@ -59,7 +59,7 @@
             /*text-align: center;*/
         }
         .table > thead > tr > th:nth-child(8) {
-            width: 15%;
+            width: 13%;
             /*text-align: center;*/
         }
         .table > thead > tr > th:nth-child(9) {
@@ -286,13 +286,22 @@
     });
     //单击事件
     $("#content").on("click","#audit>.dt-table-wrapper>.table>tbody>tr",function(){
-        $(this).addClass("selected");
-        $(this).css("background","rgb(202, 198, 133)");
-        $(this).siblings().css("background","rgb(255,255,255)");
-        $(this).siblings().removeClass("selected");
-        editor.html("");
-        $("#person").val("");
-        $(".record").hide()
+        uid = $(this).find("td").eq(8).text();
+        if ($(this).hasClass("selected")){
+            editor.html("");
+            $("#person").val("");
+            $(".record").show();
+            $("#person").focus();
+        }else{
+            $(this).addClass("selected");
+            $(this).css("background","rgb(202, 198, 133)");
+            $(this).siblings().css("background","rgb(255,255,255)");
+            $(this).siblings().removeClass("selected");
+            editor.html("");
+            $("#person").val("");
+            $(".record").hide()
+        }
+
     });
     function submit() {
         var content = $("#visit-record").val();

+ 1 - 1
core/src/web/templates/manage/openplatform/caudit.html

@@ -163,7 +163,7 @@
 <!-- 中间 -->
 <script>
 var currentPage = {{.T.proCaudit_page}};
-if(currentPage == ""){
+if(currentPage == ""||currentPage == null){
 	currentPage = 1;
 }
 $(function(){