Przeglądaj źródła

Merge remote-tracking branch 'origin/dev4.5' into dev4.5

wangkaiyue 4 lat temu
rodzic
commit
2a0f377bb5

+ 58 - 1
src/jfw/modules/app/src/web/staticres/jyapp/css/index.css

@@ -1,6 +1,33 @@
 .collection{
   width: 100%;
 }
+
+/* 时间选择弹窗s */
+.headertitle{
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  padding: .44rem .32rem .24rem;
+  width: 100%;
+  font-size: .4rem;
+  font-weight: 500;
+  color: #171826;
+}
+.headertitle .title_close{
+  display: flex;
+  width: .4rem;
+  height: .4rem;
+  background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAMAAAAM7l6QAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAgVBMVEUAAAChoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaEAAADUxRFJAAAAKXRSTlMABUuRxuj4EH7q6VXnA5Srk1b+wcP8f2UBm6BgxL+SxfkGgFhX60zH+uqurTcAAAABYktHRACIBR1IAAAACXBIWXMAAAsSAAALEgHS3X78AAAA00lEQVQoz4WT1xaCMAxAwyh7uVAQAVFG/v8HLSAjiO19aU7vOZBmAEwoqqYzw2C6piqwxbRsnHEsk1rXQ4LnrqQf4A+BP9sQdwgnH+Eu0fe/+IfDkPOY1fG03J8vw8H6/OPRXm/JZFP/PvqYV2N8b+bD5FMePobIVkDF5TIhAUeFHKlfW8whQ+KJxQJWpe4VsWhDicQTi6VMSz5eiFMTPiySlUVY1KewJVXfUCZsqGQcZMMkG0XJIHNejEr23ixRVS+yrjZL1K9gk7dO1zlt3iwr+AHFoWJRdvcdHQAAAABJRU5ErkJggg==) no-repeat;
+  background-size: contain;
+}
+.datepopup .van-picker-column__item.van-picker-column__item--selected{
+  font-size: .36rem;
+  color: #2ABED1;
+}
+.datepopup .van-picker-column__item{
+  float: none!important;
+}
+/* end */
 .collection .search-container{
   position: relative;
 }
@@ -10,6 +37,7 @@
   height: .88rem;
   box-shadow: none;
   border-bottom: 1.5px solid rgba(0,0,0,0.05);
+  z-index: 10;
 }
 .collection .van-dropdown-menu__item{
   flex: none;
@@ -182,6 +210,11 @@
   flex: none;
   height: 6rem;
 }
+.collection .dateTags .van-field__control{
+  font-size: .28rem;
+  color: #171826;
+  line-height: .4rem;
+}
 .collection .timeTag{
   display: flex;
   padding: .32rem 0;
@@ -223,6 +256,20 @@
   background: #f5f6f7;
   border-radius: .08rem;
 }
+.collection .timePicker.clickactive{
+  position: relative;
+ background: #E8FAFD;
+}
+.collection .timePicker.clickactive::after{
+  content: '';
+  position: absolute;
+  right: 0;
+  bottom: 0;
+  background: url(/jyapp/big-member/image/icon-check.png);
+  width: .28rem;
+  height: .28rem;
+  background-size: 100% 100%;
+ }
 .timePicker .line{
   width: 12px;
   height: 1px;
@@ -270,8 +317,14 @@
   color: #fff;
   background-color: #2cb7ca;
 }
+/* 地区 */
+.collection .area-list.van-index-bar{
+  height: 8.6rem;
+  overflow: auto;
+}
 /* 采购单位类型 */
 .collection .unitTab{
+  overflow: hidden;
   height: 7.5rem;
   flex: none;
 }
@@ -280,11 +333,14 @@
   overflow: auto;
 }
 .collection .unitType {
+  height: 100%;
+  /* overflow: auto; */
   flex: 1;
   display: flex;
 }
 .collection .unitType .van-tabs__wrap{
-  overflow: unset;
+  height: 100%;
+  overflow: auto;
 }
 .collection .unitType .van-tabs__content{
   flex: 1;
@@ -295,6 +351,7 @@
   display: flex;
   flex-direction: column;
   border: 0;
+  overflow: auto;
 }
 .unitType .van-tabs__wrap .van-tabs__nav.van-tabs__nav--card .van-tab{
   flex: none;

+ 8 - 3
src/jfw/modules/app/src/web/staticres/jyapp/css/subscribe.css

@@ -855,9 +855,12 @@ font-weight: bold;
 
 .filter_tab {
   position: relative;
-  padding: 12px 10px;
+  /* padding: 12px 0 0; */
   background: #fff;
-      border-bottom: 1px solid #E6E6E6;
+  border-bottom: 1px solid #E6E6E6;
+}
+.filter_tab .van-dropdown-menu__title{
+  padding: 0 8px 0 0;
 }
 
 /*.filter_tab:after {
@@ -1560,6 +1563,7 @@ body .loading_ p span {
 ._header {
     /*position: fixed;
     top: 1.3rem;*/
+    margin-top: 12px;
     width: 100%;
     z-index: 999;
 }
@@ -1573,11 +1577,13 @@ body .loading_ p span {
 }
 
 .app-content {
+  padding-bottom: .16rem;
     position: relative;
     display: none;
     justify-content: space-between;
     flex-direction: column;
     overflow: hidden;
+    background: #F5F6F7;
     /* height: 100%; */
 }
 
@@ -1598,7 +1604,6 @@ html, body {
   padding-left: 10px;
   padding-right: 10px;
   line-height: normal;
-  border-bottom: none;
 }
 .app-layout-header>ul{
   display: flex;

+ 21 - 10
src/jfw/modules/app/src/web/staticres/jyapp/js/historypush.js

@@ -11,16 +11,27 @@ var vm = new Vue({
   },
   data () {
     return {
-      value1: 0,
-      value2: 'a',
-      value3: '',
-      option1: [
-      ],
-      option2: [
-      ],
-      option3: [
-      ],
-      
+      // 时间参数
+      time:'',
+      // 地区参数
+      area: ''
+    }
+  },
+  methods: {
+    confirm: function(data){
+      console.log(data)
+      if(data.name === 'dateItem'){
+        this.$refs.dateItem.toggle()
+        this.time = data.data
+        initpage()
+      } else if(data.name === 'areaitem'){
+        this.$refs.areaItem.toggle()
+        this.area = data.data.join('、')
+      }
+    },
+    cancel: function(data){
+      console.log(data)
+      this.$refs.dateItem.toggle()
     }
   }
 })

+ 10 - 1
src/jfw/modules/app/src/web/staticres/jyapp/js/track/track.js

@@ -417,6 +417,10 @@ class JyTrackUtils {
         timeCount = timeStep.length - 1
       }
       const nextTime = timeStep[timeCount]
+      if (nextTime === -1) {
+        clearTimeout(timeTn)
+        return
+      }
       timeTn = setTimeout(timeTempFn, nextTime)
       timeCount++
       typeof cb === 'function' ? cb() : null
@@ -809,7 +813,7 @@ class JyTrackRecord {
       } else if (viewTime <= 5) {
         return nextTimeInterval = 30
       } else {
-        return nextTimeInterval = 120
+        return nextTimeInterval = -1
       }
     }
     // 发送
@@ -818,6 +822,11 @@ class JyTrackRecord {
       if (!this.canTimeCache(location.href + 'sendData' + type)) {
         return
       }
+      if (nextTimeInterval === -1) {
+        console.log('stop page time')
+        clearTimeout(sendPageTn)
+        return
+      }
       // 计数
       params.count++
       params.viewtime = Math.round(this.getDiffTime() / 1000)

Plik diff jest za duży
+ 0 - 0
src/jfw/modules/app/src/web/staticres/jyapp/js/track/track.umd.min.js


+ 6 - 168
src/jfw/modules/app/src/web/templates/frontRouter/collection/sess/index.html

@@ -8,11 +8,10 @@
 
     <!--S-当前页面的css资源-->
     <link rel="stylesheet" href=//cdn.jsdelivr.net/npm/reset-css@4.0.1/reset.min.css />
-    <link rel="stylesheet" href=//cdn.jsdelivr.net/npm/vant@2.8.2/lib/index.css />
-    <link rel="stylesheet" href=//cdn.jsdelivr.net/npm/vant@2.8.2/lib/icon/local.css />
+    <link rel="stylesheet" href=//cdn.jsdelivr.net/npm/vant@2.11.1/lib/index.css />
+    <link rel="stylesheet" href=//cdn.jsdelivr.net/npm/vant@2.11.1/lib/icon/local.css />
     <link rel="stylesheet" href='{{Cdns .Host "seo" "cdn"|SafeUrl}}/collection/css/index.css?v={{Msg "seo" "version"}}' />
 </head>
-
 <body>
   <div class="j-container">
     {{include "/big-member/header.html"}}
@@ -45,24 +44,7 @@
               </div>
             </van-dropdown-item>
             <van-dropdown-item v-model="params.value2" title="收藏日期" :options="params.option2">
-              <div class="j-container">
-                <div class="dateTags j-main">
-                  <div class="timeTag">
-                    <div class="area-card-item" :class="{active:index==colDate}" v-for="(item, index) in dateOption" :key="index" @click="selectFixedDate(index)">${item}</div>
-                  </div>
-                  <div class="timePicker">
-                    <van-field v-model="selectDate.startDate" placeholder="开始时间"></van-field>
-                    <div class="line"></div>
-                    <van-field v-model="selectDate.endDate" placeholder="结束时间"></van-field>
-                  </div>
-                </div>
-                <div class="j-footer">
-                  <div class="j-button-group">
-                    <button class="j-button-cancel" @click="resetAll">重置</button>
-                    <button class="j-button-confirm" @click="onConfirm">确认</button>
-                  </div>
-                </div>
-              </div>
+              <date-component />
             </van-dropdown-item>
             <van-dropdown-item v-model="params.value2" title="采购单位类型" :options="params.option2">
               <div class="j-container">
@@ -148,156 +130,12 @@
   </div>
   <!--S-当前页面的资源-->
   <script src=//cdn.jsdelivr.net/npm/vue@2.6.11/dist/vue.min.js></script>
-  <script src=//cdn.jsdelivr.net/npm/vant@2.8.2/lib/vant.min.js></script>
+  <script src=//cdn.jsdelivr.net/npm/vant@2.11.1/lib/vant.min.js></script>
   <script src=//cdn.jsdelivr.net/npm/zepto@1.2.0/dist/zepto.min.js></script>
   <!--E-当前页面的资源-->
   {{include "/big-member/commonjs.html"}}
-  <!-- <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/coupon/js/coupon-template.js?v={{Msg "seo" "version"}}'></script> -->
-  <script>
-    var vNode = {
-      delimiters: ['${', '}'],
-      el: '#myCollection',
-      data: {
-        listState: {
-          value: '',
-          loading: false,
-          finished: true,
-          pageNum: 1,
-          pageSize: 10,
-          offset: 80,
-          scrollTop: 0,
-          total: 0,
-          list: []
-        },
-        dateOption:[
-          '不限',
-          '最近7天',
-          '最近30天',
-          '去年'
-        ],
-        list: ['a', 'b'],
-        result: [],
-        // 下拉菜单参数
-        params: {
-          value1: '',
-          value2: '',
-          option4: [
-            { text: '有联系方式', value: 'a' },
-            { text: '无联系方式', value: 'b' },
-          ],
-          option5: [
-            { text: '有联系方式', value: 'a' },
-            { text: '无联系方式', value: 'b' },
-          ]
-        },
-        // 收藏日期选择时间参数
-        selectDate: {
-          startDate: '',
-          endDate: ''
-        },
-        limitshow: false, // 筛选框显示
-        condition: true, // 列表星星显示
-        checked: false,
-        personTagactive:0, //个人标签选择按钮下标
-        colDate:0 // 收藏日期选择按钮下标
-      },
-      computed: {},
-      created () {
-        this.getList()
-      },
-      mounted() {
-      },
-      methods: {
-        toggle(index) {
-          this.$refs.checkboxes[index].toggle();
-        },
-        onClick: function(){},
-        screenBtn(val) {
-          this.limitshow = true
-        },
-        getContainer: function() {
-          return this.$refs.searchContainer
-        },
-        getList: function() {
-          this.checked = false
-          this.listState.list = [
-            {
-              id: 1,
-              docName: '淮安市高级职业技术学校台式电脑采购项目招标公告淮安市高级职业技术学校台式电...',
-              area: '江苏',
-              industry: '建筑工程',
-              type: '招标',
-              price: 10,
-              time: '2021/06/15'
-            },
-            {
-              id: 2,
-              docName: '淮安市高级职业技术学校台式电脑采购项目招标公告淮安业技术学校台式电...',
-              area: '江苏',
-              industry: '建筑工程',
-              type: '招标',
-              price: 100,
-              time: '2021/06/14'
-            },
-            {
-              id: 2,
-              docName: '淮安市高级职业技术学校台式电脑采购项目招标公告淮安业技术学校台式电...',
-              area: '江苏',
-              industry: '建筑工程',
-              type: '招标',
-              price: 100,
-              time: '2021/06/14'
-            },
-            {
-              id: 2,
-              docName: '淮安市高级职业技术学校台式电脑采购项目招标公告淮安业技术学校台式电...',
-              area: '江苏',
-              industry: '建筑工程',
-              type: '招标',
-              price: 100,
-              time: '2021/06/14'
-            },
-            {
-              id: 2,
-              docName: '淮安市高级职业技术学校台式电脑采购项目招标公告淮安业技术学校台式电...',
-              area: '江苏',
-              industry: '建筑工程',
-              type: '招标',
-              price: 100,
-              time: '2021/06/14'
-            }
-          ]
-        },
-        // 取消收藏
-        collecClick: function(id) {
-          this.listState.list.map((item) => {
-            console.log(item)
-            if(id === item.id) {
-              this.condition = false
-            }
-          })
-        },
-        // 个人标签重置
-        resetAll: function() {},
-        // 个人标签确定
-        onConfirm: function(){},
-        // 个人标签点击
-        selectTags: function(i) {
-          console.log(i)
-          this.personTagactive = i
-        },
-        // 收藏日期标签选择
-        selectFixedDate: function(i) {
-          this.colDate = i
-        },
-        // 采购单位类型全选
-        checkAll:function() {
-          this.$refs.checkboxGroup.toggleAll();
-        },
-      }
-    }
-    var myCollection = new Vue(vNode)
-  </script>
+  <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/collection/js/date-mobile.js?v={{Msg "seo" "version"}}'></script>
+  <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/collection/js/index.js?v={{Msg "seo" "version"}}'></script>
   {{include "/common/baiducc.html"}}
 </body>
 

+ 11 - 9
src/jfw/modules/app/src/web/templates/weixin/historypush.html

@@ -56,7 +56,8 @@
             font-size: 12px;
         }
         ._header .filter_tab{
-            padding-left: 16px;
+            height: .88rem;
+            /* padding-left: 16px; */
         }
     </style>
 </head>
@@ -111,19 +112,19 @@
                         </p>
                     </div> -->
                     <van-dropdown-menu style="width: auto;overflow-x: auto;">
-                        <van-dropdown-item title="时间" v-model="value1" :options="option1" >
-                            <date-component />
+                        <van-dropdown-item title="时间"  ref="dateItem">
+                            <date-component @cancel="cancel" @confirm="confirm" />
                         </van-dropdown-item>
-                        <van-dropdown-item title="地区" v-model="value2" :options="option2" >
-                            <area-component></area-component>
+                        <van-dropdown-item title="地区" ref="areaItem">
+                            <area-component @cancel="cancel" @confirm="confirm"></area-component>
                         </van-dropdown-item>
-                        <van-dropdown-item title="行业" v-model="value3" :options="option3" >
+                        <van-dropdown-item title="行业" ref="">
                             <industry-component></industry-component>
                         </van-dropdown-item>
-                        <van-dropdown-item title="采购单位" v-model="value3" :options="option3" >
+                        <van-dropdown-item title="采购单位" ref="">
                             <cate-component></cate-component>
                         </van-dropdown-item>
-                        <van-dropdown-item title="关键词" v-model="value3" :options="option3" >
+                        <van-dropdown-item title="关键词" ref="">
                             <keyword-component></keyword-component>
                         </van-dropdown-item>
                         <notice-component></notice-component>
@@ -283,6 +284,7 @@
 <script src=//cdn.jsdelivr.net/npm/vue@2.6.11/dist/vue.min.js></script>
 <script src=//cdn.jsdelivr.net/npm/vant@2.8.2/lib/vant.min.js></script>
 <script src=//cdn.jsdelivr.net/npm/zepto@1.2.0/dist/zepto.min.js></script>
+<script src="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/big-member/js/utils.js?v={{Msg "seo" "version"}}"></script>
 <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/collection/js/date-mobile.js?v={{Msg "seo" "version"}}'></script>
 <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/collection/js/area-mobile.js?v={{Msg "seo" "version"}}'></script>
 <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/collection/js/industry-mobile.js?v={{Msg "seo" "version"}}'></script>
@@ -589,7 +591,7 @@
             $.ajax({
                 type: 'post',
                 url: '/jyapp/front/hasPushHistory?t=' + new Date().getTime(),
-                data: {"selectTime": firstTime, "pageNum": 1, "area": selectCity},
+                data: {"selectTime": firstTime, "pageNum": 1, "area": selectCity,},
                 async: false,
                 dataType: 'json',
                 success: function (data) {

+ 1 - 1
src/jfw/modules/publicapply/src/bidcollection.json

@@ -1,5 +1,5 @@
 {
-    "payUserCollLimit":5000,
+    "payUserCollLimit":6,
     "freeUserCollLimit":100,
     "pageSize":10
 }

+ 127 - 32
src/jfw/modules/publicapply/src/bidcollection/entity/entity.go

@@ -21,9 +21,9 @@ import (
 )
 
 const (
-	query          = `{"query":{"terms":{"_id":["%s"]}},"_source":["_id","area", "publishtime", "s_subscopeclass", "subtype", "title", "toptype", "type", "buyerclass","bidamount","budget"],"from":0,"size":%d}`
-	mongodb_fields = `{"_id":1,"area":1,"publishtime":1,"s_subscopeclass":1,"subtype":1,"title":1,"toptype":1,"type":1, "buyerclass":1,"budget":1,"bidamount":1}`
-	querys         = `{"query":{"terms":{"_id":["%s"]}},"_source":["_id","title","detail","area","city","publishtime","projectname","buyer","buyerclass","s_winner","bidamount","subtype","toptype","href","projectcode","buyerperson","buyertel","budget","bidopentime","agency","projectscope","winnerperson","winnertel"]}`
+	query          = `{"query":{"terms":{"_id":["%s"]}},"_source":["_id","subtype","s_winner","buyertel","winnertel"],"from":0,"size":%d}`
+	mongodb_fields = `{"_id":1,"area":1,"publishtime":1,"s_subscopeclass":1,"subtype":1,"title":1,"toptype":1,"type":1, "buyerclass":1,"budget":1,"bidamount":1,"winnertel":1,"s_winner":1,"buyertel":1}`
+	querys         = `{"query":{"terms":{"_id":["%s"]}},"_source":["_id","title","detail","area","city","publishtime","projectname","buyer","buyerclass","s_winner","bidamount","subtype","toptype","projectcode","buyertel","budget","bidopentime","agency","projectscope","winnerperson","winnertel"],"from":0,"size":%d}}`
 )
 
 //招标信息是否被收藏
@@ -79,6 +79,15 @@ type BidInfo struct {
 func BidCollOrRemByIds(bidAction BidAction, userid string) bool {
 	var i = 0
 	var wg sync.WaitGroup
+	maxCount := config.BidCollConfig.FreeUserCollLimit
+	isPay := Power(userid)
+	if isPay {
+		maxCount = config.BidCollConfig.PayUserCollLimit
+	}
+	//已收藏的次数
+	collCount := db.Mysql.Count(db.DbConf.Bdcollection, map[string]interface{}{"userid": userid})
+	//格式化数据
+	bidAction.Binfo = FormatColl(bidAction.Binfo)
 	for _, v := range bidAction.Binfo {
 		wg.Add(1)
 		go func(bd BidInfo) {
@@ -95,19 +104,24 @@ func BidCollOrRemByIds(bidAction BidAction, userid string) bool {
 				}
 			} else {
 				if db.Mysql.Count(db.DbConf.Bdcollection, queryMap) == 0 {
-					now := time.Now().Unix()
-					inserMap := map[string]interface{}{
-						"bid":        util.DecodeId(bd.Bid),
-						"buyerclass": jy.PushMapping.Buyerclass[bd.Buyerclass],
-						"buyerinfo":  bd.Buyerinfo,
-						"winnerinfo": bd.Winnerinfo,
-						"userid":     userid,
-						"createdate": qu.FormatDateByInt64(&now, qu.Date_Full_Layout),
-					}
-					if it := db.Mysql.Insert(db.DbConf.Bdcollection, inserMap); it > 0 {
-						i++
+					if int(collCount) >= maxCount {
+						log.Printf("userid :%s,收藏失败 id : %s ,已收藏数量:%v ,上限数量:%v", userid, util.DecodeId(bd.Bid), collCount, maxCount)
 					} else {
-						log.Printf("userid :%s,收藏失败 id : %s", userid, util.DecodeId(bd.Bid))
+						now := time.Now().Unix()
+						inserMap := map[string]interface{}{
+							"bid":        util.DecodeId(bd.Bid),
+							"buyerclass": jy.PushMapping.Buyerclass[bd.Buyerclass],
+							"buyerinfo":  bd.Buyerinfo,
+							"winnerinfo": bd.Winnerinfo,
+							"userid":     userid,
+							"createdate": qu.FormatDateByInt64(&now, qu.Date_Full_Layout),
+						}
+						if it := db.Mysql.Insert(db.DbConf.Bdcollection, inserMap); it > 0 {
+							i++
+							collCount++
+						} else {
+							log.Printf("userid :%s,收藏失败 id : %s", userid, util.DecodeId(bd.Bid))
+						}
 					}
 				} else {
 					log.Printf("userid :%s,已收藏 id : %s", userid, util.DecodeId(bd.Bid))
@@ -170,8 +184,16 @@ func LabelAction(labInfo *LabelInfo, userid string) (ibool bool) {
 		}
 		//收藏招标信息
 		if labInfo.Lids != "" && len(labInfo.Binfo) > 0 {
+			maxCount := config.BidCollConfig.FreeUserCollLimit
+			isPay := Power(userid)
+			if isPay {
+				maxCount = config.BidCollConfig.PayUserCollLimit
+			}
+			//已收藏的次数
+			collCount := db.Mysql.Count(db.DbConf.Bdcollection, map[string]interface{}{"userid": userid})
 			var i = 0
 			var wg sync.WaitGroup
+			labInfo.Binfo = FormatColl(labInfo.Binfo)
 			for _, v := range labInfo.Binfo {
 				wg.Add(1)
 				go func(bd BidInfo) {
@@ -189,19 +211,24 @@ func LabelAction(labInfo *LabelInfo, userid string) (ibool bool) {
 						lids += qu.SE.DecodeString(lv)
 					}
 					if db.Mysql.Count(db.DbConf.Bdcollection, queryMap) == 0 {
-						inserMap := map[string]interface{}{
-							"labelid":    lids,
-							"bid":        util.DecodeId(bd.Bid),
-							"buyerclass": jy.PushMapping.Buyerclass[bd.Buyerclass],
-							"buyerinfo":  bd.Buyerinfo,
-							"winnerinfo": bd.Winnerinfo,
-							"userid":     userid,
-							"createdate": qu.FormatDateByInt64(&now, qu.Date_Full_Layout),
-						}
-						if it := db.Mysql.Insert(db.DbConf.Bdcollection, inserMap); it > 0 {
-							i++
+						if int(collCount) >= maxCount {
+							log.Printf("userid :%s,收藏失败 id : %s ,已收藏数量:%v ,上限数量:%v", userid, util.DecodeId(bd.Bid), collCount, maxCount)
 						} else {
-							log.Printf("userid :%s,收藏失败 id : %s", userid, util.DecodeId(bd.Bid))
+							inserMap := map[string]interface{}{
+								"labelid":    lids,
+								"bid":        util.DecodeId(bd.Bid),
+								"buyerclass": jy.PushMapping.Buyerclass[bd.Buyerclass],
+								"buyerinfo":  bd.Buyerinfo,
+								"winnerinfo": bd.Winnerinfo,
+								"userid":     userid,
+								"createdate": qu.FormatDateByInt64(&now, qu.Date_Full_Layout),
+							}
+							if it := db.Mysql.Insert(db.DbConf.Bdcollection, inserMap); it > 0 {
+								i++
+								collCount++
+							} else {
+								log.Printf("userid :%s,收藏失败 id : %s", userid, util.DecodeId(bd.Bid))
+							}
 						}
 					} else {
 						if db.Mysql.Update(db.DbConf.Bdcollection, queryMap, map[string]interface{}{"labelid": lids}) {
@@ -325,7 +352,7 @@ func GetCollList(c *CollList, userid string) map[string]interface{} {
 	// rdata["res"] = result
 	rdata["count"] = count
 	rdata["haveNextPage"] = haveNextPage
-	rdata["res"] = GetInfoById(db.Mgo_Bidding, db.DbConf.Mongodb.Bidding.Collection, db.DbConf.Mongodb.Bidding.Collection_change, result)
+	rdata["res"] = GetInfoById(db.Mgo_Bidding, db.DbConf.Mongodb.Bidding.Collection, db.DbConf.Mongodb.Bidding.Collection_change, userid, result)
 	return rdata
 }
 
@@ -353,7 +380,6 @@ func Power(userid string) bool {
 			}
 		}
 	}
-	log.Println(isVip, isEnt, isMember)
 	return isVip || isEnt || isMember
 }
 
@@ -367,10 +393,13 @@ type InfoList struct {
 	Publishtime     int64       `json:"publishtime"`
 	Budget          interface{} `json:"budget"`
 	Bidamount       interface{} `json:"bidamount"`
+	Buyer           string      `json:"buyer"`
+	S_winner        string      `json:"s_winner"`
+	Bidopentime     int64       `json:"bidopentime"`
 }
 
 //根据id取内容
-func GetInfoById(Mgo_bidding mg.MongodbSim, bidding, bidding_back string, idlist []map[string]interface{}) []*InfoList {
+func GetInfoById(Mgo_bidding mg.MongodbSim, bidding, bidding_back, userid string, idlist []map[string]interface{}) []*InfoList {
 	array := make([]*InfoList, len(idlist))
 	if len(idlist) == 0 {
 		return array
@@ -400,7 +429,7 @@ func GetInfoById(Mgo_bidding mg.MongodbSim, bidding, bidding_back string, idlist
 	//	log.Println(es_ids)
 	//elasticsearch
 	if len(es_ids) > 0 {
-		list := elastic.Get("bidding", "bidding", fmt.Sprintf(query, strings.Join(es_ids, `","`), len(es_ids)))
+		list := elastic.Get("bidding", "bidding", fmt.Sprintf(querys, strings.Join(es_ids, `","`), len(es_ids)))
 		if list != nil {
 			for _, v := range *list {
 				_id := qu.ObjToString(v["_id"])
@@ -454,7 +483,7 @@ func GetInfoById(Mgo_bidding mg.MongodbSim, bidding, bidding_back string, idlist
 	return array
 }
 
-//历史推送记录中单条信息格式化
+//列表单条信息格式化
 func InfoFormat(p string, info *map[string]interface{}) *InfoList {
 	area := qu.ObjToString((*info)["area"])
 	if area == "A" {
@@ -497,5 +526,71 @@ func InfoFormat(p string, info *map[string]interface{}) *InfoList {
 		Publishtime:     qu.Int64All((*info)["publishtime"]),
 		Budget:          (*info)["budget"],
 		Bidamount:       (*info)["bidamount"],
+		Buyer:           qu.ObjToString((*info)["buyer"]),
+		S_winner:        qu.ObjToString((*info)["s_winner"]),
+		Bidopentime:     qu.Int64All((*info)["bidopentime"]),
+	}
+}
+
+func FormatColl(bidinfo []BidInfo) []BidInfo {
+	es_ids := []string{}
+	infos := map[string]interface{}{}
+	for _, v := range bidinfo {
+		es_ids = append(es_ids, util.DecodeId(v.Bid))
+	}
+	if len(es_ids) > 0 {
+		list := elastic.Get("bidding", "bidding", fmt.Sprintf(query, strings.Join(es_ids, `","`), len(es_ids)))
+		if list != nil {
+			for _, v := range *list {
+				_id := qu.ObjToString(v["_id"])
+				//中标电话 需要查企业库 和三级页保持一致
+				winnertel := qu.ObjToString(v["winnertel"])
+				if winnertel == "" && isbid(v["subtype"]) {
+					v["winnertel"] = getwinnertel(v["s_winner"])
+				}
+				infos[_id] = v
+			}
+		}
+	}
+	if len(infos) > 0 {
+		for k, v := range bidinfo {
+			id := util.DecodeId(v.Bid)
+			if infos[id] != nil {
+				infoMap, _ := (infos[id]).(map[string]interface{})
+				if qu.ObjToString(infoMap["winnertel"]) != "" {
+					v.Winnerinfo = true
+					bidinfo[k].Winnerinfo = true
+				}
+				if qu.ObjToString(infoMap["buyertel"]) != "" {
+					v.Buyerinfo = true
+					bidinfo[k].Buyerinfo = true
+
+				}
+			}
+
+		}
+	}
+	return bidinfo
+}
+
+func isbid(typ interface{}) bool {
+	if typ != nil {
+		subtype := qu.ObjToString(typ)
+		if subtype == "中标" || subtype == "合同" || subtype == "成交" {
+			return true
+		}
+	}
+	return false
+}
+
+func getwinnertel(company interface{}) string {
+	if company != nil {
+		data, _ := db.Mgo_Ent.FindOneByField("winner_enterprise", map[string]interface{}{
+			"company_name": qu.ObjToString(company),
+		}, map[string]interface{}{"company_phone": 1})
+		if (*data)["company_phone"] != nil {
+			return qu.ObjToString((*data)["company_phone"])
+		}
 	}
+	return ""
 }

+ 10 - 0
src/jfw/modules/publicapply/src/db.json

@@ -22,6 +22,16 @@
 			"collection_change": "bidding_back",
 			"userName": "jyDevGroup",
 			"password": "jy@DevGroup"
+		},
+		"ent": {
+			"address": "192.168.3.207:27001,192.168.3.206:27002",
+	 		"size": 5,
+	 		"dbName": "mixdata",
+			"replSet": "",
+			"collection": "qyxy",
+			"collection_change": "qyxy_change",
+			"userName": "jyDevGroup",
+			"password": "jy@DevGroup"
 		}
 	},
 	"elasticsearch": {

+ 28 - 12
src/jfw/modules/publicapply/src/db/db.go

@@ -16,6 +16,7 @@ type dbConf struct {
 		Main    *mgoConf
 		Log     *mgoConf
 		Bidding *mgoConf
+		Ent     *mgoConf
 	}
 	Elasticsearch struct {
 		Main *esConf
@@ -62,6 +63,7 @@ var (
 	Mgo         m.MongodbSim
 	Mgo_Log     m.MongodbSim
 	Mgo_Bidding m.MongodbSim
+	Mgo_Ent     m.MongodbSim
 	Mysql       *mysql.Mysql
 	MysqlPush   *mysql.Mysql
 )
@@ -104,6 +106,32 @@ func init() {
 			}
 			Mgo_Log.InitPool()
 		}
+		//
+		if DbConf.Mongodb.Bidding != nil {
+			log.Println("初始化 mongodb bidding")
+			Mgo_Bidding = m.MongodbSim{
+				MongodbAddr: DbConf.Mongodb.Bidding.Address,
+				Size:        DbConf.Mongodb.Bidding.Size,
+				DbName:      DbConf.Mongodb.Bidding.DbName,
+				ReplSet:     DbConf.Mongodb.Bidding.ReplSet,
+				UserName:    DbConf.Mongodb.Bidding.UserName,
+				Password:    DbConf.Mongodb.Bidding.Password,
+			}
+			Mgo_Bidding.InitPool()
+		}
+		//
+		if DbConf.Mongodb.Ent != nil {
+			log.Println("初始化 mongodb ent")
+			Mgo_Ent = m.MongodbSim{
+				MongodbAddr: DbConf.Mongodb.Ent.Address,
+				Size:        DbConf.Mongodb.Ent.Size,
+				DbName:      DbConf.Mongodb.Ent.DbName,
+				ReplSet:     DbConf.Mongodb.Ent.ReplSet,
+				UserName:    DbConf.Mongodb.Ent.UserName,
+				Password:    DbConf.Mongodb.Ent.Password,
+			}
+			Mgo_Ent.InitPool()
+		}
 		if DbConf.Mysql.Main != nil {
 			log.Println("初始化 mysql")
 			Mysql = &mysql.Mysql{
@@ -129,17 +157,5 @@ func init() {
 			MysqlPush.Init()
 			jy.PushMapping.Init(MysqlPush)
 		}
-		if DbConf.Mongodb.Bidding != nil {
-			log.Println("初始化 mongodb bidding")
-			Mgo_Bidding = m.MongodbSim{
-				MongodbAddr: DbConf.Mongodb.Bidding.Address,
-				Size:        DbConf.Mongodb.Bidding.Size,
-				DbName:      DbConf.Mongodb.Bidding.DbName,
-				ReplSet:     DbConf.Mongodb.Bidding.ReplSet,
-				UserName:    DbConf.Mongodb.Bidding.UserName,
-				Password:    DbConf.Mongodb.Bidding.Password,
-			}
-			Mgo_Bidding.InitPool()
-		}
 	}
 }

+ 120 - 5
src/web/staticres/collection/css/index.css

@@ -1,6 +1,33 @@
 .collection{
   width: 100%;
 }
+
+/* 时间选择弹窗s */
+.headertitle{
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  padding: .44rem .32rem .24rem;
+  width: 100%;
+  font-size: .4rem;
+  font-weight: 500;
+  color: #171826;
+}
+.headertitle .title_close{
+  display: flex;
+  width: .4rem;
+  height: .4rem;
+  background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAMAAAAM7l6QAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAgVBMVEUAAAChoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaEAAADUxRFJAAAAKXRSTlMABUuRxuj4EH7q6VXnA5Srk1b+wcP8f2UBm6BgxL+SxfkGgFhX60zH+uqurTcAAAABYktHRACIBR1IAAAACXBIWXMAAAsSAAALEgHS3X78AAAA00lEQVQoz4WT1xaCMAxAwyh7uVAQAVFG/v8HLSAjiO19aU7vOZBmAEwoqqYzw2C6piqwxbRsnHEsk1rXQ4LnrqQf4A+BP9sQdwgnH+Eu0fe/+IfDkPOY1fG03J8vw8H6/OPRXm/JZFP/PvqYV2N8b+bD5FMePobIVkDF5TIhAUeFHKlfW8whQ+KJxQJWpe4VsWhDicQTi6VMSz5eiFMTPiySlUVY1KewJVXfUCZsqGQcZMMkG0XJIHNejEr23ixRVS+yrjZL1K9gk7dO1zlt3iwr+AHFoWJRdvcdHQAAAABJRU5ErkJggg==) no-repeat;
+  background-size: contain;
+}
+.datepopup .van-picker-column__item.van-picker-column__item--selected{
+  font-size: .36rem;
+  color: #2ABED1;
+}
+.datepopup .van-picker-column__item{
+  float: none!important;
+}
+/* end */
 .collection .search-container{
   position: relative;
 }
@@ -10,6 +37,7 @@
   height: .88rem;
   box-shadow: none;
   border-bottom: 1.5px solid rgba(0,0,0,0.05);
+  z-index: 10;
 }
 .collection .van-dropdown-menu__item{
   flex: none;
@@ -92,19 +120,19 @@
   font-weight: 500;
   line-height: .48rem;
 }
-.collection .collec_li .collec_star{
+.collec_star{
   margin-left: .36rem;
   width: .4rem;
   height: .4rem;
 }
-.collection .collec_li .collec_star .shoucang{
+.collec_star .shoucang{
   display: flex;
   width: .4rem;
   height: .4rem;
   background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAHRSURBVHgB1VVLTsMwEH1jCB8hpHICwpIVsASERE4CV+AEcARuAjdoJYTY0e4QbBpOQBGC8quH5/RD2jiti7rhSZNY8fjNmxnbAaaAVlFxNs2a+WmcEeECJhslmDX0Cod6Dc2M49B1JtQRgtPBeC43nkWATLHkVCuzCcwiLAODo8K3wCxkkgN3TYwFNL2TFokcoIbQAHpDsi9sU3FMW6fKWFfkEO+oyIf61qdkSPluMNgjS9fgupbs850PwHqecaKQsi5yerWn4UshL+pUh0FwIns47/bA4JLPVsFpKTeOBLpmoMsTq+o2QYtW61K7YN2UkkKQSEZVASsM5LIyY8iFvemVaeCWfTDYAbKaulNbDpZOK8YXJM2T9zUNC3CNtqiyFLFTOxau72/sTVu75Ibkuz2BZQH6QViGOksUdLHJm6Z41wK5g7eSmWMkKUJg1e2wlo/cYdxtuo1J+N26cZmLN4PPhwnkSuJX2vPgXFT0lgczNIDRuRhlcKqfSNweOdlt/z/C3wOrxQxEax1rE5InVJ0W5kvK5O2BMbqlgw2mjY7Vk2hz6FLb4I/nmG93vcQ9qd4SeWEfpGrvpfl9l5GMhQtEa9LqCIXWp/ux/3XN/8APC++o0hFQWAMAAAAASUVORK5CYII=) no-repeat;
   background-size: contain;
 }
-.collection .collec_li .collec_star .weishoucang{
+.collec_star .weishoucang{
   display: flex;
   width: .4rem;
   height: .4rem;
@@ -182,6 +210,11 @@
   flex: none;
   height: 6rem;
 }
+.collection .dateTags .van-field__control{
+  font-size: .28rem;
+  color: #171826;
+  line-height: .4rem;
+}
 .collection .timeTag{
   display: flex;
   padding: .32rem 0;
@@ -223,6 +256,20 @@
   background: #f5f6f7;
   border-radius: .08rem;
 }
+.collection .timePicker.clickactive{
+  position: relative;
+ background: #E8FAFD;
+}
+.collection .timePicker.clickactive::after{
+  content: '';
+  position: absolute;
+  right: 0;
+  bottom: 0;
+  background: url(/jyapp/big-member/image/icon-check.png);
+  width: .28rem;
+  height: .28rem;
+  background-size: 100% 100%;
+ }
 .timePicker .line{
   width: 12px;
   height: 1px;
@@ -236,18 +283,64 @@
   border-radius: .1rem;
   align-items: center;
 }
-
+.collection .j-footer{
+  box-shadow: 0px -2px 8px rgb(54 147 179 / 5%);
+  z-index: inherit;
+}
+.collection .j-button-group {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  width: 100%;
+  padding: 0.16rem 0.32rem 0.24rem;
+  background-color: #fff;
+  box-sizing: border-box;
+}
+.collection .j-button-group .j-button-confirm, .j-button-cancel {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  flex: 1;
+  width: 100%;
+  height: 0.8rem;
+  font-size: 0.32rem;
+  line-height: inherit;
+  text-align: center;
+  border-radius: 0.16rem;
+}
+.collection .j-button-group .j-button-cancel {
+  margin-right: 0.26rem;
+  color: #5f5e64;
+  background-color: #edeff2;
+}
+.collection .j-button-group .j-button-confirm {
+  color: #fff;
+  background-color: #2cb7ca;
+}
+/* 地区 */
+.collection .area-list.van-index-bar{
+  height: 8.6rem;
+  overflow: auto;
+}
 /* 采购单位类型 */
 .collection .unitTab{
+  overflow: hidden;
   height: 7.5rem;
   flex: none;
 }
+.collection .unitTab .van-tabs__content{
+  height: 7.5rem;
+  overflow: auto;
+}
 .collection .unitType {
+  height: 100%;
+  /* overflow: auto; */
   flex: 1;
   display: flex;
 }
 .collection .unitType .van-tabs__wrap{
-  overflow: unset;
+  height: 100%;
+  overflow: auto;
 }
 .collection .unitType .van-tabs__content{
   flex: 1;
@@ -258,6 +351,7 @@
   display: flex;
   flex-direction: column;
   border: 0;
+  overflow: auto;
 }
 .unitType .van-tabs__wrap .van-tabs__nav.van-tabs__nav--card .van-tab{
   flex: none;
@@ -265,9 +359,12 @@
   min-height: .8rem;
   background: #f5f6f7;
   border: 0;
+  padding: 0;
 }
 .unitType .van-tab__text.van-tab__text--ellipsis{
+  padding: 0 0.08rem 0 .32rem;
   display: flex;
+  align-items: center;
   width: 100%;
   height: 100%;
   font-size: .3rem;
@@ -276,6 +373,24 @@
   color: #171826;
   line-height: .44rem;
 }
+.unitType .van-tab__text.van-tab__text--ellipsis .tabtitle{
+  flex: 1;
+}
+.unitType .van-tab__text.van-tab__text--ellipsis .optionnum{
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  margin-left: .1rem;
+  width: .8rem;
+  height: .4rem;
+  background: #2abed1;
+  border: 1px solid #ffffff;
+  border-radius: .82rem;
+  font-size: .22rem;
+  font-weight: 500;
+  text-align: CENTER;
+  color: #ffffff;
+}
 .unitType .van-tabs__wrap .van-tabs__nav.van-tabs__nav--card .van-tab.van-tab--active {
   background: #ffffff;
 }

BIN
src/web/staticres/collection/image/wxqc.png


+ 10 - 12
src/web/staticres/collection/js/area-mobile.js

@@ -88,7 +88,6 @@ var areaComponent = {
     arrangeListMap: function () {
       for (var key in this.provinceListMap) {
           this.indexList.push(key)
-          console.log(this.indexList)
           this.indexListMap[key] = this.provinceListMap[key].map(function (item) {
               return {
               name: item,
@@ -211,11 +210,11 @@ var areaComponent = {
       }
       this.refresh = !this.refresh
       this.refresh = !this.refresh
-      ;(this.$refs.areaRef).toggle(false)
-      this.$emit('onReset', this.getSelectedProvinceArr())
-      this.setParam.area = ''
-      this.dropdownItemText.area = '地区'
-      this.optionData('',this.setParam.time)
+      let params = {
+        name: 'areaitem',
+        data: []
+      }
+      this.$emit('cancel', params)
     },
 
     onConfirm:function() {
@@ -227,13 +226,12 @@ var areaComponent = {
           t = '全国'
       }
       console.log(t)
-      this.dropdownItemText.area = t
       console.log(value.join(','))
-      this.setParam.area = value.join(',')
-      // this.listState.pageNum = 1
-      // this.getPushList(this.time, this.area, this.listState.pageNum)
-      ;(this.$refs.areaRef).toggle(false)
-      this.optionData(this.setParam.area,this.setParam.time)
+      let params = {
+        name: 'areaitem',
+        data: value
+      }
+      this.$emit('confirm', params)
     },
   }
 }

+ 1 - 1
src/web/staticres/collection/js/cate-mobile.js

@@ -54,7 +54,7 @@ var cateComponent = {
     return {
       result: [],
       list: {
-        "党政机关事业单位": ['人大', '政协', '党委办','组织', '宣传', '统战', '纪委', '政府办', '发改委','财政','教育','科技','工信','民政', '民宗', '人社', '公安', '检察院','法院', '司法', '应急管理', '军队', '自然资源', '生态环境','住建', '市政',  '城管', '交通', '水利','农业','文旅', '卫健委','医疗','学校','档案', '体育', '政务中心', '机关事务', '国资委','海关','税务', '市场监管', '商务','人行', '银保监', '证监', '审计', '出版广电','统计', '公共资源交易', '社会团体','气象'],
+        "党政机关事业单位": ['人大', '政协', '党委办','组织', '宣传', '统战', '纪委', '政府办', '发改委','财政','教育','科技','工信','民政', '民宗', '人社', '公安', '检察院','法院', '司法', '应急管理', '军队', '自然资源', '生态环境','住建', '市政',  '城管', '交通', '水利','农业','气象','文旅', '卫健委','医疗','学校','档案', '体育', '政务中心', '机关事务', '国资委','海关','税务', '市场监管', '商务','人行', '银保监', '证监', '审计', '出版广电','统计', '公共资源交易', '社会团体','气象'],
         "企业": ['传媒','采矿业', '电信行业', '金融业', '建筑业', '能源化工', '农林牧渔','批发零售', '信息技术', '运输物流', '制造业', '住宿餐饮']  
       },
       checked: true

+ 180 - 13
src/web/staticres/collection/js/date-mobile.js

@@ -1,21 +1,92 @@
 var dateComponentTemplate = `<div class="j-container">
 <div class="dateTags j-main">
     <div class="timeTag">
-    <div class="area-card-item" :class="{active:index==colDate}" v-for="(item, index) in dateOption" :key="index" @click="selectFixedDate(index)">{{item}}</div>
+    <div class="area-card-item" :class="{active:index==colDate}" v-for="(item, index) in dateOption" :key="index" @click="selectFixedDate(index, item.value)">{{item.name}}</div>
     </div>
-    <div class="timePicker">
+    <div class="timePicker" @click="dateShowEvent" :class="{clickactive:dateStyle==true}">
     <van-field v-model="selectDate.startDate" placeholder="开始时间"></van-field>
     <div class="line"></div>
-    <van-field v-model="selectDate.endDate" placeholder="结束时间"></van-field>
+    <van-field @focus="getEndFocus" v-model="selectDate.endDate" placeholder="结束时间"></van-field>
     </div>
 </div>
-<div class="j-footer">
+<van-popup v-model="datePicker.startshow" round position="bottom" :style="{ height: '43%' }">
+    <div class="j-container">
+      <div class="j-header">
+        <div class="headertitle">
+          <div class="title_left">
+            选择开始时间
+          </div>
+          <span class="title_close" @click="pickerClose">
+          </span>
+        </div>
+      </div>
+      <div class="j-main">
+        <van-datetime-picker
+          @change="changeDate"
+          class="datepopup"
+          :show-toolbar="false"
+          swipe-duration="300"
+          v-model="datePicker.currentDate"
+          type="date"
+          title="选择年月日"
+          ref="getstartValues"
+          :formatter="formatter"
+          :min-date="datePicker.minDate"
+          :max-date="datePicker.maxDate"
+        >
+        </van-datetime-picker>
+      </div>
+      <div class="j-footer">
+        <div class="j-button-group">
+          <button class="j-button-cancel" @click="resetAll">重置</button>
+          <button class="j-button-confirm" @click="onStartConfirm">确认</button>
+        </div>
+      </div>
+    </div>
+  </van-popup>
+  <van-popup v-model="datePicker.endshow" round position="bottom" :style="{ height: '43%' }">
+    <div class="j-container">
+      <div class="j-header">
+        <div class="headertitle">
+          <div class="title_left">
+            选择结束时间
+          </div>
+          <span class="title_close" @click="pickerClose">
+          </span>
+        </div>
+      </div>
+      <div class="j-main">
+        <van-datetime-picker
+          @change="changeDate"
+          class="datepopup"
+          :show-toolbar="false"
+          swipe-duration="300"
+          v-model="datePicker.currentDate"
+          ref="getendValues"
+          type="date"
+          title="选择年月日"
+          :formatter="formatter"
+          :min-date="datePicker.minDate"
+          :max-date="datePicker.maxDate"
+        >
+        </van-datetime-picker>
+      </div>
+      <div class="j-footer">
+        <div class="j-button-group">
+          <button class="j-button-cancel" @click="resetAll">重置</button>
+          <button class="j-button-confirm" @click="onendConfirm">确认</button>
+        </div>
+      </div>
+    </div>
+  </van-popup>
+  <div class="j-footer">
     <div class="j-button-group">
-    <button class="j-button-cancel" @click="resetAll">重置</button>
-    <button class="j-button-confirm" @click="onConfirm">确认</button>
+      <button class="j-button-cancel" @click="resetAll">重置</button>
+      <button class="j-button-confirm" @click="onConfirm">确认</button>
     </div>
+  </div>
 </div>
-</div>`
+`
 
 var dateComponent = {
   name: 'date-mobile',
@@ -24,19 +95,115 @@ var dateComponent = {
     return {
       colDate: 0,
       dateOption:[
-        '不限',
-        '最近7天',
-        '最近30天',
-        '去年'
+        {
+          name: '不限',
+          value: 'all'
+        },
+        {
+          name: '最近7天',
+          value: 'lately-7'
+        },
+        {
+          name: '最近30天',
+          value: 'lately-30'
+        },
+        {
+          name: '去年',
+          value: 'lastyear'
+        }
       ],
+      // 点击选择时间添加样式
+      dateStyle: false,
+      // 时间选择参数
+      datePicker:{
+        startshow: false,
+        endshow: false,
+        minDate: new Date(2020, 0, 1),
+        maxDate: new Date(2025, 10, 1),
+        currentDate: new Date(),
+      },
       selectDate: {
+        tagDate: '',
         startDate: '',
         endDate: ''
       }
     }
   },
   methods: {
-    resetAll:function() {},
-    onConfirm:function() {},
+    selectFixedDate: function(i, value) {
+      this.colDate = i
+      this.dateStyle = false
+      this.selectDate.tagDate = value
+      this.selectDate.startDate = ''
+      this.selectDate.endDate = ''
+    },
+    // 显示选择时间弹窗
+    dateShowEvent: function() {
+      this.colDate = -1
+      this.dateStyle = true
+      this.datePicker.startshow = true
+    },
+    // 获取选中的时间
+    changeDate: function(e) {
+      console.log(e.getValues())
+      let timer = e.getValues()
+      console.log(timer)
+    },
+    formatter: function(type, val) {
+      if (type === 'year') {
+        return val + '年';
+      }
+      if (type === 'month') {
+        return val + '月';
+      }
+      if (type === 'day') {
+        return val + '日';
+      }
+      return val;
+    },
+    // 结束时间获取焦点
+    getEndFocus: function(){
+      this.datePicker.endshow = true
+    },
+    resetAll:function() {
+      this.$emit('cancel', 'datecancel')
+    },
+    // 选择开始时间弹窗确认按钮
+    onStartConfirm:function() {
+      this.selectDate.tagDate = ''
+      this.selectDate.startDate = this.$refs.getstartValues.value.pattern('yyyy年MM月dd日')
+      this.datePicker.startshow = false
+      // 如果结束时间不为空 选择过开始时间不弹出结束时间弹窗
+      if(this.selectDate.endDate == '') {
+        this.datePicker.endshow = true
+      }else{
+        this.datePicker.endshow = false
+      }
+    },
+    // 选择结束时间弹窗确认按钮
+    onendConfirm: function(){
+      this.selectDate.tagDate = ''
+      this.selectDate.endDate = this.$refs.getendValues.value.pattern('yyyy年MM月dd日')
+      this.datePicker.endshow = false
+    },
+    // 选择时间弹窗关闭按钮
+    pickerClose: function() {
+      this.datePicker.startshow = false
+      this.datePicker.endshow = false
+    },
+    // 筛选条件确认按钮
+    onConfirm: function(){
+      let timerDate = ''
+      if(this.selectDate.tagDate == ''){
+        timerDate = this.selectDate.startDate-this.selectDate.endDate
+      }else{
+        timerDate = this.selectDate.tagDate
+      }
+      let params = {
+        name: 'dateItem',
+        data: timerDate
+      }
+      this.$emit('confirm', params)
+    }
   }
 }

+ 146 - 0
src/web/staticres/collection/js/index.js

@@ -0,0 +1,146 @@
+var vNode = {
+  delimiters: ['${', '}'],
+  el: '#myCollection',
+  components: {
+    dateComponent: dateComponent
+  },
+  data: {
+    listState: {
+      value: '',
+      loading: false,
+      finished: true,
+      pageNum: 1,
+      pageSize: 10,
+      offset: 80,
+      scrollTop: 0,
+      total: 0,
+      list: []
+    },
+    dateOption:[
+      '不限',
+      '最近7天',
+      '最近30天',
+      '去年'
+    ],
+    list: ['a', 'b'],
+    result: [],
+    // 下拉菜单参数
+    params: {
+      value1: '',
+      value2: '',
+      option4: [
+        { text: '有联系方式', value: 'a' },
+        { text: '无联系方式', value: 'b' },
+      ],
+      option5: [
+        { text: '有联系方式', value: 'a' },
+        { text: '无联系方式', value: 'b' },
+      ]
+    },
+    // 收藏日期选择时间参数
+    selectDate: {
+      startDate: '',
+      endDate: ''
+    },
+    limitshow: false, // 筛选框显示
+    condition: true, // 列表星星显示
+    checked: false,
+    personTagactive:0, //个人标签选择按钮下标
+    colDate:0 // 收藏日期选择按钮下标
+  },
+  computed: {},
+  created () {
+    this.getList()
+  },
+  mounted() {
+  },
+  methods: {
+    toggle(index) {
+      this.$refs.checkboxes[index].toggle();
+    },
+    onClick: function(){},
+    screenBtn(val) {
+      this.limitshow = true
+    },
+    getContainer: function() {
+      return this.$refs.searchContainer
+    },
+    getList: function() {
+      this.checked = false
+      this.listState.list = [
+        {
+          id: 1,
+          docName: '淮安市高级职业技术学校台式电脑采购项目招标公告淮安市高级职业技术学校台式电...',
+          area: '江苏',
+          industry: '建筑工程',
+          type: '招标',
+          price: 10,
+          time: '2021/06/15'
+        },
+        {
+          id: 2,
+          docName: '淮安市高级职业技术学校台式电脑采购项目招标公告淮安业技术学校台式电...',
+          area: '江苏',
+          industry: '建筑工程',
+          type: '招标',
+          price: 100,
+          time: '2021/06/14'
+        },
+        {
+          id: 2,
+          docName: '淮安市高级职业技术学校台式电脑采购项目招标公告淮安业技术学校台式电...',
+          area: '江苏',
+          industry: '建筑工程',
+          type: '招标',
+          price: 100,
+          time: '2021/06/14'
+        },
+        {
+          id: 2,
+          docName: '淮安市高级职业技术学校台式电脑采购项目招标公告淮安业技术学校台式电...',
+          area: '江苏',
+          industry: '建筑工程',
+          type: '招标',
+          price: 100,
+          time: '2021/06/14'
+        },
+        {
+          id: 2,
+          docName: '淮安市高级职业技术学校台式电脑采购项目招标公告淮安业技术学校台式电...',
+          area: '江苏',
+          industry: '建筑工程',
+          type: '招标',
+          price: 100,
+          time: '2021/06/14'
+        }
+      ]
+    },
+    // 取消收藏
+    collecClick: function(id) {
+      this.listState.list.map((item) => {
+        console.log(item)
+        if(id === item.id) {
+          this.condition = false
+        }
+      })
+    },
+    // 个人标签重置
+    resetAll: function() {},
+    // 个人标签确定
+    onConfirm: function(){},
+    // 个人标签点击
+    selectTags: function(i) {
+      console.log(i)
+      this.personTagactive = i
+    },
+    // 收藏日期标签选择
+    selectFixedDate: function(i) {
+      this.colDate = i
+    },
+    // 采购单位类型全选
+    checkAll:function() {
+      this.$refs.checkboxGroup.toggleAll();
+    },
+  }
+}
+var myCollection = new Vue(vNode)

+ 304 - 15
src/web/staticres/collection/js/industry-mobile.js

@@ -1,7 +1,27 @@
 var industryComponentTemplate = `<div class="j-container">
 <div class="j-main unitTab">
   <van-tabs type="card" class="unitType">
-    <van-tab title="标签 1">
+  <van-checkbox-group v-model="resultAll" ref="checkboxGroupAll">
+    <van-tab title="全部">
+      <van-cell
+      v-model="checkedAll"
+      clickable
+      type="primary"
+      title="全选"
+      @click="checkBoxAll"
+      >
+      <template #right-icon>
+        <van-checkbox checked-color="#2ABED1"></van-checkbox>
+      </template>
+      </van-cell>
+    </van-tab>
+    <van-tab v-for="(item, index) in tablist" :key="index">
+    <template #title>
+        <div class="tabtitle">
+          {{Object.keys(item)[0]}}
+        </div>
+        <div class="optionnum">36/{{item[Object.keys(item)[0]].length}}</div>
+      </template>
       <van-checkbox-group v-model="result" ref="checkboxGroup">
         <van-cell-group>
           <van-cell
@@ -9,28 +29,27 @@ var industryComponentTemplate = `<div class="j-container">
           clickable
           type="primary"
           title="全选"
-          @click="checkAll"
+          @click="checkAll(item)"
           >
           <template #right-icon>
-            <van-checkbox checked-color="#2ABED1"></van-checkbox>
+            <van-checkbox v-model="checked" checked-color="#2ABED1" name="全选"></van-checkbox>
           </template>
           </van-cell>
           <van-cell
-            v-for="(item, index) in list"
+            v-for="(iitem, i) in item[Object.keys(item)[0]]"
             clickable
-            :key="item"
-            title="复选框 item"
-            @click="toggle(index)"
+            label-disabled="false"
+            :key="i"
+            :title="iitem.name"
+            @click="toggle(i)"
           >
             <template #right-icon>
-              <van-checkbox checked-color="#2ABED1" :name="item" ref="checkboxes" />
+              <van-checkbox checked-color="#2ABED1" :name="iitem" ref="checkboxes" />
             </template>
           </van-cell>
         </van-cell-group>
       </van-checkbox-group>
     </van-tab>
-    <van-tab title="标签 3">内容 3</van-tab>
-    <van-tab title="标签 4">内容 4</van-tab>
   </van-tabs>
 </div>
 <div class="j-footer">
@@ -47,20 +66,290 @@ var industryComponent = {
   template: industryComponentTemplate,
   data:function () {
     return {
+      tablist: [],
+      resultAll:[],
       result: [],
-      list: ['a', 'b'],
-      checked: true
+      conlist: [],
+      checkedAll: false,
+      checked: false
     }
   },
+  created () {
+    this.getIndustryData()
+  },
   methods: {
-    checkAll: function(){
-      console.log(this.checked)
+    // 获取行业数据
+    getIndustryData: function(){
+      const _this = this
+      _this.tablist =  [
+        {
+          "建筑工程": [
+            "勘察设计",
+            "工程施工",
+            "监理咨询",
+            "材料设备",
+            "机电安装"
+          ]
+        },
+        {
+          "水利水电": [
+            "水利工程",
+            "发电工程",
+            "航运工程",
+            "其他工程"
+          ]
+        },
+        {
+          "能源化工": [
+            "原材料",
+            "仪器仪表",
+            "新能源",
+            "设备物资",
+            "化工产品",
+            "设备"
+          ]
+        },
+        {
+          "弱电安防": [
+            "综合布线",
+            "智能系统",
+            "智能家居"
+          ]
+        },
+        {
+          "信息技术": [
+            "系统集成及安全",
+            "软件开发",
+            "运维服务",
+            "其他"
+          ]
+        },
+        {
+          "行政办公": [
+            "办公家具",
+            "通用办公设备",
+            "专业设备",
+            "办公用品",
+            "生活用品"
+          ]
+        },
+        {
+          "机械设备": [
+            "矿山机械",
+            "工程机械",
+            "机械零部件",
+            "机床相关",
+            "车辆",
+            "其他机械设备"
+          ]
+        },
+        {
+          "交通工程": [
+            "道路",
+            "轨道",
+            "桥梁",
+            "隧道",
+            "其他"
+          ]
+        },
+        {
+          "医疗卫生": [
+            "设备",
+            "耗材",
+            "药品"
+          ]
+        },
+        {
+          "市政设施": [
+            "道路",
+            "绿化",
+            "线路管网",
+            "综合项目"
+          ]
+        },
+        {
+          "服务采购": [
+            "法律咨询",
+            "会计",
+            "物业",
+            "审计",
+            "安保",
+            "仓储物流",
+            "广告宣传印刷",
+            "其他"
+          ]
+        },
+        {
+          "农林牧渔": [
+            "生产物资",
+            "生产设备",
+            "相关服务"
+          ]
+        }
+      ]
+      let maxarr = []
+      _this.tablist.forEach(function(item,index) {
+        let minarr = []
+        let keyname = Object.keys(item)[0]
+        let eachArr = item[Object.keys(item)[0]]
+        eachArr.forEach(function(data, i){
+          data = {
+            name: data,
+            type: true
+          }
+          minarr.push(data)
+        })
+        console.log(minarr)
+        let obj = {
+          [keyname]: minarr
+        }
+        maxarr.push(obj)
+      })
+      console.log(maxarr)
+      _this.tablist = maxarr
+      // $.ajax({
+      //   url: '/publicapply/free/getindustrys',
+      //   type:'POST',
+      //   success: function(res){
+      //     console.log(res)
+      //     // _this.tablist = res.data
+      //     res.data =  [
+      //       {
+      //         "建筑工程": [
+      //           "勘察设计",
+      //           "工程施工",
+      //           "监理咨询",
+      //           "材料设备",
+      //           "机电安装"
+      //         ]
+      //       },
+      //       {
+      //         "水利水电": [
+      //           "水利工程",
+      //           "发电工程",
+      //           "航运工程",
+      //           "其他工程"
+      //         ]
+      //       },
+      //       {
+      //         "能源化工": [
+      //           "原材料",
+      //           "仪器仪表",
+      //           "新能源",
+      //           "设备物资",
+      //           "化工产品",
+      //           "设备"
+      //         ]
+      //       },
+      //       {
+      //         "弱电安防": [
+      //           "综合布线",
+      //           "智能系统",
+      //           "智能家居"
+      //         ]
+      //       },
+      //       {
+      //         "信息技术": [
+      //           "系统集成及安全",
+      //           "软件开发",
+      //           "运维服务",
+      //           "其他"
+      //         ]
+      //       },
+      //       {
+      //         "行政办公": [
+      //           "办公家具",
+      //           "通用办公设备",
+      //           "专业设备",
+      //           "办公用品",
+      //           "生活用品"
+      //         ]
+      //       },
+      //       {
+      //         "机械设备": [
+      //           "矿山机械",
+      //           "工程机械",
+      //           "机械零部件",
+      //           "机床相关",
+      //           "车辆",
+      //           "其他机械设备"
+      //         ]
+      //       },
+      //       {
+      //         "交通工程": [
+      //           "道路",
+      //           "轨道",
+      //           "桥梁",
+      //           "隧道",
+      //           "其他"
+      //         ]
+      //       },
+      //       {
+      //         "医疗卫生": [
+      //           "设备",
+      //           "耗材",
+      //           "药品"
+      //         ]
+      //       },
+      //       {
+      //         "市政设施": [
+      //           "道路",
+      //           "绿化",
+      //           "线路管网",
+      //           "综合项目"
+      //         ]
+      //       },
+      //       {
+      //         "服务采购": [
+      //           "法律咨询",
+      //           "会计",
+      //           "物业",
+      //           "审计",
+      //           "安保",
+      //           "仓储物流",
+      //           "广告宣传印刷",
+      //           "其他"
+      //         ]
+      //       },
+      //       {
+      //         "农林牧渔": [
+      //           "生产物资",
+      //           "生产设备",
+      //           "相关服务"
+      //         ]
+      //       }
+      //     ]
+      //     _this.tablist = res.data
+      //     res.data.forEach(function(item,i) {
+      //       console.log(item[Object.keys(item)[0]])
+      //     })
+      //   },
+      //   error: function(err){
+      //     console.log(err)
+      //   }
+      // })
+    },
+    // 总全选
+    checkBoxAll:function() {
+      if(this.checkedAll){
+        this.checkedAll = false
+        // this.$refs.checkboxGroupAll.toggleAll(true);
+      }else{
+        this.checkedAll = true
+        // this.$refs.checkboxGroupAll.toggleAll(false);
+      }
+    },
+    // 模块全选
+    checkAll: function(data){
+      console.log(data)
       if(this.checked){
         this.checked = false
+        this.result = data[Object.keys(data)[0]]
+        // console.log(this.$refs.checkboxGroup)
         this.$refs.checkboxGroup.toggleAll(true);
       }else{
-        this.checked = true
         this.$refs.checkboxGroup.toggleAll(false);
+        // this.checked = true
       }
     },
     resetAll:function() {},

+ 1 - 1
src/web/staticres/collection/js/notice-mobile.js

@@ -10,7 +10,7 @@ var noticeComponent = {
     return {
       // 下拉菜单参数
       params: {
-        value: '',
+        value: 'a',
         option4: [
           { text: '有联系方式', value: 'a' },
           { text: '无联系方式', value: 'b' },

+ 10 - 1
src/web/staticres/js/track/track.js

@@ -417,6 +417,10 @@ class JyTrackUtils {
         timeCount = timeStep.length - 1
       }
       const nextTime = timeStep[timeCount]
+      if (nextTime === -1) {
+        clearTimeout(timeTn)
+        return
+      }
       timeTn = setTimeout(timeTempFn, nextTime)
       timeCount++
       typeof cb === 'function' ? cb() : null
@@ -809,7 +813,7 @@ class JyTrackRecord {
       } else if (viewTime <= 5) {
         return nextTimeInterval = 30
       } else {
-        return nextTimeInterval = 120
+        return nextTimeInterval = -1
       }
     }
     // 发送
@@ -818,6 +822,11 @@ class JyTrackRecord {
       if (!this.canTimeCache(location.href + 'sendData' + type)) {
         return
       }
+      if (nextTimeInterval === -1) {
+        console.log('stop page time')
+        clearTimeout(sendPageTn)
+        return
+      }
       // 计数
       params.count++
       params.viewtime = Math.round(this.getDiffTime() / 1000)

Plik diff jest za duży
+ 0 - 0
src/web/staticres/js/track/track.umd.min.js


Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików