Эх сурвалжийг харах

Merge branch 'dev4.5' of http://192.168.3.207:8080/qmx/jy into dev4.5

zhangxinlei1996 4 жил өмнө
parent
commit
4cc7f9cda8
25 өөрчлөгдсөн 1002 нэмэгдсэн , 223 устгасан
  1. 8 0
      src/jfw/front/frontRouter.go
  2. 5 0
      src/jfw/modules/app/src/web/staticres/jyapp/me/css/mine-icons.css
  3. 1 1
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/vip_purchase.css
  4. 17 2
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/vip_upgrade.js
  5. 11 1
      src/jfw/modules/app/src/web/templates/me/mine.html
  6. 8 2
      src/jfw/modules/app/src/web/templates/vipsubscribe/vip_UpgradePage.html
  7. 53 3
      src/jfw/modules/app/src/web/templates/vipsubscribe/vip_purchase.html
  8. 71 21
      src/jfw/modules/publicapply/src/enterpriseSearch/entity/entQuery.go
  9. 19 3
      src/jfw/public/dataexport.go
  10. 1 0
      src/seo.json
  11. 5 1
      src/web/staticres/common-module/coupon/js/pay-order-template.js
  12. 98 0
      src/web/staticres/common-module/vipsubscribe/css/vip-coupon-template.css
  13. 71 0
      src/web/staticres/common-module/vipsubscribe/css/vip-size-template.css
  14. BIN
      src/web/staticres/common-module/vipsubscribe/image/goods-checked.png
  15. 88 0
      src/web/staticres/common-module/vipsubscribe/js/vip-coupon-template.js
  16. 61 0
      src/web/staticres/common-module/vipsubscribe/js/vip-size-template.js
  17. 5 2
      src/web/staticres/css/dev2/newBidSearch.css
  18. 15 2
      src/web/staticres/js/biddingSearch.js
  19. 10 4
      src/web/staticres/js/login.js
  20. 224 16
      src/web/staticres/js/superSearch.js
  21. 5 1
      src/web/staticres/me/css/mine-icons.css
  22. BIN
      src/web/staticres/me/images/shoucang.png
  23. 65 1
      src/web/templates/pc/biddetail_rec.html
  24. 151 163
      src/web/templates/pc/supsearch.html
  25. 10 0
      src/web/templates/weixin/my.html

+ 8 - 0
src/jfw/front/frontRouter.go

@@ -65,6 +65,11 @@ func (this *CommonRouter) WxCommonPage(folder, loginSign, htmlPage string) error
 }
 
 func (this *CommonRouter) PcCommonPage(folder, loginSign, htmlPage string) error {
+	var shareid = this.GetString("id")
+	if len(shareid) == 0 {
+		shareid = "10"
+	}
+	this.T["shareid"] = se.EncodeString(shareid)
 	if loginSign != "free" {
 		if userid, _ := this.GetSession("userId").(string); userid == "" {
 			var shareid = this.GetString("id")
@@ -77,6 +82,9 @@ func (this *CommonRouter) PcCommonPage(folder, loginSign, htmlPage string) error
 			// return this.Redirect("/notin/page")
 		}
 	}
+	if folder == "collection" {
+		this.T["logid"] = config.Seoconfig["collection"].(string)
+	}
 	return this.Render(fmt.Sprintf("/frontRouter/pc/%s/%s/%s.html", folder, loginSign, htmlPage))
 }
 

+ 5 - 0
src/jfw/modules/app/src/web/staticres/jyapp/me/css/mine-icons.css

@@ -110,4 +110,9 @@
 /* /jyapp/me/images/qiyechaxun.png */
 .icon-qiyechaxun {
   background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAQeSURBVHgB7ZhdbttGEMdnl3LT5slvLfopn6BqmsJu+hD6BrqB6NoqZLew2BNYOkEp90ttPqzcwDmBlYe4MhzbCnoAK0Ae+lY9BfkwdzJjiAHJmOSS3iAOoB8gW9yd/fiTM7MjAkyZMmXK20RkGVRse1Y+ed4UQth0aUMxhqiwc7i/2wPDpAqoLCyULZQ7ZFYGM4x84S8OB4MRGEKmdRrePEM3xNrhpwqGSBRw5ZtrjuHNB5TJJV0wRCmpg3y+GWlAuONfnnGH/f4YcnDqhspqkbPWQnNfB0Mku5CASvjSl34r7+YZ9nf/+Uz8jttgiMQg/nr+OwxfH+zdz8xYacTny0A7a0m4mFSEFFsk+phdMM3wogoIyMxaF10Ak5q1SlAAp+GWpfKrUooz74xSOFbS2u51vVHQphtDebNWIQEzAnfQkuWkfmkJsAA5Dc9BTjhrVSq2a116UQs120n2hQRQOsk8SRV9HNelOsp3LEteVxyY5A6T8SPy3aGP6u7t7q+9+NjhsD+mAAYdCgk4QfFVCZSTZsP+UnoGx2DJWYRovmYhyL4tZLW+2twgIe2zhOjwRs6BldXmL/QvX7kgsHXzj8123vWNZ6GVtfUNyLt5BkVrIjwXRrMQgviC/jjRNhgLFB362r/Z9frcVq+7FWUpl7JLLTa1u7zq3rv1p7cNmhRyIfLbY5wEZBocrD6KxXA6DcM3wqKMJqJzjU8uibl//9n/P2n9MIVcSCcLMWmbZ7iPbehruEicLT3zHVpkHFovcY5CAjgLAWI7/BGxRVBAL23zAac2iB2IDrZR4s8IOEISQk+pnTS+UAxMNtYKty2vNmvhZyxfiA5oI/u0643gimLjy8PBbpWXyhwJhoj5Mdy44Q1BkyC4A3TiK+BdKOZSMSYgHmgrDdcGTZw1txJr0n56Jp9AbFFlgyaWwtjvb3wEmpiLAV/dizaIJuf5rHFsI0T08FOA2geZMQEnl60exPI5l91pIriPbcJt7Ip5CjtjAnqeN6ZSYgmimymXBB4vrzW36vW1V36+0vjJ5pqJ+o5eyziIdyEHxqvR5ca699o7pZxIic7fv2/e0bIFw9zqbrp0krbhHCglej/8uF7TsdUWkOd9Jh1MLYViKa2GCeBqFeOlBOiLsJI6Pv70cxtC/ilP1EcffvbJw/8eP9Z6O3f0YDA8erDXqVz99pEUpxt9X0yKwMlPyr7y1V/qA7m09Vtnm+0oG1XDcyCK6tX5+dHB/t7DpHUS/frKwrUW1fEbcH5GtErrYHA/06e/b7iOFLgVb0+LiUQXUk/f87gahPNTplvu6Rje7no9dr14O7lT4vhEAfxmQAm1aEIERs+HVM4SkTY+NYj5Hc3h3u4cClyiWbTrk8jiGfX8WQQiOFZ48/KcWW3KlClT3hwvAVfW0YBztfSBAAAAAElFTkSuQmCC");
+}
+
+/* /me/image/shoucang.png */
+.icon-shoucang {
+    background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAUUSURBVHgB7VnLbttGFL0zI8UuGqDKss0izBeE8SMR5ACl/iDddWepCIq0BWL7C2x/QdQCBYy+LH9B3S8wg9SO/GZ27Sp0EQTdWYsmTW1zbu9Qj47oIUXazKKADiCYnAfnnHvvzNwZA4wwwggjxMF2nJL6wTsEg3cAe6rsCCEW6dHpFvksYPW9vV9dyBm5C7DLZUugeGGqIxHVvEVwyBkC+UZcHQpchJyRq4CJ6UqN7GwlNHGmpu45kCNyFcA4RC3cpJ+rF+TthdzmgLI+42xVLwtYcLMABQsRB8Iqz7mQmwdM1vdaLX+vFRJ19Yo8vZCLAFPsk/WXted6pEtucyEXAXHW772EzwhregPywirkMTZcAOHu+vq1BVC0BWcfU1FNr1exrwsI+5j3hyYG8rkE9ODquOe5bhsygg0l+tdbmwOzmeC3VBFZ0qJeSelBc397s26qmLwz06S+s7E9EdpU7xEpTwbySAnz9louXETAZHlmFiQ0hpAdHJ8ISB7cjlq/h9ALUhxm+SaBwo8v7O88XTdViriBOHKXBhqHlAjJI1a9nWe/xbX58+XL9kfXrd+RyTIDllZECRh+ev3DG09evfrDj1YWTD0oVheHkWXKMuRuWuOPyPW+fP/KepoYVpak0HTFm8BBCGz6zq1wBWMUnkljClSh50IaAUTIjgSXiyB/YVjwi/zUa22bQyQtukLXu78+pqcrNgpekkjCkBYHxu5r1Y7pW2YBDKKWtCTDdW/7qQ854POvHs1KyRpkozbjuPTdt9+ES+zu7pan/lII+wLYXKSbb/qWcR9AhmuRIrUEbqi5AZfEgy8fLRL5Jj2WUBmGhOj1neVWZbTMGsIphFHAQWurGd14IAcRD76Ye0xMlvQyEtH3dhx5xSXkZEDiPhCzbvu0UVX1pTIuJHqozc+XxD+4SvX3zxFAVv9+pdFMIr+/s1mDGCSmEmHHFJ5AGVq1FxJNJahP/uG8VTzBjSh5ZfmzM3b7MuQVUqUSwzxBoXGsBOiVnGPtJOBPigw3lLBBXtQXWbW50vAvQz4cB1IgwRNhQiaRLUT7KE8UGB5Gyau9o0devQrJH1+UfOdzGWDyRPBe8Zpa1z97OF/jLDnDJDHrwRirNxuNcOLatlMSY6fHcEHyCpmz0Ym7lReUBli9dynQOtzaOlLPSSIQ2dc/rjTm9TJDhtqmRPAaZEDm84BOXqFHXuEnmpAUTuczUWTLUfIh3o5HN8zMF2GZBNiVymC+guBF2/REqImqVhq1TP6w0lgyfY8OAG0E9PUydnLyAWRAIUtjcSYo6ZLaaGBM3pQI6NxIDIXK/UGb6OwUqmn7KmTygMoeB9/xeVL7NOFAXjoaKGCRVWsIMnmAMZX6Dgzvm9r170b/PnUm786oIhclrh3sGtIBSR7g+hjsBmRAJgE0GS193eKBGJgDhkvdHhy6M3Km7szMnclgQT8myiJ4ItDHSD4XRJFNQGRTOrta6KS/8cQHgHRooXYb5BU3CILlUMibKz6Mnf7XKGMIpd4HTGs2kfgkDfEEhEIEFz/r52R9bxmGy9wLlZQ1IZ68S/FcVVcshjSkByf8RrZD/gCyphLHKQZTxJe7V4p9dG8klhKvVaCT6B1sb96ElMi2jApYTqgOLU6pQDVKXkFlrSrHCT1iOJz3wTBpjPPNISMmyhWVmS5qKYXR4sMwVb7n0I1Gf/6ENx2C1/efme9/ckde/8BT3yjncNYeYYQR/qf4F3XmaM8zQDSnAAAAAElFTkSuQmCC);
 }

+ 1 - 1
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/vip_purchase.css

@@ -523,7 +523,7 @@
 }
 
 .vip_purchase .choose_condition .chooseList {
-  margin: .26rem 0;
+  /* margin: .26rem 0; */
 }
 
 .vip_purchase .choose_condition .pay_mode {

+ 17 - 2
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/vip_upgrade.js

@@ -570,12 +570,12 @@ $(function () {
       "area": flag ? JSON.stringify(area) : '',
       'area_count': flag ? 0 : areaCount,
       // "industry": industry.join(","),
-      'price': parseInt(coupon.initPrice*100),
+      'price': parseInt(coupon.initPrice*10000/100),
       "time": purchase.timeValue.trim(),
       // "orderType": 5,
       "disWord": GetQueryString("disWord"),
     };
-    console.log(area, 'area', purchase.nowBuyset, coupon.initPrice*100)
+    console.log(area, 'area', purchase.nowBuyset, coupon.initPrice*10000/100)
     $DoPost("/subscribepay/vipsubscribe/upgrade", param, function (r) {
       if (r.success) {
         try {
@@ -649,6 +649,21 @@ function pickerShow (selector, f) {
   }
 }
 /* vue 代码 start */
+var goodsSize = new Vue({
+  el:'#goods-size-vue',
+  data: function() {
+    return {}
+  },
+  mounted () {},
+  methods: {
+    getGoodSize: function(data) {
+      console.log(data, '父组件接收子组件传来的商品规格')
+    },
+    getAutoRenew: function(data) {
+      console.log(data, '父组件接收子组件传来的是否开启自动续费')
+    }
+  }
+})
 var coupon = new Vue({
   el: '#coupon-vue',
   data: function () {

+ 11 - 1
src/jfw/modules/app/src/web/templates/me/mine.html

@@ -138,7 +138,7 @@
                             <span class="j-icon base-icon icon-arrow-right"></span>
                         </div>
                     </div>
-                    <div data-need-bind-phone class="menu_list ent-search" style="display: none;" data-href='/jyapp/vipsubscribe/introducePage'>
+                    <!-- <div class="menu_list ent-search" style="display: none;" data-href='/jyapp/vipsubscribe/introducePage'>
                         <div class="menu_list_left">
                             <span class="j-icon base-icon icon-qiyechaxun"></span>
                             <span class="label">企业查询</span>
@@ -147,6 +147,16 @@
                             <i class="dot-red"></i>
                             <span class="j-icon base-icon icon-arrow-right"></span>
                         </div>
+                    </div> -->
+                    <div class="menu_list bx-collection" data-href='/jyapp/frontPage/collection/sess/index'>
+                        <div class="menu_list_left">
+                            <span class="j-icon base-icon icon-shoucang"></span>
+                            <span class="label">标讯收藏</span>
+                        </div>
+                        <div class="menu_list_right">
+                            <i class="dot-red"></i>
+                            <span class="j-icon base-icon icon-arrow-right"></span>
+                        </div>
                     </div>
                     <div data-need-bind-phone class="menu_list ent-follow">
                         <div class="menu_list_left">

+ 8 - 2
src/jfw/modules/app/src/web/templates/vipsubscribe/vip_UpgradePage.html

@@ -17,6 +17,7 @@
   <link rel="stylesheet" href='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/vipsubscribe/css/vip_upgrade.css?v={{Msg "seo" "version"}}'>
   <link rel="stylesheet" href='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/local/layout.css' />
   <link rel="stylesheet" href='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/css/font.css?v={{Msg "seo" "version"}}' />
+  <link rel="stylesheet" href='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/vipsubscribe/css/vip-size-template.css?v={{Msg "seo" "version"}}' />
   <link rel="stylesheet" href='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/coupon/css/pay-order-template.css?v={{Msg "seo" "version"}}' />
   <style>
     .vip-header {
@@ -50,7 +51,7 @@
     <div class="vip-upgrade live-20200707">
       <!-- <div class="vip-header"></div> -->
       <div class="vip-body">
-        <ul style="padding: .16rem .24rem;">
+        <ul>
           <li class="body-item area">
             <a class="item-container" data-upgrade-to-area href="/jyapp/vipsubscribe/toChooseArea?header=upgrade">
               <div class="item">
@@ -69,7 +70,7 @@
               <p class="error-update-tips">选择省份数量低于原套餐数,无法升级,请增加省份数量</p>
             </a>
           </li>
-          <li class="body-item select_cycle">
+          <li class="body-item select_cycle" style="display: none;">
             <a class="item-container" href="javascript:;">
               <div class="item">
                 <span class="item-l">
@@ -91,6 +92,10 @@
             </a>
           </li>
         </ul>
+        <!-- 商品规格 -->
+        <div id="goods-size-vue">
+          <vip-size-template @select-vip-size="getGoodSize" @select-auto-renew="getAutoRenew"></vip-size-template>
+        </div>
         <!-- 超级订阅专属权益 封装为公共页面-->
         {{include "/vipsubscribe/commonRules.html"}}
       </div>
@@ -201,6 +206,7 @@
   <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/vipsubscribe/js/price.js?v={{Msg "seo" "mod_version"}}'></script>
   {{include "/common/iosJS.html"}}
   <script src=//cdn.jsdelivr.net/npm/vue@2.6.11/dist/vue.min.js></script> 
+  <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/vipsubscribe/js/vip-size-template.js?v={{Msg "seo" "version"}}'></script>
   <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/coupon/js/pay-order-template.js?v={{Msg "seo" "version"}}'>
   </script>
   <script>

+ 53 - 3
src/jfw/modules/app/src/web/templates/vipsubscribe/vip_purchase.html

@@ -14,6 +14,8 @@
   <link rel="stylesheet" href='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/vipsubscribe/css/vip_purchase.css?v={{Msg "seo" "version"}}'>
   <link rel="stylesheet" href='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/local/layout.css'/>
   <link rel="stylesheet" href='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/css/font.css?v={{Msg "seo" "version"}}'/>
+  <link rel="stylesheet" href='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/vipsubscribe/css/vip-size-template.css?v={{Msg "seo" "version"}}' />
+  <link rel="stylesheet" href='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/vipsubscribe/css/vip-coupon-template.css?v={{Msg "seo" "version"}}' />
   <link rel="stylesheet" href='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/coupon/css/pay-order-template.css?v={{Msg "seo" "version"}}' />
   <style>
     .vip_purchase {
@@ -123,7 +125,7 @@
                 <p class="add_tips industry_warn" style="display: none;">请选择行业</p>
                 <p class="add_tips industry" style="display:none">已选择 0 个行业</p>
               </li>
-              <li class="choose_item select_cycle">
+              <li class="choose_item select_cycle" style="display: none;">
                 <!-- 需要选择订阅周期就用a标签,div.class="free-7day"隐藏 opacity: 1 !important; -->
                 <!-- 需要选择试用就用div标签,a标签隐藏 -->
                 {{if not .T.isTrial }}
@@ -141,6 +143,14 @@
                 {{end}}
               </li>
             </ul>
+            <!-- 商品规格 -->
+            <div id="goods-size-vue">
+              <vip-size-template @select-vip-size="getGoodSize" @select-auto-renew="getAutoRenew"></vip-size-template>
+            </div>
+            <!-- 商品优惠券 -->
+            <div id="goods-coupon-vue">
+              <vip-coupon-template></vip-coupon-template>
+            </div>
             <!-- <div class="pay_mode">
               {{if not .T.isTrial }}
                 <div class="select_payment choose_item">
@@ -153,7 +163,7 @@
               {{end}}
             </div> -->
             <!--S-手机号输入-->
-            <div class='order-phone-group'>
+            <div class='order-phone-group' style="margin: .24rem;border-radius: 8px;">
               <label for='order_phone'>手机号码</label>
               <input id='order_phone' autocomplete='off' placeholder='请输入手机号码' maxlength='11' type='tel' />
               <p>手机号码输入错误</p>
@@ -465,6 +475,8 @@
       <!--<script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/js/check-bind-phone.js?v={{Msg "seo" "version"}}'></script>-->
       <script src="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/vipsubscribe/js/price.js?v={{Msg "seo" "version"}}"></script>
       <script src=//cdn.jsdelivr.net/npm/vue@2.6.11/dist/vue.min.js></script>
+      <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/vipsubscribe/js/vip-size-template.js?v={{Msg "seo" "version"}}'></script>
+      <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/vipsubscribe/js/vip-coupon-template.js?v={{Msg "seo" "version"}}'></script>
       <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/coupon/js/pay-order-template.js?v={{Msg "seo" "version"}}'></script>
       <script>
         // @订单手机号-S
@@ -617,6 +629,43 @@
         {{end}}
 
         /* vue 代码 start */
+        // vip商品规格
+        var goodsSize = new Vue({
+          el:'#goods-size-vue',
+          data: function() {
+            return {
+
+            }
+          },
+          mounted () {
+
+          },
+          methods: {
+            getGoodSize: function(data) {
+              console.log(data, '父组件接收子组件传来的商品规格')
+            },
+            getAutoRenew: function(data) {
+              console.log(data, '父组件接收子组件传来的是否开启自动续费')
+            }
+          }
+        })
+        // vip活动
+        // vip优惠券
+        var goodsCoupon = new Vue({
+          el:'#goods-coupon-vue',
+          data: function() {
+            return {
+
+            }
+          },
+          mounted () {
+
+          },
+          methods: {
+            
+          }
+        })
+        // 订单提交
         var coupon = new Vue({ 
           el: '#coupon-vue',
           data: function () {
@@ -637,6 +686,7 @@
               buttons: {
                 submit: this.submitOrder
               },
+              hideCoupon: true
             }
           },
           mounted () {
@@ -1158,7 +1208,7 @@
               // "industry": industry.join(","),
               "time": $(".info:eq(2)").val().trim(),
               "orderType":{{.T.orderType}},
-              "price": Number((coupon.initPrice*100).toFixed(2)),
+              "price": parseInt(coupon.initPrice*10000/100),
               "activeCode": activeCodes,
               "disWord":getParam("disWord"),//分销系统 口令
             };

+ 71 - 21
src/jfw/modules/publicapply/src/enterpriseSearch/entity/entQuery.go

@@ -14,11 +14,11 @@ type EnterpriseSearch struct {
 	EntArea     string //注册地省份[多个用逗号分割]
 	EntCity     string //注册地城市[多个用逗号分割]
 	EntCapital  string //注册资本[min-max,必有-]
-	EntType     string //企业类型[]
-	EntStatus   string //企业状态[吊销、存续、撤销、(停业??)]
+	EntType     string //企业类型[A:有限责任公司,B:股份有限公司,C:有限合伙,D:普通合伙]
+	EntStatus   string //企业状态[A:存续,B:吊销,C:注销、D:(停业??)、E:撤销]
 	BiddingArea string //中标地区[会员:多个用逗号分割]
-	EntClass    string //单位类型[会员:采购单位、投标企业、代理机构、厂商]
-	EntContact  string //联系方式[会员:固定电话、手机号、邮箱、不存在]
+	EntClass    string //单位类型[会员:1:采购单位、2:投标企业、3:代理机构、4:厂商]
+	EntContact  string //联系方式[会员:1:固定电话、2:手机号、3:邮箱、4:不存在]
 
 	PageSize int  //每页数量
 	PageNum  int  //页码
@@ -33,13 +33,29 @@ const (
 )
 
 var (
+	//检索匹配
 	AllMatchType = map[string]string{
 		"A": `{"match_phrase":{"ent_ikname":"%s"}}`, //企业名称
-		"B": `{"term":{"legal_person":"%s"}}`,       // 法定代表人
+		"B": `{"term":{"legal_person":"%s"}}`,       //法定代表人
 		"C": `{"term":{"stock_name":"%s"}}`,         //股东
 		"D": `{"term":{"employee_name":"%s"}}`,      //高管
 		"E": `{"term":{"bid_purchasing":"%s"}}`,     //标的物
 	}
+	//EntType 企业类型
+	AllEntType = map[string]string{
+		"A": "有限责任公司",
+		"B": "股份有限公司",
+		"C": "有限合伙",
+		"D": "普通合伙",
+	}
+	//EntStatus 企业状态
+	AllEntStatus = map[string]string{
+		"A": "存续",
+		"B": "吊销",
+		"C": "注销",
+		"D": "", //(停业??)
+		"E": "撤销",
+	}
 )
 
 //Check 校验查询参数是否合法
@@ -50,9 +66,39 @@ func (es *EnterpriseSearch) Check() (*EnterpriseSearch, error) {
 	if (es.PageNum+1)*es.PageSize > searchMaxLimit {
 		return nil, fmt.Errorf("超出查询数量限制")
 	}
+	//注册资本[min-max]
 	if es.EntCapital != "" && strings.Index(es.EntCapital, "-") < 0 {
 		return es, fmt.Errorf("金额查询参数异常")
 	}
+	//企业类型
+	if es.EntType != "" {
+		tmp := []string{}
+		for _, t := range strings.Split(es.EntType, ",") {
+			if val, ok := AllEntType[t]; ok {
+				tmp = append(tmp, val)
+			}
+		}
+		es.EntType = strings.Join(tmp, ",")
+	}
+	//企业状态
+	if es.EntStatus != "" {
+		tmp := []string{}
+		for _, t := range strings.Split(es.EntStatus, ",") {
+			if val, ok := AllEntStatus[t]; ok {
+				tmp = append(tmp, val)
+			}
+		}
+		es.EntStatus = strings.Join(tmp, ",")
+	}
+	//中标区域
+	//单位类型校验[1:采购单位、2:投标企业、3:代理机构、4:厂商]
+	if es.EntClass != "" && !(es.EntClass == "1" || es.EntClass == "2" || es.EntClass == "3" || es.EntClass == "4") {
+		es.EntClass = ""
+	}
+	//联系方式[1:固定电话、2:手机号、3:邮箱、4:不存在]
+	if es.EntContact != "" && !(es.EntContact == "1" || es.EntContact == "2" || es.EntContact == "3" || es.EntContact == "4") {
+		es.EntContact = ""
+	}
 	return es, nil
 }
 
@@ -60,29 +106,36 @@ func (es *EnterpriseSearch) Check() (*EnterpriseSearch, error) {
 //return  company_name、company_status、legal_person、capital、company_address、id
 //返回字段 企业名称、企业状态、法人、注册资本、地址、企业id
 func (es *EnterpriseSearch) GetQuerySql() string {
-	query := `{"query":{"bool":{"must":[%s]}},"_source":["id","company_name","GetQuerySql","legal_person","capital","company_address"]}`
+	query := `{"query":{"bool":{"must":[%s]}},"_source":["_id","company_name","company_status","legal_person","capital","company_address"]}`
 	musts := make([]string, 0, 0)
 	//输入查询
-	if es.Match != "" {
+	if es.Match != "" { //或关系 仅需满足一个
+		thisQuery := []string{}
 		if es.MatchType != "" { //查询指定内容
 			for _, t := range strings.Split(es.MatchType, ",") {
-				if thisQuery, exists := AllMatchType[t]; exists {
-					musts = append(musts, fmt.Sprintf(thisQuery, es.Match))
+				if q, exists := AllMatchType[t]; exists {
+					thisQuery = append(thisQuery, fmt.Sprintf(q, es.Match))
 				}
 			}
 		} else { //查询全部
 			for _, q := range AllMatchType {
-				musts = append(musts, fmt.Sprintf(q, es.Match))
+				thisQuery = append(thisQuery, fmt.Sprintf(q, es.Match))
 			}
 		}
+		musts = append(musts, fmt.Sprintf(`{"bool":{"should":[%s],"minimum_should_match": 1}}`, strings.Join(thisQuery, ",")))
 	}
 	//注册地
-	if es.EntArea != "" {
-		musts = append(musts, fmt.Sprintf(`{"terms":{"company_area":["%s"]}}`, strings.ReplaceAll(es.EntArea, ",", "\",\"")))
-	}
-	if es.EntCity != "" {
-		musts = append(musts, fmt.Sprintf(`{"terms":{"company_city":["%s"]}}`, strings.ReplaceAll(es.EntCity, ",", "\",\"")))
+	if es.EntArea != "" || es.EntCity != "" {
+		thisQuery := []string{}
+		if es.EntArea != "" {
+			thisQuery = append(thisQuery, fmt.Sprintf(`{"terms":{"company_area":["%s"]}}`, strings.ReplaceAll(es.EntArea, ",", "\",\"")))
+		}
+		if es.EntCity != "" {
+			thisQuery = append(thisQuery, fmt.Sprintf(`{"terms":{"company_city":["%s"]}}`, strings.ReplaceAll(es.EntCity, ",", "\",\"")))
+		}
+		musts = append(musts, fmt.Sprintf(`{"bool":{"should":[%s],"minimum_should_match": 1}}`, strings.Join(thisQuery, ",")))
 	}
+
 	//注册资本
 	if es.EntCapital != "" {
 		moneyRange := strings.Split(es.EntCapital, "-")
@@ -102,7 +155,7 @@ func (es *EnterpriseSearch) GetQuerySql() string {
 	}
 	//企业类型(页面显示的企业与数据已存在的类型不一致)
 	if es.EntType != "" {
-		musts = append(musts, fmt.Sprintf(`{"terms":{"xxx":["%s"]}}`, strings.ReplaceAll(es.EntType, ",", "\",\"")))
+		musts = append(musts, fmt.Sprintf(`{"terms":{"search_type":["%s"]}}`, strings.ReplaceAll(es.EntType, ",", "\",\"")))
 	}
 	//企业状态
 	if es.EntStatus != "" {
@@ -143,11 +196,8 @@ func (es *EnterpriseSearch) DoQuery() (list *[]map[string]interface{}, total int
 	//格式化字段,加密id
 	if list != nil {
 		for index, _ := range *list {
-			encodeId := ""
-			if encode := qutil.DecodeArticleId2ByCheck(qutil.ObjToString((*list)[index]["id"])); len(encode) > 0 {
-				encodeId = encode[0]
-			}
-			(*list)[index]["id"] = encodeId
+			(*list)[index]["id"] = qutil.EncodeArticleId2ByCheck(qutil.ObjToString((*list)[index]["_id"]))
+			delete((*list)[index], "_id")
 		}
 	}
 	return

+ 19 - 3
src/jfw/public/dataexport.go

@@ -109,9 +109,10 @@ type BidSearchExport struct {
 	Buyerclass   string //采购单位行业
 	Hasbuyertel  string //是否有采购电话
 	Haswinnertel string //是否有中标电话
+	SelectIds    string //选择单条信息id
 }
 
-func (this *BidSearchExport) PassBidSearchExport() map[string]interface{} {
+func (this *BidSearchExport) PassBidSearchExport() (returnData map[string]interface{}) {
 	areaSave, industrySave := []string{}, []string{}
 	winnerSave, buyerclassSave := []string{}, []string{}
 	publishtimeSave := ""
@@ -153,8 +154,7 @@ func (this *BidSearchExport) PassBidSearchExport() map[string]interface{} {
 		endtime := fmt.Sprint(time.Date(now.Year()-1, 12, 31, 23, 59, 59, 0, time.Local).Unix())
 		publishtimeSave = fmt.Sprintf("%s_%s", starttime, endtime)
 	}
-
-	return map[string]interface{}{
+	returnData = map[string]interface{}{
 		"keywords":     KeyWordSave,
 		"publishtime":  publishtimeSave,
 		"area":         areaSave,
@@ -170,4 +170,20 @@ func (this *BidSearchExport) PassBidSearchExport() map[string]interface{} {
 		"comeintime":   now.Unix(),
 		"comeinfrom":   "supersearchPage",
 	}
+	//选择信息id
+	if this.SelectIds != "" {
+		ids := []string{}
+		for _, encodeId := range strings.Split(this.SelectIds, ",") {
+			log.Println("xxxxx", util.CommonDecodeArticle("content", encodeId))
+			if tmp := util.CommonDecodeArticle("content", encodeId); len(tmp) > 0 {
+				if id := tmp[0]; id != "" {
+					ids = append(ids, id)
+				}
+			}
+		}
+		if len(ids) > 0 {
+			returnData["selectIds"] = ids
+		}
+	}
+	return returnData
 }

+ 1 - 0
src/seo.json

@@ -505,6 +505,7 @@
     "course": "25",
     "wjmm": "26",
     "bigmember": "27",
+    "collection": "28",
     "module": {
         "subscribe": "订阅页",
         "/list/": "标签页",

+ 5 - 1
src/web/staticres/common-module/coupon/js/pay-order-template.js

@@ -27,6 +27,10 @@ var couponTem = {
           isVipTrial: {
             type: Boolean,
             default: false
+          },
+          hideCoupon: {
+            type:Boolean,
+            default: false
           }
         }
       }
@@ -77,7 +81,7 @@ var couponTem = {
             </p>
           </div>
         </div>
-        <div v-show="!isShowDetail && !config.isVipTrial" class="order-coupon">
+        <div v-show="!isShowDetail && !config.isVipTrial && !config.hideCoupon" class="order-coupon">
           <div class="coupon-label">优惠券</div>
           <div class="coupon-value" @click="selectCoupon">
             <div class="coupon-value-box" v-if="coupon.list && coupon.list.length > 0">

+ 98 - 0
src/web/staticres/common-module/vipsubscribe/css/vip-coupon-template.css

@@ -0,0 +1,98 @@
+#vip-coupon-template{
+  margin-top: .24rem;
+  padding: 0 .32rem;
+}
+#vip-coupon-template .vip-coupon-list{
+  display: flex;
+  align-items: center;
+  margin-top: .24rem;
+  height: 1.6rem;
+  background: #ffffff;
+  box-shadow: 0px 2px 8px 0px rgba(54,147,179,0.05);
+  border-radius: 4px;
+  overflow: hidden;
+}
+#vip-coupon-template .vip-coupon-list .list-left{
+  position: relative;
+  width: 1.6rem;
+  height: 1.6rem;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  border-radius: 4px;
+}
+#vip-coupon-template .c-name{
+  position: absolute;
+  top: 0;
+  left: 0;
+  padding: 0 .24rem 0 .16rem;
+  border-radius: 4px 0px 16px 0px;
+  color: #fff;
+  font-size: .24rem;
+}
+#vip-coupon-template .c-result{
+  margin-top: .36rem;
+  line-height: .64rem;
+  color: #fff;
+  font-size: .4rem;
+}
+#vip-coupon-template .c-sub{
+  margin-top: .06rem;
+  line-height: .28rem;
+  color: #fff;
+  font-size: .2rem;
+}
+#vip-coupon-template .list-right{
+  flex: 1;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  padding: .44rem .32rem .44rem .28rem;
+}
+#vip-coupon-template .red-bg{
+  background: linear-gradient(107deg,#ffa674, #f01212 100%);
+}
+#vip-coupon-template .yellow-bg{
+  background: linear-gradient(180deg,#ffcc66, #ff9f40 100%);
+}
+#vip-coupon-template .valid{
+  flex: 1;
+}
+#vip-coupon-template .valid-label{
+  color: #171826;
+  font-size: .24rem;
+  line-height: .36rem;
+}
+#vip-coupon-template .valid-value{
+  color: #9b9ca3;
+  margin-top: .08rem;
+  font-size: .2rem;
+  line-height: .28rem;
+  white-space: nowrap;
+}
+#vip-coupon-template .handle{
+  min-width: 1.6rem;
+  font-size: .24rem;
+  text-align: center;
+}
+#vip-coupon-template .handle-use{
+  background: transparent;
+}
+#vip-coupon-template .red-color{
+  color: #FB483D;
+}
+#vip-coupon-template .yellow-color{
+  color: #FF9F40;
+}
+#vip-coupon-template .handle-disabled{
+  color: #c0c4cc;
+  background: transparent;
+}
+#vip-coupon-template .handle-selected {
+  padding: .06rem .28rem;
+  border: 1px solid #FF9F40;
+  background: rgba(255,159,64,0.10);
+  color: #ff9f40;
+  line-height: .36rem;
+  border-radius: 16px;
+}

+ 71 - 0
src/web/staticres/common-module/vipsubscribe/css/vip-size-template.css

@@ -0,0 +1,71 @@
+.goods-size-template{
+  background-color: #fff;
+}
+.goods-size-template .goods{
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  padding: .16rem .32rem .24rem;
+}
+.goods-size-template .goods-list{
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  padding: .32rem .28rem;
+  background: #f5f6f7;
+  border-radius: 8px;
+  max-width: 2.16rem;
+  overflow: hidden;
+}
+.goods-size-template .goods-list.goods-active{
+  background: url(../image/goods-checked.png) no-repeat center center #fff;
+  background-size: contain;
+}
+.goods-size-template .goods-period{
+  font-size: .26rem;
+  line-height: .44rem;
+  color: #5f5e64;
+}
+.goods-size-template .goods-price{
+  white-space: nowrap;
+  font-size: 0; 
+  /* font-size: 0;处理行内元素之前有间隔 */
+}
+.goods-size-template .goods-price > span{
+  font-size: .28rem;
+  color: #171826;
+}
+.goods-size-template .goods-price > strong{
+  font-size: .64rem;
+  color: #171826;
+}
+.goods-size-template .goods-summary{
+  white-space: nowrap;
+  font-size: .22rem;
+  color: #171826;
+  line-height: .44rem;
+}
+.goods-size-template .auto-renew{
+  display: flex;
+  align-items: center;
+  padding: .14rem .32rem;
+  line-height: .36rem;
+  color: #5f5e64;
+  font-size: .24rem;
+}
+.goods-size-template .auto-renew .auto-checkbox{
+  width: .36rem;
+  height: .36rem;
+  margin-right: .14rem;
+  border: 1px solid #ccc;
+  border-radius: 100%;
+  box-sizing: border-box;
+}
+.goods-size-template .auto-renew .auto-checkbox:checked{
+  width: .36rem;
+  height: .36rem;
+  background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAMfSURBVHgBxZhNUhpBFIDfexhduOEGmSxSJaRSMCcQtLLITk8gniDkBOAJ1BNETqC7VCVRdJH1QFKF7DK5AZuUMRX65b3mV5wJMzCMr6qhmX7d/THd76cbIaZsffSczDrsMWABEEsIkGUp2ib1ntR9ZvQJ+jf9P3DRfev6ccbHqIr5S6/CmDlA4BLEkxawOe3sumdRlOcCbX32SpShD1J1YDnxBexoHlgokHPuZTezmRozVyFBQcaTX9Q/8stuL7A96KHuE9qgc6kWYTXim3tTDtpfGALThOWXaCEomv6hy5QSjJ1OV8FpelkIA9I9kxLMSIqbxs45lvGSqVkDWmtKXUxflu6Ne631yRtCqsETydCtDOr6Yd9OGkuFfMZgGgEtzpBhAIRI72DVwnDUKRcPb3fcShCURgELpGbOq/M3E5jdQn30EznDsyoaknJfO88JJVBCijBbzfaBEFUCdX/f7xNCZhtShCGGszB1JCwQIjvBY4knRfNCC2jEXjHMoA+WRCfYupBNo1t2fS3raMrAfAGrhBlIFvNXbQ5pfBRrxDRPYJ5FzsDkvnh7SDZQRxL6T5sNsmqFoweSy1Q1p4GIMPlPXpEonvdXoB7Eg6oHQgXA4Bo1R+ltROnNAxpBeS9lgmkow+ZwwgKNBGBUfNlr5iaCYvbZGnnWhwylq6noX+Nqvny7U6gkACN/zPzE3KVXldBxHLkXUr1Tfh24j5ZN7pjNe2KC6OZse5l6vvm9ljSMHVpYSP2MxJHrOB0V6tXlt+MkYURayrKmtT5zQ1x2KU5vRq6KDyvJofCaJDYtsmemRYzkVL/HGWPuqv0D001fx6JhSgxDQ9TEMXJ/YsapA035tTGQzWmHry1dGDjtTp1mH4SOdYI6LBLZF4WRpbojU59+9gCoJcdbSTf2VRFSgGHJImaP1I+Cq5qeKq4SSsZu6Rw612xbYLRXxQ0chAVIGkb2zF0IjMr86xg5nkhoqS3rEuwSiSWPDoRhEvnCSsHEeUpyhrFOKCxRQK50Gt2kLqwegTU9Bw3sIeC29HZkCCljL92zhQUCuM0LXOn9A06rk6ZU1XotAAAAAElFTkSuQmCC) no-repeat center center;
+  background-size: contain;
+  box-sizing: border-box;
+  border: 0;
+}

BIN
src/web/staticres/common-module/vipsubscribe/image/goods-checked.png


+ 88 - 0
src/web/staticres/common-module/vipsubscribe/js/vip-coupon-template.js

@@ -0,0 +1,88 @@
+Vue.component('vip-coupon-template', {
+  delimiters: ['@@', '@@'],
+  props: {
+    
+  },
+  data: function () {
+    return {
+      couponList: [
+        {
+          "lotteryId": "4159",
+          "lotteryAttribute": "满减卷",
+          "lotteryBeginDate": "2021-04-08",
+          "lotteryEndDate": "2021-05-10",
+          "products": [],
+          "available": true,
+          "full": 100,
+          "reduce": 10,
+          "instructions": "使用说明",
+          "userLotteryId": "465c"
+        },
+        {
+          "lotteryId": "4159",
+          "lotteryAttribute": "折扣卷",
+          "lotteryBeginDate": "2021-04-08",
+          "lotteryEndDate": "2021-05-10",
+          "products": [],
+          "available": true,
+          "full": 100,
+          "reduce": 10,
+          "instructions": "使用说明",
+          "userLotteryId": "465c"
+        },
+        {
+          "lotteryId": "4159",
+          "lotteryAttribute": "折扣卷",
+          "lotteryBeginDate": "2021-04-08",
+          "lotteryEndDate": "2021-05-10",
+          "products": [],
+          "available": true,
+          "full": 100,
+          "reduce": 10,
+          "instructions": "使用说明",
+          "userLotteryId": "465c"
+        },
+        {
+          "lotteryId": "4159",
+          "lotteryAttribute": "折扣卷",
+          "lotteryBeginDate": "2021-04-08",
+          "lotteryEndDate": "2021-05-10",
+          "products": [],
+          "available": true,
+          "full": 100,
+          "reduce": 10,
+          "instructions": "使用说明",
+          "userLotteryId": "465c"
+        }
+      ]
+    }
+  },
+  template: `
+  <div class="vip-coupon-template" id="vip-coupon-template">
+    <div class="vip-coupon-list" v-for="(item,index) in couponList" :key="item.lotteryId">
+      <div :class="['list-left', item.lotteryAttribute == '满减卷' ? 'red-bg': '', item.lotteryAttribute == '折扣卷' ? 'yellow-bg' : '']">
+        <div :class="['c-name', item.lotteryAttribute == '满减卷' ? 'red-bg': '', item.lotteryAttribute == '折扣卷' ? 'yellow-bg' : '']">@@item.lotteryAttribute@@</div>
+        <div class="c-result">@@item.reduce@@</div>
+        <div class="c-sub">满@@item.full@@元可用</div>
+      </div>
+      <div class="list-right">
+        <div class="valid">
+          <p class="valid-label">有效期:</p>
+          <p class="valid-value">@@item.lotteryBeginDate@@ - @@item.lotteryEndDate@@</p>
+        </div>
+        <div class="handle">
+          <button v-if="1 !== 2" :class="['handle-use', item.lotteryAttribute == '满减卷' ? 'red-color': 'yellow-color']" @click="useFn(item)">使用</button>
+          <button v-else-if="1 == 3" class="handle-disabled">暂不可用</button>
+          <button v-else class="handle-selected">已选择</button>
+        </div>
+      </div> 
+    </div>
+  </div>
+  `,
+  mounted() {},
+  methods: {
+    useFn: function(item) {
+      console.log(item)
+    }
+  }
+})

+ 61 - 0
src/web/staticres/common-module/vipsubscribe/js/vip-size-template.js

@@ -0,0 +1,61 @@
+Vue.component('vip-size-template', {
+  delimiters: ['@@', '@@'],
+  props: {
+    
+  },
+  data: function () {
+    return {
+      goodsActive: 0,
+      goodsSize: [
+        {
+          period: '1月',
+          price: 38,
+          summary: '每天仅需1.27元'
+        },
+        {
+          period: '1季',
+          price: 99,
+          summary: '每天仅需1.09元'
+        },
+        {
+          period: '1年',
+          price: 380,
+          summary: '每天仅需1.04元'
+        }
+      ],
+      isShowAuto: false, // 是否显示自动续费,本次版本不显示
+      autoChecked: false, // 自动续费是否勾选
+    }
+  },
+  template: `
+  <div class="goods-size-template">
+    <div class="goods">
+      <div :class="['goods-list', goodsActive == index ? 'goods-active' : '']" v-for="(item,index) in goodsSize" :key="item.price" @click="chooseGoods(item, index)">
+        <div class="goods-period">@@item.period@@</div>
+        <div class="goods-price">
+          <span>¥</span>
+          <strong>@@item.price@@</strong>
+        </div>
+        <div class="goods-summary">@@item.summary@@</div>
+      </div>
+    </div>
+    <div class="auto-renew" v-if="isShowAuto">
+      <input class="auto-checkbox" id="auto-checkbox" @click="autoRenewFn" type="checkbox" />
+      <label for="auto-checkbox">首次开通自动按月续费,首月立享每个省29元。</label>
+    </div>
+  </div>
+  `,
+  mounted() {},
+  methods: {
+    // 选择商品规格
+    chooseGoods: function(item, index) {
+      this.goodsActive = index
+      this.$emit('select-vip-size', item)
+    },
+    // 自动续费
+    autoRenewFn: function (){
+      this.autoChecked = !this.autoChecked
+      this.$emit('select-auto-renew', this.autoChecked)
+    }
+  }
+})

+ 5 - 2
src/web/staticres/css/dev2/newBidSearch.css

@@ -34,7 +34,7 @@
   cursor: pointer;
   margin: 0 4px 8px 0;
 }
-.buy-type{
+.buy-list-parent{
   color: #2cb7ca;
 }
 .buyclass-all.active,
@@ -134,6 +134,9 @@
   background-color: #fff;
   margin: 6px 16px 0 0!important;
 }
+.all-text-checkbox{
+  margin: 4px 16px 0 0!important;
+}
 .check-all{
   margin: 16px 0 0 15px!important;
 }
@@ -165,7 +168,7 @@
   background: transparent url(/images/collect.png) center no-repeat;
   background-size: contain;
   cursor: pointer;
-  vertical-align: middle;
+  vertical-align: sub;
 }
 .icon-collect.checked{
   background: transparent url(/images/collected.png) center no-repeat;

+ 15 - 2
src/web/staticres/js/biddingSearch.js

@@ -286,9 +286,22 @@ function toPaydataExport(){
 		$(".code-text").html('<span style="font-size:22px;margin-top:10px;display:inline-block;color:#252627;font-weight:normal;"><img id="wxpng" src="/images/wx1.png">请先微信扫码登录</span>')
 		$("#bidLogin").modal("show");
 	}else{
-		//已登录跳转订单支付页面
+    //已登录跳转订单支付页面
+    var selectIds = ""
+    var idText = ""
+    $('.custom-checkbox:not(.check-all)[name="bid-list"]').each(function(index){
+      if($(this).is(':checked')) {
+        if ($(this).attr("dataid")) {
+          idText = $(this).attr("dataid");
+          if(selectIds != ""){
+            selectIds += ",";
+          }
+          selectIds += idText;
+        }
+      }
+    })
 		window.history.replaceState(null, null, "/jylab/supsearch/index.html?goback"+new Date().getTime());
-		$("#zbSeatchT").attr("action","/front/dataExport/superSearchExport");
+		$("#zbSeatchT").attr("action","/front/dataExport/superSearchExport?selectIds=" + selectIds);
 		$("#zbSeatchT").removeAttr("onsubmit");
 		$("#zbSeatchT").submit();
 	}

+ 10 - 4
src/web/staticres/js/login.js

@@ -394,9 +394,12 @@ var logic = function(data,num){
           +"<div class=\"myorderDiv lastBox\" style='display: none' onclick=\"window.location.href='/swordfish/page_big_pc'\">"
           +"<span>大会员</span>"
           +"</div>"
-          +"<div class=\"myorderDiv ent-search\" style='display: none' onclick=\"window.location.href='/swordfish/page_big_pc/svip/ent_search'\">"
-          +"<span>企业查询</span>"
+          +"<div class=\"myorderDiv bx-collection\" onclick=\"window.location.href='/swordfish/frontPage/collection/sess/index'\">"
+          +"<span>标讯收藏</span>"
           +"</div>"
+        //   +"<div class=\"myorderDiv ent-search\" style='display: none' onclick=\"window.location.href='/swordfish/page_big_pc/svip/ent_search'\">"
+        //   +"<span>企业查询</span>"
+        //   +"</div>"
 					hhtml+= "<div class='exitDiv' onclick='signout()'>"
 						+"<img id='outImg' src='/images/userexit.png'/>"
 						+"<span>退出</span>"
@@ -668,9 +671,12 @@ var haslogin = function(num,kyorpn,url){
             +"<div class=\"myorderDiv lastBox\" style='display: none' onclick=\"window.location.href='/swordfish/page_big_pc'\">"
             +"<span>大会员</span>"
             +"</div>"
-            +"<div class=\"myorderDiv ent-search\" style='display: none' onclick=\"window.location.href='/swordfish/page_big_pc/svip/ent_search'\">"
-            +"<span>企业查询</span>"
+            +"<div class=\"myorderDiv bx-collection\" onclick=\"window.location.href='/swordfish/frontPage/collection/sess/index'\">"
+            +"<span>标讯收藏</span>"
             +"</div>"
+            // +"<div class=\"myorderDiv ent-search\" style='display: none' onclick=\"window.location.href='/swordfish/page_big_pc/svip/ent_search'\">"
+            // +"<span>企业查询</span>"
+            // +"</div>"
             hhtml+= "<div class='exitDiv' onclick='signout()'>"
             +"<img id='outImg' src='/images/userexit.png'/>"
             +"<span>退出</span>"

+ 224 - 16
src/web/staticres/js/superSearch.js

@@ -91,6 +91,8 @@ $(function() {
 	})
 	//全文检索和标题检索切换
 	$("#newsclass li:nth-child(2)").click(function(){
+    // 重置全选按钮
+    $('.custom-checkbox.check-all').prop('checked', false)
 		$(".tabContainer-2 .lucene ul").html("");
 		$("#zbSeatchT [name='selectType']").val("all");
 		$("#right-list").addClass("active").siblings().removeClass("active");
@@ -103,10 +105,12 @@ $(function() {
 			$(".tabContainer").css("min-height","600px");
 			selectType = "all";
 			searchOnsubmit();
-			submitflag=false;
-		}
+      submitflag=false;
+    }
 	})
 	$("#newsclass li:nth-child(1)").click(function(){
+    // 重置全选按钮
+    $('.custom-checkbox.check-all').prop('checked', false)
 		$("#allnews .lucene ul").html("");
 		$("#zbSeatchT [name='selectType']").val("title");
 		$("#right-list").addClass("active").siblings().removeClass("active");
@@ -119,7 +123,7 @@ $(function() {
 			$(".tabContainer").css("min-height","600px");
 			selectType = "title";
 			searchOnsubmit();
-			submitflag=false;
+      submitflag=false;
 		}
 	})
 	//
@@ -226,7 +230,8 @@ function getNewBids(pnum){
 			$(".pagination").hide();
 			$(".working").hide();
 			$(".hasNoData").show();
-		}
+    }
+    getBidIsColl()
 	})
 }
 
@@ -247,7 +252,10 @@ function getNewBiddings(){
 				selectType : $("#zbSeatchT [name='selectType']").val(),
 				minprice : $("#zbSeatchT [name='minprice']").val(),
 				maxprice : $("#zbSeatchT [name='maxprice']").val(),
-				industry : $("#zbSeatchT [name='industry']").val(),
+        industry : $("#zbSeatchT [name='industry']").val(),
+        buyerclass: $("#zbSeatchT #buyerInput").val(),
+        buyertel: $('.custom-input[name="buyertel"]').attr('data-value') ? $('.custom-input[name="buyertel"]').attr('data-value') : '',
+        winnertel: $('.custom-input[name="winnertel"]').attr('data-value') ? $('.custom-input[name="winnertel"]').attr('data-value') : ''
       };
       console.log(param, '1111')
 	$.post("/front/pcAjaxReq",param,function(r){
@@ -276,7 +284,8 @@ function getNewBiddings(){
 			$(".pagination").hide();
 			$(".working").hide();
 			$(".hasNoData").show();
-		}
+    }
+    getBidIsColl()
 	})
 }
 //
@@ -345,13 +354,18 @@ function appendDatas(datas,flag,isNew,onlyUpdateTable){
 			//}else{
 				listHtml +='<div class="liLuceneList" style="border-bottom: 1px solid #EBEBEB;">'
       //}
-      listHtml += '<input class="custom-checkbox" type="checkbox" dataid="'+datas[i]._id+'" />'
+      // 标题搜索 选择框
+      if (selectType == "title") {
+        listHtml += '<input class="custom-checkbox title-text-checkbox" name="bid-list" type="checkbox" dataid="'+datas[i]._id+'" />'
+      }
 			listHtml +='<div class="luce-left"><em>'+index+'.</em>'
 						+'<div class="left-title">'
 						+'<a onclick="noIn(this)" dataid="'+datas[i]._id+'" dataindustry="'+datas[i].industry+'" target="_blank"> '+title+'</a>'
 						+'</div>'
 			if(flag&&selectType == "all"&&detail!=""){
-				listHtml += '<div class="left-content">'
+        // 全文搜索选择框
+        listHtml += '<div class="left-content">'
+            + '<input class="custom-checkbox all-text-checkbox" name="bid-list" type="checkbox" dataid="'+datas[i]._id+'" />'
 						+'<a href="javascript:volid(0);">'+detail+'...</a>'
 						+'</div>'
 			}
@@ -388,9 +402,7 @@ function appendDatas(datas,flag,isNew,onlyUpdateTable){
 				}
       }
       // 是否收藏
-      if (true) {
-        listHtml += '<i class="icon-collect" dataid="'+datas[i]._id+'"></i>'
-      }
+      listHtml += '<i class="icon-collect" dataid="'+datas[i]._id+'"></i>'
 			listHtml += '</div></li>';
 		}
 
@@ -650,7 +662,10 @@ function getVIPData(clickpaging){
 				minprice : $("#zbSeatchT [name='minprice']").val(),
 				maxprice : $("#zbSeatchT [name='maxprice']").val(),
 				industry : $("#zbSeatchT [name='industry']").val(),
-				tabularflag : tabularflag,
+        tabularflag : tabularflag,
+        buyerclass: $("#zbSeatchT #buyerInput").val(),
+        buyertel: $('.custom-input[name="buyertel"]').attr('data-value'),
+        winnertel: $('.custom-input[name="winnertel"]').attr('data-value')
       };
 	$.ajax({
        type:'post',
@@ -672,13 +687,16 @@ function getVIPData(clickpaging){
 				$(".working").hide();
 				$(".hasNoData").show();
 			}
-			tabflag = true;
+      tabflag = true;
+      getBidIsColl()
 		}
 	})
 	return tabflag
 }
 ///
 function beforeSubmit(n){
+  // 重置全选按钮
+  $('.custom-checkbox.check-all').prop('checked', false)
 	$(".hasNoData").hide();
 	$(".working").show();
 	//$(".tabContainer-2 .lucene ul").html("");
@@ -784,7 +802,29 @@ function beforeSubmit(n){
 		}
 		//搜索关键词
 		var searchname = $("#zbSeatchT input[name='keywords']").val();
-		//$("#zbSeatchT input[name='searchvalue']").val($.trim(searchname));
+    //$("#zbSeatchT input[name='searchvalue']").val($.trim(searchname));
+    // 采购单位类型
+    var buyerTypeArr = ""
+    var buyerText = ""
+    $(".buyclass .active").each(function(){
+      if ($(this).hasClass('buyclass-all')) {
+        return true
+      } else if ($(this).hasClass('buy-list')) {
+        if ($(this).attr("data-value")) {
+          buyerText = $(this).attr("data-value");
+          if(buyerTypeArr != ""){
+            buyerTypeArr += ",";
+          }
+          buyerTypeArr += buyerText;
+        }
+      }
+    })
+    console.log(buyerTypeArr, 'buyerTypeArr')
+    $("#buyerInput").val(buyerTypeArr);
+    console.log( 'buyerTypeArr',$("#buyerInput").val())
+    // 采购单位联系方式
+    // 中标企业联系方式
+
 
 		if($("#zbSeatchT [name='keywords']").val()==""&&$("#zbSeatchT [name='industry']").val()==""){//$("#zbSeatchT [name='area']").val()==""&&$("#zbSeatchT [name='publishtime']").val()==""&&$("#zbSeatchT [name='subtype']").val()==""&&$("#zbSeatchT [name='minprice']").val()==""&&$("#zbSeatchT [name='maxprice']").val()==""){
 			getNewBids(currentPage);
@@ -859,7 +899,10 @@ function searchOnsubmit(clickpaging){
 				minprice : $("#zbSeatchT [name='minprice']").val(),
 				maxprice : $("#zbSeatchT [name='maxprice']").val(),
 				industry : $("#zbSeatchT [name='industry']").val(),
-				tabularflag: "Y"
+        tabularflag: "Y",
+        buyerclass: $("#zbSeatchT #buyerInput").val(),
+        buyertel: $('.custom-input[name="buyertel"]').attr('data-value'),
+        winnertel: $('.custom-input[name="winnertel"]').attr('data-value')
 			};
 	$.post("/front/pcAjaxReq",param,function(r){
 		if(r.limitFlag){
@@ -872,7 +915,8 @@ function searchOnsubmit(clickpaging){
 			LimitClass.prevNoLimitFlag = true;
 			LimitClass.limitFlag = false;
 			pcAjaxReqCallBack(r);
-		}
+    }
+    getBidIsColl()
 	});
 }
 function pcAjaxReqCallBack(r){
@@ -949,3 +993,167 @@ function afterAjaxReq(r){
 		}
 	}
 }
+
+/* 
+  招标信息是否被收藏接口ajax 
+  bids: String, // 招标信息id(多个用,号拼接) 必填
+*/
+function getBidIsColl () {
+  collectClick()
+  var bids = ""
+  var dataId = ""
+  // 区分标题搜索和全文搜索收藏
+  var $dom = selectType == 'title' ? $('.title-text-checkbox[name="bid-list"]') : $('.all-text-checkbox[name="bid-list"]')
+  $dom.each(function() {
+    if ($(this).attr('dataid')) {
+      dataId = $(this).attr("dataid");
+      if(bids != ""){
+        bids += ",";
+      }
+      bids += dataId;
+    }
+  })
+  $.ajax({
+    type:'post',
+    url:'/publicapply/bidcoll/isColl?t=' + Date.now(),
+    data: {
+      bids: bids
+    },
+    dataType:'json',
+    success: function(r){
+      if (r.data) {
+        var data = r.data
+        data.forEach(function(item,index){
+          if (selectType == 'title') {
+            $('.icon-collect[dataid="' + item + '"]').addClass('checked').parents().siblings('.title-text-checkbox').prop("checked",true).attr('disabled', true)
+          } else {
+            $('.icon-collect[dataid="' + item + '"]').addClass('checked').parents('.luce-right').siblings().find('.all-text-checkbox').prop("checked",true).attr('disabled', true)
+          }
+        })
+      }
+    }
+  })
+}
+
+// 收藏点击事件
+function collectClick() {
+  // 单个收藏点击事件
+  $('.icon-collect').on('click',function(e) {
+    e.stopPropagation()
+    var $that = $(this)
+    var checked = $(this).hasClass('checked')
+    var checkedId =  $(this).attr('dataid')
+    var binfo = [{
+      bid: checkedId
+    }]
+    if (checked) {
+      // 单个取消收藏行为
+      collBidAction('R', binfo, function(res) {
+        if (res.data) {
+          if (selectType == 'title') {
+            // 标题搜索下相关样式
+            $that.removeClass('checked').parents().siblings('input[type="checkbox"]').prop("checked",false).removeAttr('disabled')
+          } else {
+            // 全文搜索下相关样式
+            $that.removeClass('checked').parents('.luce-right').siblings().find('input[type="checkbox"]').prop("checked",false).removeAttr('disabled')
+          }
+          toastFn('已取消收藏')
+        } else {
+          toastFn(res.error_msg)
+        }
+      })
+    } else {
+      // 单个收藏行为
+      sessionStorage.setItem('$save-tags-binfo', JSON.stringify(binfo)) // 将本次收藏的标讯id缓存起来 用于绑定标签时使用
+      collBidAction('C', binfo, function(res) {
+        if (res.data) {
+          if (selectType == 'title') {
+            $that.addClass('checked').parents().siblings('input[type="checkbox"]').prop("checked",true).attr('disabled', true)
+          } else {
+            $that.addClass('checked').parents('.luce-right').siblings().find('input[type="checkbox"]').prop("checked",true).attr('disabled', true)
+          }
+          var top = (parseInt($that.position().top) + 60 ) + 'px';
+          console.log(top, 'top')
+          $('.tags-box').show().css('top', top)
+          getUserTags()
+        } else {
+          // 是超级订阅用户或者其他付费用户
+          if (vipState || res.error_msg.indexOf('付费') > -1) {
+            toastFn('您的标讯收藏上限为5000条,请联系客服人员。')
+          } else {
+            updateVipDialog()
+          }
+        }
+      })
+    }
+  })
+  // 批量收藏
+  $('#bid-collect').off('click').bind('click',function(e){
+    e.stopPropagation()
+    var top = (parseInt($(this).position().top) + 60 ) + 'px';
+    var len = $('.custom-checkbox:not(".check-all"):checked:not(:disabled)').length;
+    var checkedId = []
+    $('.custom-checkbox:not(".check-all"):checked:not(:disabled)').each(function(){
+      if ($(this).attr('dataid')) {
+        checkedId.push({
+          bid: $(this).attr('dataid')
+        })
+      }
+    })
+    var $that = $(this)
+    // 判断有无选中的标讯信息
+    if (len > 0) {
+      sessionStorage.setItem('$save-tags-binfo', JSON.stringify(checkedId)) // 将本次收藏的标讯id缓存起来 用于绑定标签时使用
+      collBidAction('C', checkedId, function(res) {
+        if (res.data) {
+          if (selectType == 'title') {
+            $('.custom-checkbox:not(".check-all"):checked').attr('disabled', true).siblings().children('.icon-collect').addClass('checked')
+          } else {
+            $('.custom-checkbox:not(".check-all"):checked').attr('disabled', true).parents('.liLuceneList').find('.icon-collect').addClass('checked')
+          }
+          $('.tags-box').show().css('top', top)
+          getUserTags()
+        } else {
+          // 是超级订阅用户或者其他付费用户
+          if (vipState || res.error_msg.indexOf('付费') > -1) {
+            toastFn('您的标讯收藏上限为5000条,请联系客服人员。')
+          } else {
+            updateVipDialog()
+          }
+        }
+      })
+    } else {
+      toastFn('尚未选择标讯,请选择')
+    }
+  }) 
+}
+
+// 开通提醒弹框
+function  openVipDialog() {
+  $('.auth-dialog').show()
+  $('.auth-dialog .default-btn').click(function () { 
+    $('.auth-dialog').hide(300)
+  })
+}
+// 升级提醒弹框
+function  updateVipDialog() {
+  $('.update-dialog').show()
+  $('.update-dialog .default-btn').click(function () { 
+    $('.update-dialog').hide(300)
+  })
+}
+// 开通vip提醒
+function openVipDialog() {
+  $('.auth-dialog').show()
+  $('.dialog-footer .default-btn').click(function () { 
+    $('.auth-dialog').hide()
+  })
+}
+
+// toast上限提示
+function toastFn (text) {
+	$(".custom-toast").fadeIn().find("span").html(text);
+	setTimeout(function(){
+		$(".custom-toast").fadeOut();
+	},1000)
+}

+ 5 - 1
src/web/staticres/me/css/mine-icons.css

@@ -133,4 +133,8 @@
 /* /jyapp/me/images/my_coupon.png */
 .icon-coupon {
   background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAJZSURBVHgB7ZhdbtNAEMdnNi1J34KEGvfNEp+PzQ3ICYALgCpxgPQELSeI8o4UwQVIT9DeoHlELUh+w8kLfiN2qYddFap41vVatF677f6e4s0kM3/P7HjWAA6Hw+G4z2Deoue98AnOJ0S4jQhdqBuCKWKyG4ZBwL/SBKjgU0qPGxH4KggRUtLnIgS3k8GPGhe8gqBLsD7hy5oAGfxraCqI23xpzfSbeXiCUCM97xldXpBeGQJuOU5A3Rj3wE3z7u17Wr3+9PnjtfaYMQO9reejbte33laVz97W05HJzlxCRMP2xvqhTRHKl/IJhEOTbbk9IEeK9kZ7Dywhg99TPsvYagJU36f0/I38GGS+kJnwvCcvoWLUKJNz5wOEdBAvk4fcPjcDi8X3qTTuAxMhh7vKn9IppDzTgYolDL8dRVEQcfsrS0gZS9U7mUXEV1A1BJnSoRR28wL/R+EeWC5/z9iSDxUjZ7GMgMXiZFpkXyigSLktTN2vUMDm5uNszRPMoHIwWL3qdNYKu9GVApRyFK3Mg4TQggBMDzI+QUyKsqAJUMaPZLtsdx4cA6t5AckHqBgk4jXvq1i0ariMiSGNf7ZAHALfsETjvDPpTaPapVQxZsu+rIYvmbPBX8o9iZFmcXy2D5aIf53tU8n9VmYWGss/HNjsSMpXEieDnExoGAXM56fDOtqp8jn/cWoc5qyfB647/3PckbJu7t6ZWLavaPXNXF7vbRI5b+bIwrzznxAc8CVdALR2VBagYVxURqK1VU1AGH4NBIq+VDKFBnBxM+lIoP5m2uFwOByOP4x73mRKPn1RAAAAAElFTkSuQmCC);
-}
+}
+/* /me/image/shoucang.png */
+.icon-shoucang {
+    background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAUUSURBVHgB7VnLbttGFL0zI8UuGqDKss0izBeE8SMR5ACl/iDddWepCIq0BWL7C2x/QdQCBYy+LH9B3S8wg9SO/GZ27Sp0EQTdWYsmTW1zbu9Qj47oIUXazKKADiCYnAfnnHvvzNwZA4wwwggjxMF2nJL6wTsEg3cAe6rsCCEW6dHpFvksYPW9vV9dyBm5C7DLZUugeGGqIxHVvEVwyBkC+UZcHQpchJyRq4CJ6UqN7GwlNHGmpu45kCNyFcA4RC3cpJ+rF+TthdzmgLI+42xVLwtYcLMABQsRB8Iqz7mQmwdM1vdaLX+vFRJ19Yo8vZCLAFPsk/WXted6pEtucyEXAXHW772EzwhregPywirkMTZcAOHu+vq1BVC0BWcfU1FNr1exrwsI+5j3hyYG8rkE9ODquOe5bhsygg0l+tdbmwOzmeC3VBFZ0qJeSelBc397s26qmLwz06S+s7E9EdpU7xEpTwbySAnz9louXETAZHlmFiQ0hpAdHJ8ISB7cjlq/h9ALUhxm+SaBwo8v7O88XTdViriBOHKXBhqHlAjJI1a9nWe/xbX58+XL9kfXrd+RyTIDllZECRh+ev3DG09evfrDj1YWTD0oVheHkWXKMuRuWuOPyPW+fP/KepoYVpak0HTFm8BBCGz6zq1wBWMUnkljClSh50IaAUTIjgSXiyB/YVjwi/zUa22bQyQtukLXu78+pqcrNgpekkjCkBYHxu5r1Y7pW2YBDKKWtCTDdW/7qQ854POvHs1KyRpkozbjuPTdt9+ES+zu7pan/lII+wLYXKSbb/qWcR9AhmuRIrUEbqi5AZfEgy8fLRL5Jj2WUBmGhOj1neVWZbTMGsIphFHAQWurGd14IAcRD76Ye0xMlvQyEtH3dhx5xSXkZEDiPhCzbvu0UVX1pTIuJHqozc+XxD+4SvX3zxFAVv9+pdFMIr+/s1mDGCSmEmHHFJ5AGVq1FxJNJahP/uG8VTzBjSh5ZfmzM3b7MuQVUqUSwzxBoXGsBOiVnGPtJOBPigw3lLBBXtQXWbW50vAvQz4cB1IgwRNhQiaRLUT7KE8UGB5Gyau9o0devQrJH1+UfOdzGWDyRPBe8Zpa1z97OF/jLDnDJDHrwRirNxuNcOLatlMSY6fHcEHyCpmz0Ym7lReUBli9dynQOtzaOlLPSSIQ2dc/rjTm9TJDhtqmRPAaZEDm84BOXqFHXuEnmpAUTuczUWTLUfIh3o5HN8zMF2GZBNiVymC+guBF2/REqImqVhq1TP6w0lgyfY8OAG0E9PUydnLyAWRAIUtjcSYo6ZLaaGBM3pQI6NxIDIXK/UGb6OwUqmn7KmTygMoeB9/xeVL7NOFAXjoaKGCRVWsIMnmAMZX6Dgzvm9r170b/PnUm786oIhclrh3sGtIBSR7g+hjsBmRAJgE0GS193eKBGJgDhkvdHhy6M3Km7szMnclgQT8myiJ4ItDHSD4XRJFNQGRTOrta6KS/8cQHgHRooXYb5BU3CILlUMibKz6Mnf7XKGMIpd4HTGs2kfgkDfEEhEIEFz/r52R9bxmGy9wLlZQ1IZ68S/FcVVcshjSkByf8RrZD/gCyphLHKQZTxJe7V4p9dG8klhKvVaCT6B1sb96ElMi2jApYTqgOLU6pQDVKXkFlrSrHCT1iOJz3wTBpjPPNISMmyhWVmS5qKYXR4sMwVb7n0I1Gf/6ENx2C1/efme9/ckde/8BT3yjncNYeYYQR/qf4F3XmaM8zQDSnAAAAAElFTkSuQmCC);
+}

BIN
src/web/staticres/me/images/shoucang.png


+ 65 - 1
src/web/templates/pc/biddetail_rec.html

@@ -290,8 +290,72 @@ function isWechat() {
         <img class="icon-title-img" src='{{Msg "seo" "cdn"}}/images/collect.png' />
         标讯收藏
       </span>
+      <span class="com-collect" id="bidCollected" style="display: none;">
+        <img class="icon-title-img" src='{{Msg "seo" "cdn"}}/images/collected.png' />
+        标讯收藏
+      </span>
       <script>
-        
+        // 查询是否已收藏
+        $.ajax({
+          type:'post',
+          url:'/publicapply/bidcoll/isColl?t=' + Date.now(),
+          data: {
+            bids: {{.T.obj._id}}
+          },
+          dataType:'json',
+          success: function(r){
+            if (r.data) {
+              r.data.forEach(function(item,index) {
+                if(item == {{.T.obj._id}}) {
+                  $('#bidCollected').show()
+                  $('#bidCollect').hide()
+                } else {
+                  $('#bidCollected').hide()
+                  $('#bidCollect').show()
+                }
+              })
+            }
+          }
+        })
+        // 收藏事件
+        function collBidAction (baction, callback) {
+          var params = {
+            baction: baction,
+            binfo: [{
+              bid: {{.T.obj._id}}
+            }]
+          }
+          $.ajax({
+            type:'post',
+            contentType: "application/json",
+            url:'/publicapply/bidcoll/action',
+            data: JSON.stringify(params),
+            dataType: 'json',
+            success: function(r){
+              if (r) {
+                callback && callback(r)
+              }
+            }
+          })
+        }
+        // 收藏事件
+        $('#bidCollect').click(function() {
+          collBidAction('C',function(r) {
+            if (r.data) {
+              $('#bidCollected').show()
+              $('#bidCollect').hide()
+            }
+          })
+        })
+        // 取消收藏事件
+        $('#bidCollected').click(function() {
+          collBidAction('R',function(r) {
+            if (r.data) {
+              $('#bidCollected').hide()
+              $('#bidCollect').show()
+            }
+          })
+        })
       </script>
 				{{if .T.isMember}}
 					<!--大会员用户,可直接在pc端关注项目 -->

+ 151 - 163
src/web/templates/pc/supsearch.html

@@ -238,11 +238,8 @@
 	margin-bottom:40px !important;
 }
 </style>
+<script src='{{Msg "seo" "cdn"}}/common-module/selector/js/buyerClass.js?v={{Msg "seo" "version"}}'></script>
 <script>
-var buyclassArr = {
-  "党政机关事业单位": ['人大', '政协', '党委办','组织', '宣传', '统战', '纪委', '政府办', '发改委','财政','教育','科技','工信','民政', '民宗', '人社', '公安', '检察院','法院', '司法', '应急管理', '军队', '自然资源', '生态环境','住建', '市政',  '城管', '交通', '水利','农业','文旅', '卫健委','医疗','学校','档案', '体育', '政务中心', '机关事务', '国资委','海关','税务', '市场监管', '商务','人行', '银保监', '证监', '审计', '出版广电','统计', '公共资源交易', '社会团体','气象'],
-  "企业": ['传媒','采矿业', '电信行业', '金融业', '建筑业', '能源化工', '农林牧渔','批发零售', '信息技术', '运输物流', '制造业', '住宿餐饮']  
-}
 var areas = {{.T.area}}!=null?{{.T.area}}:"";
 var selectPublishtime = {{.T.publishtime}}!=null?{{.T.publishtime}}:"";
 var selectTimeslot = {{.T.timeslot}}!=null?{{.T.timeslot}}:"";
@@ -552,10 +549,10 @@ $(function(){
     var buyhtml = '';
     for(var i in buyclassArr){
       buyhtml+='<div class="clearfix">'
-      buyhtml+= '<span class="buy-list buy-type">'+ i +'</span>'
+      buyhtml+= '<span class="buy-list buy-list-parent">'+ i +'</span>'
       var childlist = buyclassArr[i]
       childlist.forEach(function(v,i) {
-        buyhtml+='<span class="buy-list">'+ v +'</span>'
+        buyhtml+='<span class="buy-list" data-value="'+ v + '">'+ v +'</span>'
       });
       buyhtml+="</div>"
 		}
@@ -680,9 +677,9 @@ $(function(){
 					<input type="hidden" name="maxprice" value="{{.T.maxprice}}">
 					<input type="hidden" name="industry" value="{{.T.industry}}">
           <input type="hidden" name="selectType" value="all">
-          <input type="hidden" name="buyerclass " value="">
-          <input type="hidden" name="buyertel" value="">
-          <input type="hidden" name="winnertel" value="">
+          <input type="hidden" id="buyerInput" name="buyerclass ">
+          <!-- <input type="hidden" name="buyertel" value="">
+          <input type="hidden" name="winnertel" value=""> -->
 				</form>
 				<!--筛选-->
 				<div id="screenBtn" class="screen down">
@@ -712,7 +709,7 @@ $(function(){
           <!-- <i></i> -->
           <font>招标搜索</font>
 				</a>
-				<a id="entsearch" href="javascript:" left="98" datahref="/jylab/bidsearchforent/index.html">
+				<a id="entsearch" href="javascript:" left="98" datahref="/jylab/entSearch/index.html">
           <!-- <i></i> -->
           企业搜索
 				</a>
@@ -1088,7 +1085,7 @@ $(function(){
         </div>
         <div class="dialog-content">开通超级订阅,搜索招标采购项目更精准,300万+投标人都在用!</div>
         <div class="dialog-footer clearfix">
-          <a href="#" class="dialog-btn confirm-btn">去开通</a>
+          <a href="/front/subscribe.html" class="dialog-btn confirm-btn">去开通</a>
           <a href="javascript:;" class="dialog-btn default-btn">取消</a>
         </div>
       </div>
@@ -1146,8 +1143,8 @@ $(function(){
 {{include "/common/baiducc.html"}}
 <script type="text/javascript">
 $(function(){
-  var vipState = {{.T.portraitpower}};
-    $(".shade_table .more").on('click', toPaydataExport)
+  var vipState = {{.T.showVipScreen}}; //是否是超级订阅
+  $(".shade_table .more").on('click', toPaydataExport)
 	$(".control-tabBtn>a").hover(function(){
 		$(".control-tabBtn>a").removeClass("on");
 		$(this).addClass("on");
@@ -1199,28 +1196,31 @@ $(function(){
   /*
     dev4.5新增需求(高级筛选、标讯收藏、自定义标签)
   */
+  // 重置全选按钮(从订单页面返回时checkbox会记录选中状态)
+  $('.custom-checkbox.check-all').prop('checked', false)
   // 采购单位行业选择
   buyClassFn() 
   function buyClassFn() {
     // 采购单位类型全部点击事件
     $('.buyclass-all').click(function() {
-      // if (!vipState) {
-      //   openVipDialog()
-      //   return
-      // }
+      if (!vipState) {
+        openVipDialog()
+        return
+      }
       $(this).addClass('active').siblings('.buyclass-content').find('.buy-list').removeClass('active')
+      beforeSubmit();
     })
     // 采购单位类型子分类点击事件
-    $('.buyclass-content .buy-list:not(.buy-type)').click(function() {
-      // if (!vipState) {
-      //   openVipDialog()
-      //   return
-      // }
+    $('.buyclass-content .buy-list:not(.buy-list-parent)').click(function() {
+      if (!vipState) {
+        openVipDialog()
+        return
+      }
       $(this).toggleClass('active').parents('.buyclass').children('.buyclass-all').removeClass('active')
-      $(this).siblings('.buy-type').removeClass('active')
-      var activeLen = $('.buyclass-content .buy-list:not(.buy-type)').filter(".active").length;
-      var listLen = $('.buyclass-content .buy-list:not(.buy-type)').length;
-      var curListLen = $(this).parent('.clearfix').find('.buy-list:not(.buy-type)').length;
+      $(this).siblings('.buy-list-parent').removeClass('active')
+      var activeLen = $('.buyclass-content .buy-list:not(.buy-list-parent)').filter(".active").length;
+      var listLen = $('.buyclass-content .buy-list:not(.buy-list-parent)').length;
+      var curListLen = $(this).parent('.clearfix').find('.buy-list:not(.buy-list-parent)').length;
       var curActiveLen = $(this).parent('.clearfix').find(".active").length;
       console.log(curListLen,curActiveLen)
       console.log(listLen, activeLen)
@@ -1228,22 +1228,24 @@ $(function(){
         $('.buyclass-content .buy-list').removeClass('active')
         $('.buyclass-all').addClass('active')
       } else if (curListLen === curActiveLen) {
-        $(this).siblings('.buy-type').addClass('active')
+        $(this).siblings('.buy-list-parent').addClass('active')
       }
+      beforeSubmit();
     })
     // 采购单位类型大分类点击事件
-    $('.buyclass-content .buy-list.buy-type').click(function() {
+    $('.buyclass-content .buy-list.buy-list-parent').click(function() {
       $(this).toggleClass('active').parents('.buyclass').children('.buyclass-all').removeClass('active')
       if ($(this).hasClass('active')) {
         $(this).siblings('.buy-list').addClass('active')
       }
-      var activeLen = $('.buyclass-content .buy-type').filter(".active").length;
-      var listLen = $('.buyclass-content .buy-type').length;
+      var activeLen = $('.buyclass-content .buy-list-parent').filter(".active").length;
+      var listLen = $('.buyclass-content .buy-list-parent').length;
       console.log(activeLen,listLen)
       if (activeLen === listLen || activeLen === 0) {
         $('.buyclass-content .buy-list').removeClass('active')
         $('.buyclass-all').addClass('active')
       }
+      beforeSubmit();
     })
   }
   // 展开收起高级筛选
@@ -1268,13 +1270,47 @@ $(function(){
       var val = $(this).attr('data-value')
       var text = $(this).text()
       $(this).parent().siblings().children('.custom-input').val(text).attr('data-value', val)
+      beforeSubmit();
     })
   })
   // 点击其他区域 隐藏其他筛选条件下拉框
   $(document).click(function() {
     $('.custom-select').css("border-color", '#e0e0e0').children('.icon-arrow').removeClass('up')
     $('.custom-select').siblings().hide()
-    $('.tags-box').hide()
+    console.log('标签弹框是否隐藏',$('.tags-box').is(':hidden'))
+    // 自定义标签弹框消失时执行保存标签动作
+    if (!$('.tags-box').is(':hidden')){
+      var lids = ""
+      var lname = ""
+      $('.tags-item.tags-active').each(function() {
+        if ($(this).attr('data-id')){
+          if(lids != ""){
+            lids += ",";
+          }
+          if(lname != "") {
+            lname+= ",";
+          }
+          lids += $(this).attr('data-id');
+          lname += $(this).text()
+        }
+      })
+      var params = {
+        lids: lids,
+        laction: 'S',
+        binfo: JSON.parse(sessionStorage.getItem('$save-tags-binfo'))
+      } 
+      console.log(params)
+      $('.tags-box').hide(function() {
+        // 执行保存绑定标签操作
+        if (params.lids !== '') {
+          saveChooseTags(params)
+        }
+        $('.tag-labels').empty()
+        $('.clear-input').val('')
+        $('.tags-list').find('.tags-item').removeClass('tags-active')
+        
+      })
+    }
   })
   // 全选
   $('.custom-checkbox.check-all').on('change', function() {
@@ -1286,66 +1322,8 @@ $(function(){
       $('.custom-checkbox:not(:disabled)').prop("checked",false)
     }
   })
-  // 单个收藏
-  $('.icon-collect').click(function(e) {
-    e.stopPropagation()
-    var checked = $(this).hasClass('checked')
-    var len = 1
-    if (checked) {
-      $(this).removeClass('checked').parents().siblings('input[type="checkbox"]').prop("checked",false).removeAttr('disabled')
-    } else {
-      // 如果不是会员 收藏上限为100条
-      if (!vipState) {
-        if (len > 100) {
-          updateVipDialog()
-        } else {
-          $(this).addClass('checked').parents().siblings('input[type="checkbox"]').prop("checked",true).attr('disabled', true)
-          var top = (parseInt($(this).position().top) + 60 ) + 'px';
-          console.log(top, 'top')
-          $('.tags-box').show().css('top', top)
-        }
-      } else {
-        // 如果是会员 判断收藏上限有没有达到5000
-        if (len > 5000) {
-          toastFn('您的标讯收藏上限为5000条,请联系客服人员。')
-        } else {
-          $(this).addClass('checked').parents().siblings('input[type="checkbox"]').prop("checked",true).attr('disabled', true)
-          var top = (parseInt($(this).position().top) + 60 ) + 'px';
-          console.log(top, 'top')
-          $('.tags-box').show().css('top', top)
-        }
-      }
-    }
-  })
-  // 批量收藏
-  $('#bid-collect').off('click').bind('click',function(e){
-    e.stopPropagation()
-    var top = (parseInt($(this).position().top) + 60 ) + 'px';
-    var len = $('.custom-checkbox:not(".check-all"):checked:not(:disabled)').length;
-    console.log(len)
-    // 判断有无选中的标讯信息
-    if (len > 0) {
-      $('.custom-checkbox:not(".check-all"):checked').attr('disabled', true).siblings().children('.icon-collect').addClass('checked')
-      $('.tags-box').show().css('top', top)
-    } else {
-      toastFn('尚未选择标讯,请选择')
-    }
-  })
+  
   // 自定义标签
-  // 渲染标签列表
-  var tagsArr = [{
-    "lid": "RQ==",
-    "lanme": "测试"
-  },
-  {
-    "lid": "RA==",
-    "lanme": "医疗"
-  },
-  {
-    "lid": "RE==",
-    "lanme": "政府"
-  }]
-  renderTagsList(tagsArr)
   // 标签输入框事件
   $('.tags-box').click(function(e) {
     e.stopPropagation()
@@ -1362,13 +1340,7 @@ $(function(){
     if (event.keyCode == 13) {
       if($(this).val().length >= 2 && $(this).val().length < 6) {
         // ajax提交自定义标签
-        inputTagList()
-        tagsArr.push({
-          lid: '',
-          lanme: $(this).val()
-        })
-        renderTagsList(tagsArr)
-        $(this).val('')
+        addTagsAjax($(this).val())
       }
     }
   })
@@ -1378,38 +1350,70 @@ $(function(){
       $('.tag-placeholder').show()
     }
   })
-  
+
+  // 查询标讯是否收藏
+  getBidIsColl()
+
 })
-var activeTags = []
-function deleteInputTag(index) {
+
+var activeTags = []; //选中的自定义标签 作为全局变量使用
+// 解绑自定义标签
+function deleteInputTag(item) {
+  var index = $(item).parent().attr('data-index')
+  var id = $(item).parent().attr('data-id')
   activeTags.splice(index, 1)
-  // inputTagList()
-  $('.tag-label').eq(index).remove()
+  inputTagList()
+  $('.tags-item[data-id="' + id + '"]').removeClass('tags-active')
 }
+
 function inputTagList () {
   var ht = '';
-  activeTags.push({
-    lid: '',
-    lanme: $('.tag-input .clear-input').val()
-  })
+  $('.tag-labels').html(ht)
   activeTags.forEach(function(v,i) {
-    ht+='<span class="tag-label" data-id=' + v.lid + '>'+ v.lanme + '<i class="tag-close" onclick="deleteInputTag(' + i + ')"></i>' + '</span>'
+    ht+='<span class="tag-label" data-index=' + i + ' data-id="' + v.lid + '">'
+    ht+='<em>'+ v.lname + '</em>'
+    ht+='<i class="tag-close" onclick="deleteInputTag(this)"></i>'
+    ht+='</span>'
   });
   $('.tag-labels').html(ht)
+  if ($('.tag-labels').children('.tag-label').length > 0) {
+    $('.tag-placeholder').hide()
+  }
 }
 // 渲染标签列表数据
 function renderTagsList (data) {
   if (data && data.length > 0) {
     var ht = '';
     data.forEach(function(v,i) {
-      ht+='<span class="tags-item" data-id=' + v.lid + '>'+ v.lanme +'</span>'
+      ht+='<span class="tags-item" data-count=' + v.count + ' data-id=' + v.lid + '>'+ v.lanme +'</span>'
     });
     $(".tags-list").html(ht)
+    activeTags.forEach(function(s,j){
+      $('.tags-list .tags-item[data-id="' + s.lid +  '"]').addClass('tags-active')
+    })
     $('.tags-item').click(function(e) {
       e.stopPropagation()
+      var id = $(this).attr('data-id');
+      var name = $(this).text()
       $(this).toggleClass('tags-active')
+      if ($(this).hasClass('tags-active')) {
+        activeTags.push({
+          lid: id,
+          lname: name
+        })
+        inputTagList ()
+      } else {
+        var newArr = activeTags.filter(function(item) {
+          return item.lid != id
+        })
+        activeTags = newArr
+        console.log(activeTags,newArr, 'quxiao')
+        inputTagList ()
+      }
+      
     })
   }
+  inputTagList()
 }
 // 获取用户自定义标签
 function getUserTags () {
@@ -1431,93 +1435,77 @@ function getUserTags () {
     laction: String  用户行为:S添加或绑定标签;D删除标签  非必传
     binfo: Array 招标信息数组(已收藏的招标信息) 非必传
     bid: String 招标信息加密后id  必传
-    buyerclass: String 采购单位类型  非必传
-    buyerinfo: Boolean 有无采购单位联系方式  非必传
-    winnerinfo: Boolean 有无中标单位联系方式  非必传
   }
-  1:lids为空;lname不为空;laction=”S”;binfo数组为空->新增标签
-  2:lids为空;lname不为空;laction=”S”;binfo数组不为空->新增标签并且绑定收藏信息
-  3:lids不为空;laction=”S”;binfo数组不为空->收藏信息绑定标签
+  1:lids为空;lname不为空;laction=”S”;binfo数组不为空->新增标签并且绑定收藏信息
+  2:lids不为空;laction=”S”;binfo数组不为空->收藏信息绑定标签
   3:lids不为空;laction=”D”;->删除标签 并解绑收藏的信息
 */
-function editTags(params) {
+function saveChooseTags(params) {
   $.ajax({
     type:'post',
     url:'/publicapply/bidcoll/label',
-    data: params,
+    contentType: "application/json",
+    data: JSON.stringify(params),
     dataType:'json',
     success: function(r){
       if (r.data) {
-        toastFn("操作成功")
+        toastFn("标签绑定成功")
       }
     }
   })
 }
-// 自定义标签输入框自适应高度
-function autoTextarea(container) {
-  var textarea = container.getElementsByTagName('textarea')[0] ;
-  var span = container.getElementsByTagName('span')[0] ;
-  textarea.addEventListener('input', function() {
-    span.textContent = textarea.value;
-  }, false);
-  span.textContent = textarea.value;
+// 新增标签
+function addTagsAjax (name) {
+  $.ajax({
+    type:'post',
+    url:'/publicapply/bidcoll/addLabel',
+    data: {
+      name: name
+    },
+    dataType:'json',
+    success: function(r){
+      if (r.data) {
+        $('.tag-input .clear-input').val('')
+        // 添加标签成功后 绑定标签
+        activeTags.push({
+          lid: r.data,
+          lname: name
+        })
+        getUserTags()
+      } else {
+        toastFn(r.error_msg)
+      }
+    }
+  })
 }
-// var tagsVal = document.getElementById('tags-textarea');
-// autoTextarea(tagsVal);
 /* 
   收藏或取消收藏ajax 
   params: {
     baction: String, //用户行为:R:移除收藏;C:收藏(默认)非必填
     binfo: Array, // 招标信息数组 必填
     bid: String, // 招标信息加密后id 必填
-    buyerclass: String, // 采购单位类型 必填
-    buyerinfo: Boolean, // 有无采购单位联系方式 必填
-    winnerinfo: Boolean // 有无中标单位联系方式 必填
   }
   参数示例 (baction=R binfo数组只需要bid即可)
 */
-function collectBidInfo (params) {
+function collBidAction (baction, binfo, callback) {
+  var params = {
+    baction: baction,
+    binfo: binfo
+  }
   $.ajax({
     type:'post',
+    contentType: "application/json",
     url:'/publicapply/bidcoll/action',
-    data: params,
-    dataType:'json',
+    data: JSON.stringify(params),
+    dataType: 'json',
     success: function(r){
-      if (r.data) {
-        toastFn("操作成功")
+      if (r) {
+        callback && callback(r)
       }
     }
   })
 }
-// 开通提醒弹框
-function  openVipDialog() {
-  $('.auth-dialog').show()
-  $('.auth-dialog .default-btn').click(function () { 
-    $('.auth-dialog').hide(300)
-  })
-}
-// 升级提醒弹框
-function  updateVipDialog() {
-  $('.update-dialog').show()
-  $('.update-dialog .default-btn').click(function () { 
-    $('.update-dialog').hide(300)
-  })
-}
-// 开通vip提醒
-function openVipDialog() {
-  $('.auth-dialog').show()
-  $('.dialog-footer .default-btn').click(function () { 
-    $('.auth-dialog').hide()
-  })
-}
 
-// toast上限提示
-function toastFn (text) {
-	$(".custom-toast").fadeIn().find("span").html(text);
-	setTimeout(function(){
-		$(".custom-toast").fadeOut();
-	},2000)
-}
 //
 function NullSuperSearch(){
 	$("#newsclass li:nth-child(2) a").click();

+ 10 - 0
src/web/templates/weixin/my.html

@@ -124,6 +124,16 @@
                             <span class="j-icon base-icon icon-arrow-right"></span>
                         </div>
                     </div>
+                    <div class="menu-list-item clickable" id="bx-collection" data-href="/weixin/frontPage/collection/sess/index">
+                        <div class="m-l-i-left">
+                            <span class="j-icon base-icon icon-shoucang"></span>
+                            <span class="m-l-i-label">标讯收藏</span>
+                        </div>
+                        <div class="m-l-i-right">
+                            <i class="dot-red"></i>
+                            <span class="j-icon base-icon icon-arrow-right"></span>
+                        </div>
+                    </div>
                     <div class="menu-list-item clickable" id="ent-follow" data-href="/jylab/followent/entList">
                         <div class="m-l-i-left">
                             <span class="j-icon base-icon icon-company"></span>