Bläddra i källkod

Merge branch 'dev2.8' of http://192.168.3.207:10080/qmx/jy into dev2.8

zhangxinlei1996 5 år sedan
förälder
incheckning
4b2d54cedf

+ 16 - 16
src/jfw/front/follow.go

@@ -208,14 +208,14 @@ func (m *Follow) ShareFW(tp string) error {
 	fields := `"_id","title","comeintime","projectcode","projectname","bidopentime","projectcode","area","toptype","subtype","type","href","publishtime","area"`
 	data := elastic.GetByIdField("bidding", "bidding", id, fields)
 	bidopentime := (*data)["bidopentime"]
-	if bidopentime != nil {
+	if bidopentime != nil && util.Int64All(bidopentime) != 0 {
 		m.T["bidopentime"] = util.FormatDateWithObj(&bidopentime, "2006年01月02日 15时") + " " + convertWeekday(time.Unix(util.Int64All(bidopentime), 0).Weekday().String())
 		m.T["l_bidopentime"] = bidopentime
 	}
-	if remindtime := (*data)["remindtime"]; remindtime != nil {
+	if remindtime := (*data)["remindtime"]; remindtime != nil && util.Int64All(remindtime) != 0 {
 		m.T["remindtime"] = util.FormatDateWithObj(&remindtime, "2006年01月02日 15时") + " " + convertWeekday(time.Unix(util.Int64All(remindtime), 0).Weekday().String())
 		m.T["l_remindtime"] = remindtime
-	} else if bidopentime != nil {
+	} else if bidopentime != nil && util.Int64All(bidopentime) != 0 {
 		date := time.Unix(util.Int64All(bidopentime), 0).AddDate(0, 0, -1)
 		m.T["remindtime"] = util.FormatDate(&date, "2006年01月02日 15时") + " " + convertWeekday(date.Weekday().String())
 		m.T["l_remindtime"] = date.Unix()
@@ -355,14 +355,14 @@ func (m *Follow) Photo(tp string) error {
 		m.T["l_lastpushtime"] = (*data)["l_lastpushtime"]
 		m.T["a_lastpushids"] = (*data)["a_lastpushids"]
 		l_bidopentime := (*data)["l_bidopentime"]
-		if l_bidopentime != nil && l_bidopentime != "" {
+		if l_bidopentime != nil && l_bidopentime != "" && util.Int64All(l_bidopentime) != 0 {
 			m.T["bidopentime"] = util.FormatDateWithObj(&l_bidopentime, "2006年01月02日 15时") + " " + convertWeekday(time.Unix(util.Int64All(l_bidopentime), 0).Weekday().String())
 			m.T["l_bidopentime"] = l_bidopentime
 		}
-		if l_remindtime := (*data)["l_remindtime"]; l_remindtime != nil && l_remindtime != "" {
+		if l_remindtime := (*data)["l_remindtime"]; l_remindtime != nil && l_remindtime != "" && util.Int64All(l_remindtime) != 0 {
 			m.T["remindtime"] = util.FormatDateWithObj(&l_remindtime, "2006年01月02日 15时") + " " + convertWeekday(time.Unix(util.Int64All(l_remindtime), 0).Weekday().String())
 			m.T["l_remindtime"] = l_remindtime
-		} else if l_bidopentime != nil && l_bidopentime != "" {
+		} else if l_bidopentime != nil && l_bidopentime != "" && util.Int64All(l_bidopentime) != 0 {
 			date := time.Unix(util.Int64All(l_bidopentime), 0).AddDate(0, 0, -1)
 			m.T["remindtime"] = util.FormatDate(&date, "2006年01月02日 15时") + " " + convertWeekday(date.Weekday().String())
 			m.T["l_remindtime"] = date.Unix()
@@ -394,14 +394,14 @@ func (m *Follow) Photo(tp string) error {
 			}
 			////////////////////////
 			bidopentime := (*data)["bidopentime"]
-			if bidopentime != nil && bidopentime != "" {
+			if bidopentime != nil && bidopentime != "" && util.Int64All(bidopentime) != 0 {
 				m.T["bidopentime"] = util.FormatDateWithObj(&bidopentime, "2006年01月02日 15时") + " " + convertWeekday(time.Unix(util.Int64All(bidopentime), 0).Weekday().String())
 				m.T["l_bidopentime"] = bidopentime
 			}
-			if remindtime := (*data)["remindtime"]; remindtime != nil && remindtime != "" {
+			if remindtime := (*data)["remindtime"]; remindtime != nil && remindtime != "" && util.Int64All(remindtime) != 0 {
 				m.T["remindtime"] = util.FormatDateWithObj(&remindtime, "2006年01月02日 15时") + " " + convertWeekday(time.Unix(util.Int64All(remindtime), 0).Weekday().String())
 				m.T["l_remindtime"] = remindtime
-			} else if bidopentime != nil && bidopentime != "" {
+			} else if bidopentime != nil && bidopentime != "" && util.Int64All(bidopentime) != 0 {
 				date := time.Unix(util.Int64All(bidopentime), 0).AddDate(0, 0, -1)
 				m.T["remindtime"] = util.FormatDate(&date, "2006年01月02日 15时") + " " + convertWeekday(date.Weekday().String())
 				m.T["l_remindtime"] = date.Unix()
@@ -646,7 +646,7 @@ func (m *Follow) Addsave() error {
 				data["s_title"] = d["title"]
 				data["s_area"] = d["area"]
 				data["s_province"] = d["area"]
-				if bidopentime := d["bidopentime"]; bidopentime != nil {
+				if bidopentime := d["bidopentime"]; bidopentime != nil && util.Int64All(bidopentime) != 0 {
 					data["l_bidopentime"] = bidopentime
 				}
 				if d["projectcode"] != nil {
@@ -737,14 +737,14 @@ func (m *Follow) Set(tp, id string) error {
 			mySelf["l_publishtime"] = (*data)["publishtime"]
 			////////////////////////
 			bidopentime := (*data)["bidopentime"]
-			if bidopentime != nil && bidopentime != "" {
+			if bidopentime != nil && bidopentime != "" && util.Int64All(bidopentime) != 0 {
 				m.T["bidopentime"] = util.FormatDateWithObj(&bidopentime, "2006年01月02日 15时") + " " + convertWeekday(time.Unix(util.Int64All(bidopentime), 0).Weekday().String())
 				m.T["l_bidopentime"] = bidopentime
 			}
-			if remindtime := (*data)["remindtime"]; remindtime != nil && remindtime != "" {
+			if remindtime := (*data)["remindtime"]; remindtime != nil && remindtime != "" && util.Int64All(remindtime) != 0 {
 				m.T["remindtime"] = util.FormatDateWithObj(&remindtime, "2006年01月02日 15时") + " " + convertWeekday(time.Unix(util.Int64All(remindtime), 0).Weekday().String())
 				m.T["l_remindtime"] = remindtime
-			} else if bidopentime != nil && bidopentime != "" {
+			} else if bidopentime != nil && bidopentime != "" && util.Int64All(bidopentime) != 0 {
 				date := time.Unix(util.Int64All(bidopentime), 0).AddDate(0, 0, -1)
 				m.T["remindtime"] = util.FormatDate(&date, "2006年01月02日 15时") + " " + convertWeekday(date.Weekday().String())
 				m.T["l_remindtime"] = date.Unix()
@@ -804,14 +804,14 @@ func (m *Follow) Set(tp, id string) error {
 		m.T["l_lastpushtime"] = (*data)["l_lastpushtime"]
 		m.T["a_lastpushids"] = (*data)["a_lastpushids"]
 		l_bidopentime := (*data)["l_bidopentime"]
-		if l_bidopentime != nil && l_bidopentime != "" {
+		if l_bidopentime != nil && l_bidopentime != "" && util.Int64All(l_bidopentime) != 0 {
 			m.T["bidopentime"] = util.FormatDateWithObj(&l_bidopentime, "2006年01月02日 15时") + " " + convertWeekday(time.Unix(util.Int64All(l_bidopentime), 0).Weekday().String())
 			m.T["l_bidopentime"] = l_bidopentime
 		}
-		if l_remindtime := (*data)["l_remindtime"]; l_remindtime != nil && l_remindtime != "" {
+		if l_remindtime := (*data)["l_remindtime"]; l_remindtime != nil && l_remindtime != "" && util.Int64All(l_remindtime) != 0 {
 			m.T["remindtime"] = util.FormatDateWithObj(&l_remindtime, "2006年01月02日 15时") + " " + convertWeekday(time.Unix(util.Int64All(l_remindtime), 0).Weekday().String())
 			m.T["l_remindtime"] = l_remindtime
-		} else if l_bidopentime != nil && l_bidopentime != "" {
+		} else if l_bidopentime != nil && l_bidopentime != "" && util.Int64All(l_bidopentime) != 0 {
 			date := time.Unix(util.Int64All(l_bidopentime), 0).AddDate(0, 0, -1)
 			m.T["remindtime"] = util.FormatDate(&date, "2006年01月02日 15时") + " " + convertWeekday(date.Weekday().String())
 			m.T["l_remindtime"] = date.Unix()

+ 63 - 0
src/jfw/modules/app/src/web/staticres/jyapp/dataExport/css/dataExport.css

@@ -202,4 +202,67 @@ html .page .elseChoose .elseChooseList ul li a i {
 /*	max-width: 260px;*/
 	text-align: center;
 	display: none;
+}
+html .match_way .box {
+  position: fixed;
+  bottom: 0;
+  left: 0;
+  width: 100%;
+  background: #fff;
+  z-index: 9999;
+}
+
+html .match_way .box .box_hd {
+  padding: 0 .4rem;
+  height: .88rem;
+  line-height: .88rem;
+  background: #F4F4F9;
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  border-bottom: 1px solid #eee;
+}
+
+html .match_way .box .box_hd h3 {
+  color: #1D1D1D;
+  font-size: .32rem;
+}
+
+html .match_way .box .box_hd .cancel {
+  color: #2CB7CA;
+  font-size: .32rem;
+}
+
+html .match_way .box .box_bd .weui-cells:after {
+  border: 0 !important;
+}
+
+html .match_way .box .box_bd .weui-cells:before {
+  border: 0;
+}
+
+html .match_way .box .box_bd .choose-form {
+  margin: 0;
+}
+
+html .match_way .box .box_bd .cont_label {
+  padding: .49rem .3rem .44rem;
+}
+
+html .match_way .box .box_bd .title_label {
+  padding: .44rem .3rem;
+}
+
+html .match_way .box .box_bd p {
+  font-size: .32rem;
+}
+
+html .match_way .box .box_bd img {
+  width: .8rem;
+  height: .8rem;
+  margin-right: .3rem;
+}
+
+html .match_way .box .box_bd .weui-check:checked + .weui-icon-checked:before {
+  color: #2CB7CA;
 }

+ 54 - 3
src/jfw/modules/app/src/web/templates/dataExport/dataExport.html

@@ -8,7 +8,8 @@
     <title>数据导出</title>
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/jyapp/dataExport/css/base.css?v={{Msg "seo" "version"}}">
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/jyapp/dataExport/iconfont/iconfont.css?v={{Msg "seo" "version"}}">
-    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/jyapp/dataExport/css/dataExport.css?v={{Msg "seo" "version"}}7">
+    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/jyapp/dataExport/css/dataExport.css?v={{Msg "seo" "version"}}8">
+    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/jyapp/dataExport/css/weui.min.css">
     <link rel="stylesheet" type="text/css" href="/jyapp/css/font.css?v={{Msg "seo" "version"}}" />
     <script src="{{Msg "seo" "cdn"}}/jyapp/dataExport/js/rem.js?v={{Msg "seo" "version"}}"></script>
     <script src="{{Msg "seo" "cdn"}}/jyapp/js/jquery.js"></script>
@@ -122,7 +123,7 @@
         font-size: 17px;
         position: fixed;
         padding-top: 20px;
-        z-index: 99999;
+        z-index: 999;
         left: 0;
         right: 0;
         top: 0;
@@ -226,7 +227,11 @@
                            <span id="keyWord"></span>
                            <i class="iconfont icon-arrow"></i>
                         </a></li>
-                        
+                        <li><a href="JavaScript:;">
+                            <strong style="width: 2.2rem;">关键词匹配方式</strong>
+                            <span style="width: 4rem;" class="match">按标题匹配</span>
+                            <i class="iconfont icon-arrow"></i>
+                            </a></li>
                         <li><a href="/jyapp/front/dataExport/price">
                             <strong>金额</strong>
                             <span id="price"></span>
@@ -265,6 +270,38 @@
             <button class="saveData">确认</button>
         </div>
 
+    <div class="js_dialog match_way" id="match_way" style="display: none;">
+    <div class="weui-mask"></div>
+    <div class="box">
+    <div class="box_hd">
+    <!-- <span></span> -->
+    <h3>关键词匹配方式</h3>
+    <span class="cancel">取消</span>
+    </div>
+    <div class="box_bd">
+    <div class="weui-cells weui-cells_checkbox choose-form">
+    <label class="weui-cell weui-check__label cont_label" for="cont_way">
+    <div class="weui-cell__bd read">
+    <p>按全文匹配</p>
+    </div>
+    <div class="weui-cell__hd">
+    <input type="radio" class="weui-check" name="way" value="按全文匹配" id="cont_way" checked />
+<i class="weui-icon-checked"></i>
+    </div>
+    </label>
+    <label class="weui-cell weui-check__label title_label" for="title_way">
+    <div class="weui-cell__bd read">
+    <p>按标题匹配</p>
+    </div>
+    <div class="weui-cell__hd">
+    <input type="radio" class="weui-check" name="way" value="按标题匹配" id="title_way" />
+    <i class="weui-icon-checked"></i>
+    </div>
+    </label>
+    </div>
+    </div>
+    </div>
+    </div>
     </div>
 
 <script>
@@ -277,6 +314,20 @@
                 window.location.reload();
             }
         });
+        //
+        $('.match').click(function () {
+            $('.match_way').slideDown('slow')
+        });
+        /* 选择匹配方式*/
+        $('input:radio[name="way"]').click(function() {
+            var checkValue = $('input:radio[name="way"]:checked').val();
+            $('.match_way').hide(200);
+            $('.match').html(checkValue)
+        });
+        $(".cancel").click(function() {
+            $('.match_way').hide(200)
+        });
+        //
         //筛选日期选中
         $(".chooseTime ul li").click(function(){
             $(".chooseTime ul li").removeClass('active');

+ 63 - 0
src/web/staticres/wx_dataExport/css/dataExport.css

@@ -202,4 +202,67 @@ html .page .elseChoose .elseChooseList ul li a i {
   /*	max-width: 260px;*/
   text-align: center;
   display: none;
+}
+html .match_way .box {
+  position: fixed;
+  bottom: 0;
+  left: 0;
+  width: 100%;
+  background: #fff;
+  z-index: 9999;
+}
+
+html .match_way .box .box_hd {
+  padding: 0 .4rem;
+  height: .88rem;
+  line-height: .88rem;
+  background: #F4F4F9;
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  border-bottom: 1px solid #eee;
+}
+
+html .match_way .box .box_hd h3 {
+  color: #1D1D1D;
+  font-size: .32rem;
+}
+
+html .match_way .box .box_hd .cancel {
+  color: #2CB7CA;
+  font-size: .32rem;
+}
+
+html .match_way .box .box_bd .weui-cells:after {
+  border: 0 !important;
+}
+
+html .match_way .box .box_bd .weui-cells:before {
+  border: 0;
+}
+
+html .match_way .box .box_bd .choose-form {
+  margin: 0;
+}
+
+html .match_way .box .box_bd .cont_label {
+  padding: .49rem .3rem .44rem;
+}
+
+html .match_way .box .box_bd .title_label {
+  padding: .44rem .3rem;
+}
+
+html .match_way .box .box_bd p {
+  font-size: .32rem;
+}
+
+html .match_way .box .box_bd img {
+  width: .8rem;
+  height: .8rem;
+  margin-right: .3rem;
+}
+
+html .match_way .box .box_bd .weui-check:checked + .weui-icon-checked:before {
+  color: #2CB7CA;
 }

+ 53 - 1
src/web/templates/weixin/dataExport/dataExport.html

@@ -9,7 +9,8 @@
     <title>数据导出</title>
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/wx_dataExport/css/base.css?v={{Msg "seo" "version"}}">
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/wx_dataExport/iconfont/iconfont.css?v={{Msg "seo" "version"}}">
-    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/wx_dataExport/css/dataExport.css?v={{Msg "seo" "version"}}9">
+    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/wx_dataExport/css/dataExport.css?v={{Msg "seo" "version"}}11">
+    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/wx_dataExport/css/weui.min.css">
     <script src="{{Msg "seo" "cdn"}}/wx_dataExport/js/rem.js?v={{Msg "seo" "version"}}"></script>
     {{include "/common/weixin.html"}}
     <script src="/js/jquery.js"></script>
@@ -174,6 +175,11 @@
                            <span id="keyWord"></span>
                            <i class="iconfont icon-arrow"></i>
                         </a></li>
+                       <li><a href="JavaScript:;">
+                           <strong style="width: 2.2rem;">关键词匹配方式</strong>
+                           <span style="width: 4rem;" class="match">按标题匹配</span>
+                           <i class="iconfont icon-arrow"></i>
+                       </a></li>
                         
                         <li><a href="/front/wx_dataExport/price">
                             <strong>金额</strong>
@@ -212,6 +218,38 @@
             <button class="reset">重置</button>
             <button class="saveData">确认</button>
         </div>
+        <div class="js_dialog match_way" id="match_way" style="display: none;">
+            <div class="weui-mask"></div>
+            <div class="box">
+                <div class="box_hd">
+                    <!-- <span></span> -->
+                    <h3>关键词匹配方式</h3>
+                    <span class="cancel">取消</span>
+                </div>
+                <div class="box_bd">
+                    <div class="weui-cells weui-cells_checkbox choose-form">
+                        <label class="weui-cell weui-check__label cont_label" for="cont_way">
+                            <div class="weui-cell__bd read">
+                                <p>按全文匹配</p>
+                            </div>
+                            <div class="weui-cell__hd">
+                                <input type="radio" class="weui-check" name="way" value="按全文匹配" id="cont_way" checked />
+                                <i class="weui-icon-checked"></i>
+                            </div>
+                        </label>
+                        <label class="weui-cell weui-check__label title_label" for="title_way">
+                            <div class="weui-cell__bd read">
+                                <p>按标题匹配</p>
+                            </div>
+                            <div class="weui-cell__hd">
+                                <input type="radio" class="weui-check" name="way" value="按标题匹配" id="title_way" />
+                                <i class="weui-icon-checked"></i>
+                            </div>
+                        </label>
+                    </div>
+                </div>
+            </div>
+        </div>
 
     </div>
 
@@ -227,6 +265,20 @@
                 window.location.reload();
             }
         });
+        //
+        $('.match').click(function () {
+            $('.match_way').slideDown('slow')
+        });
+        /* 选择匹配方式*/
+        $('input:radio[name="way"]').click(function() {
+            var checkValue = $('input:radio[name="way"]:checked').val();
+            $('.match_way').hide(200);
+            $('.match').html(checkValue)
+        });
+        $(".cancel").click(function() {
+            $('.match_way').hide(200)
+        });
+        //
         //筛选日期选中
         $(".chooseTime ul li").click(function(){
             $(".chooseTime ul li").removeClass('active');