Forráskód Böngészése

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

wangshan 3 éve
szülő
commit
cd25cf6aef

+ 44 - 38
src/jfw/front/swordfish.go

@@ -114,15 +114,15 @@ func (m *Front) PcAjaxReq() {
 	isPayedUser := vipStatus.IsPayedUser()
 	queryItems := vipStatus.GetQueryItems(selectType, util.Int64All(config.Sysconfig["bidSearchOldUserLimit"]))
 	if isPayedUser {
-		if currentPage > bidsearch.SearchMaxPageNum_PayUser {
-			currentPage = bidsearch.SearchMaxPageNum_PayUser
+		if currentPage > bidsearch.SearchMaxPageNum_PAYED {
+			currentPage = bidsearch.SearchMaxPageNum_PAYED
 		}
 		buyerclass = m.GetString("buyerclass")
 		hasBuyerTel, hasWinnerTel = m.GetString("buyertel"), m.GetString("winnertel")
 		notkey = m.GetString("notkey")
 	} else {
-		if currentPage > bidsearch.SearchMaxPageNum_PC {
-			currentPage = bidsearch.SearchMaxPageNum_PC
+		if currentPage > bidsearch.SearchMaxPageNum_PAYED {
+			currentPage = bidsearch.SearchMaxPageNum_PAYED
 		}
 		//时间自定义选择默认是vip 大会员 等权限
 		if len(strings.Split(publishtime, "_")) == 2 {
@@ -420,26 +420,28 @@ func (m *Front) WxsearchlistPaging() {
 	userId, _ := m.GetSession("userId").(string)
 	var list *[]map[string]interface{}
 	var secRel *[]map[string]interface{}
+	var b_word, a_word, s_word, secondFlag, secondKWS string
+	var secondList []map[string]interface{}
+	var limitFlag, hasNextPage bool
+	isLimit := 1
 	pageNum, _ := m.GetInteger("pageNum")
-	if userId != "" && pageNum <= bidsearch.SearchMaxPageNum_PAYED {
+	var keys []interface{}
+	var arrs []string
+	func() {
+		if userId == "" {
+			return
+		}
 		//历史记录和订阅查询
 		one, _ := mongodb.FindById("user", userId, `{"o_jy":1}`)
 		history := redis.GetStr("other", "s_"+userId)
-		arrs := strings.Split(history, ",")
+		arrs = strings.Split(history, ",")
 		searchvalue := strings.TrimSpace(m.GetString("searchvalue"))
-		var b_word, a_word string
-		isLimit := 1
-		limitFlag := false
-		secondKWS := ""
-		secondFlag := ""
 		isPayedUser := false
 		var secondList []map[string]interface{}
 		if searchvalue != "" {
-			filed := ""
+			filed := bidSearch_field_1
 			if pageNum == 1 {
 				filed = bidSearch_field
-			} else {
-				filed = bidSearch_field_1
 			}
 			selectType := m.GetString("selectType")
 			subtype := m.GetString("subtype")
@@ -458,13 +460,16 @@ func (m *Front) WxsearchlistPaging() {
 			isPayedUser = vipStatus.IsPayedUser()
 			queryItems := vipStatus.GetQueryItems(selectType, util.Int64All(config.Sysconfig["bidSearchOldUserLimit"]))
 			if isPayedUser {
+				if pageNum > bidsearch.SearchMaxPageNum_PAYED {
+					return
+				}
 				buyerclass = m.GetString("buyerclass")
 				hasBuyerTel, hasWinnerTel = m.GetString("buyertel"), m.GetString("winnertel")
 				notkey = m.GetString("notkey")
 			} else {
 				//免费用户最多500条数据
 				if pageNum > bidsearch.SearchMaxPageNum_WX {
-					pageNum = bidsearch.SearchMaxPageNum_WX
+					return
 				}
 				//时间自定义选择默认是vip 大会员 等权限
 				if len(strings.Split(publishtime, "_")) == 2 {
@@ -482,7 +487,6 @@ func (m *Front) WxsearchlistPaging() {
 				}
 			}
 			if isLimit == 1 {
-				s_word := ""
 				if limitFlag {
 					if pageNum == 1 {
 						list, b_word, a_word, s_word = bidsearch.GetWxsearchlistData(searchvalue, scope, publishtime, subtype, industry, minprice, maxprice, "", buyerclass, hasBuyerTel, hasWinnerTel, pageNum, public.Lst.TotalPage*bidsearch.SearchPageSize_WX, queryItems, filed, notkey)
@@ -557,38 +561,40 @@ func (m *Front) WxsearchlistPaging() {
 			}
 			redis.Del("other", "s_"+userId)
 			redis.Put("other", "s_"+userId, strings.Join(arrs, ","), -1)
+			if list != nil && len(*list) == bidsearch.SearchPageSize_WX {
+				hasNextPage = true
+			}
+			if isPayedUser && pageNum >= bidsearch.SearchMaxPageNum_PAYED {
+				hasNextPage = false
+			} else if !isPayedUser && pageNum >= bidsearch.SearchMaxPageNum_WX {
+				hasNextPage = false
+			} else if limitFlag {
+				hasNextPage = false
+			}
 		}
-		m.T["history"] = arrs
-
 		if one != nil && len(*one) > 0 {
 			o_jy, _ := (*one)["o_jy"].(map[string]interface{})
 			a_key, _ := o_jy["a_key"].([]interface{})
-			var keys []interface{}
 			for _, v := range a_key {
 				keyMap, _ := v.(map[string]interface{})
 				key, _ := keyMap["key"].([]interface{})
 				keys = append(keys, key)
 			}
-			m.T["msgset"] = keys
 		}
-		hasNextPage := list != nil && len(*list) == bidsearch.SearchPageSize_WX && pageNum < util.If(isPayedUser, bidsearch.SearchMaxPageNum_PAYED, bidsearch.SearchMaxPageNum_WX).(int)
-		if limitFlag {
-			hasNextPage = false
-		}
-		m.ServeJson(map[string]interface{}{
-			"limitFlag":     limitFlag,
-			"status":        isLimit,
-			"list":          list,
-			"hasNextPage":   hasNextPage,
-			"history":       m.T["history"],
-			"msgset":        m.T["msgset"],
-			"interceptWord": a_word,
-			"keyWord":       b_word,
-			"secondFlag":    secondFlag,
-			"secondList":    secondList,
-			"secondKWS":     secondKWS,
-		})
-	}
+	}()
+	m.ServeJson(map[string]interface{}{
+		"limitFlag":     limitFlag,
+		"status":        isLimit,
+		"list":          list,
+		"hasNextPage":   hasNextPage,
+		"history":       arrs,
+		"msgset":        keys,
+		"interceptWord": a_word,
+		"keyWord":       b_word,
+		"secondFlag":    secondFlag,
+		"secondList":    secondList,
+		"secondKWS":     secondKWS,
+	})
 }
 
 //微信端删除历史搜索

+ 1 - 1
src/jfw/modules/app/src/web/staticres/jyapp/big-member/css/analysis_result.css

@@ -358,7 +358,7 @@
     display: flex;
     align-items: center;
     justify-content: space-between;
-    padding: 5px 6px 8px;
+    padding: 5px 8px 8px;
     color: #5F5E64;
     font-size: .2rem;
     line-height: .36rem;

+ 38 - 26
src/jfw/modules/app/src/web/staticres/jyapp/big-member/js/ent_portrait.js

@@ -161,6 +161,7 @@ var vNode = {
     if (storageId && storageId !== eId) {
       sessionStorage.removeItem('winner_high_set')
       sessionStorage.removeItem('winner_high_eid')
+      sessionStorage.removeItem('is-click-set')
     }
   },
   mounted: function () {
@@ -177,35 +178,45 @@ var vNode = {
       _this.getStickyTop()
     })
   },
+  beforeUpdate: function(){
+    // console.log($('.win-analyse').length)
+    var storageClick = JSON.parse(sessionStorage.getItem('is-click-set'))
+    if ($('.win-analyse').length && $('.win-analyse').length > 0 && storageClick) {
+      this.$nextTick(function(){
+        document.querySelector('.win-analyse').scrollIntoView()
+        // sessionStorage.removeItem('is-click-set')
+      })
+    }
+  },
   watch: {
     tabActiveName: function (newVal, oldVal) {
-        var _this = this
-        if (newVal == '2') {
-            this.$nextTick(function () {
-                if (_this.gotTab2) {
-                    // 初始化图表
-                    if (_this.entPortraitInfo && _this.conf.showPortraitAll && !_this.singleTab) {
-                        _this.initChartsData();
-                    }
-                } else {
-                    if (_this.conf._4) {
-                        // 获取企业画像信息-4
-                        _this.getEntPortrait(function () {
-                            _this.initChartsData()
-                        })
-                        _this.gotTab2 = true
-                        console.log('获取企业全景分析...')
-                    }
-                    // 获取企业中标动态-13
-                    if (_this.conf._13) {
-                        // _this.getProjectNews()
-                        _this.gotTab2 = true
-                        console.log('获取企业中标动态...')
-                    }
+      var _this = this
+      if (newVal == '2') {
+        this.$nextTick(function () {
+            if (_this.gotTab2) {
+                // 初始化图表
+                if (_this.entPortraitInfo && _this.conf.showPortraitAll && !_this.singleTab) {
+                    _this.initChartsData();
                 }
-            });
-        }
-    },
+            } else {
+                if (_this.conf._4) {
+                    // 获取企业画像信息-4
+                    _this.getEntPortrait(function () {
+                        _this.initChartsData()
+                    })
+                    _this.gotTab2 = true
+                    console.log('获取企业全景分析...')
+                }
+                // 获取企业中标动态-13
+                if (_this.conf._13) {
+                    // _this.getProjectNews()
+                    _this.gotTab2 = true
+                    console.log('获取企业中标动态...')
+                }
+            }
+        });
+      }
+    }
   },
   computed: {
     // 3个权限有1个就为true(取反为3个权限1个都没有)
@@ -1163,6 +1174,7 @@ var vNode = {
       var url = this.getProjectNewsUrl()
       var reqSign = url.indexOf('subVipPortrait') === -1 ? 'bigmember' : 'svip'
       if (this.conf._4) {
+        sessionStorage.setItem('is-click-set', 1)
         location.href = './free_high_set?header=中标信息高级分析设置&eid=' + utils.getParam('eId') + '&reqSign=' + reqSign
       } else {
         this.$dialog.confirm({

+ 11 - 13
src/jfw/modules/app/src/web/staticres/jyapp/big-member/js/unit_portrayal.js

@@ -174,6 +174,15 @@ var vNode = {
           newVal.setOption(chartOptions.deformPieChart);
           newVal.resize()
         }
+      },
+      chartLoading: function (params) {
+        var storageClick = sessionStorage.getItem('is-click-set')
+        if (!params && storageClick) {
+          this.$nextTick(function(){
+            document.querySelector('.win-analyse').scrollIntoView()
+            sessionStorage.removeItem('is-click-set')
+          })
+        }
       }
     },
     created () {
@@ -191,7 +200,7 @@ var vNode = {
         
         this.getNewMsg(); // 中标动态
         this.getChartData(); // 企业画像
-        // this.init();
+        // this.init()
     },
     beforeDestroy() {
       window.removeEventListener("resize", this.init,20);
@@ -1318,19 +1327,8 @@ var vNode = {
             return maxIndex
         },
         goHighSet: function() {
+          sessionStorage.setItem('is-click-set', 1)
           location.href = './free_high_set?header=采购单位高级分析设置&entName=' + decodeURIComponent(utils.getParam('entName'))
-          // if (!this.getStatus) {
-          //   location.href = './free_high_set?header=采购单位高级分析设置&entName=' + decodeURIComponent(utils.getParam('entName'))
-          // } else {
-          //   this.$dialog.confirm({
-          //     className:'promatch',
-          //     title: '您暂无使用权限',
-          //     message: '您未购买此服务,如需使用请联系您的销售人员或客服升级套餐,谢谢!',
-          //     showCancelButton: false,
-          //     confirmButtonColor: '#2cb7ca',
-          //     confirmButtonText: '我知道了'
-          //   }).then(function () {})
-          // }
         }
     }
 }

+ 1 - 1
src/jfw/modules/app/src/web/templates/big-member/page_ent_portrait.html

@@ -222,7 +222,7 @@
             <hispro-component type="winner" :id="entInfo.id"></hispro-component>
           </div>
           <!-- 高级分析 -->
-          <div class="win-analyse">
+          <div class="win-analyse" ref="setRef">
             <span class="win-bid-title">中标分析</span>
             <div class="high-link" @click="goHighSet">
               <span>高级分析设置</span>

+ 1 - 1
src/jfw/modules/app/src/web/templates/big-member/page_free_high_set.html

@@ -69,7 +69,7 @@
           </div>
           <div class="data-container">
             <van-cell title="项目搜索范围" is-link :value="conf.scope" @click="popClick('scope')"></van-cell>
-            <van-cell title="项目地区" is-link :value="conf.area" @click="popClick('area')"></van-cell>
+            <van-cell class="area-class" title="项目地区" is-link :value="conf.area" @click="popClick('area')"></van-cell>
             <van-cell title="行业" is-link :value="conf.industry" @click="popClick('industry')"></van-cell>
           </div>
           <div class="years-container">

+ 2 - 2
src/jfw/modules/common/src/qfw/util/bidsearch/search.go

@@ -26,8 +26,8 @@ const (
 	//招标搜索分页--最大页数
 	SearchMaxPageNum_APP   = 10
 	SearchMaxPageNum_WX    = 10
-	SearchMaxPageNum_PC    = 10 //免费用户500条记录
-	SearchMaxPageNum_PAYED = 10 //付费用户5000条记录
+	SearchMaxPageNum_PC    = 10  //免费用户500条记录
+	SearchMaxPageNum_PAYED = 100 //付费用户5000条记录
 
 )
 

+ 1 - 1
src/jfw/modules/subscribepay/src/timetask/timetask.go

@@ -297,7 +297,7 @@ func checkIsExpire() {
 					},
 				})
 				if delSess != nil {
-					for _, pushColl := range []string{"pushspace", "pushspace_temp", "pushspace_vip", "pushspace_fail", "pushspace_project"} {
+					for _, pushColl := range []string{"pushspace", "pushspace_temp", "pushspace_vip", "pushspace_project"} {
 						_, err := delSess.DB("push").C(pushColl).RemoveAll(map[string]interface{}{"userid": _id})
 						if err != nil {
 							log.Println("用户", _id, "已到期删除", pushColl, "表数据出错", err)

+ 10 - 12
src/web/staticres/big-member/js/unit_portrayal.js

@@ -171,6 +171,15 @@ var vNode = {
           newVal.setOption(chartOptions.deformPieChart);
           newVal.resize()
         }
+      },
+      chartLoading: function (params) {
+        var storageClick = sessionStorage.getItem('is-click-set')
+        if (!params && storageClick) {
+          this.$nextTick(function(){
+            document.querySelector('.win-analyse').scrollIntoView()
+            sessionStorage.removeItem('is-click-set')
+          })
+        }
       }
     },
     created () {
@@ -1299,19 +1308,8 @@ var vNode = {
             return maxIndex
         },
         goHighSet: function() {
+          sessionStorage.setItem('is-click-set', 1)
           location.href = '/big/wx/page/free_high_set?header=采购单位高级分析设置&entName=' + decodeURIComponent(utils.getParam('entName'))
-          // if (!this.getStatus) {
-          //   location.href = '/big/wx/page/free_high_set?header=采购单位高级分析设置&entName=' + decodeURIComponent(utils.getParam('entName'))
-          // } else {
-          //   this.$dialog.confirm({
-          //     className:'promatch',
-          //     title: '您暂无使用权限',
-          //     message: '您未购买此服务,如需使用请联系您的销售人员或客服升级套餐,谢谢!',
-          //     showCancelButton: false,
-          //     confirmButtonColor: '#2cb7ca',
-          //     confirmButtonText: '我知道了'
-          //   }).then(function () {})
-          // }
         }
     }
 }

+ 19 - 0
src/web/staticres/common-module/big-member/js/high_set.js

@@ -83,6 +83,14 @@ var highSet = new Vue({
         this.conf.start = this.conf.end
         this.conf.end = newVal
       }
+    },
+    'conf.area': function (newVal) {
+      console.log(newVal)
+      if (newVal == '全国') {
+        $('.area-class .van-cell__value span').html('全部')
+      } else {
+        $('.area-class .van-cell__value span').html(newVal)
+      }
     }
   },
   computed: {
@@ -143,6 +151,11 @@ var highSet = new Vue({
     var header = decodeURIComponent(utils.getParam('header'))
     this.setHeaderTitle(header)
     this.getFilterApi()
+    if (this.conf.area == '全国') {
+      $('.area-class .van-cell__value span').html('全部')
+    } else {
+      $('.area-class .van-cell__value span').html(this.conf.area)
+    }
   },
   methods: {
     // 设置title
@@ -325,6 +338,11 @@ var highSet = new Vue({
       }
       this.$refs.projectAreaSelector.arrangeListMap(map)
       this.$refs.projectAreaSelector.setState(this.selectAreaList)
+      $('.area-card-item').each(function(){
+        if($(this).html() == '全国') {
+          $(this).html('全部')
+        }
+      })
     },
     // 过滤行业数据
     initProjectIndustrySelector: function (data) {
@@ -464,6 +482,7 @@ var highSet = new Vue({
       this.conf.end = new Date().getFullYear()
       this.conf.match = 0
       this.filterInitData.area = []
+      this.selectAreaList = ['全国']
       this.selectIndustryList = []
       this.selectScopeList = ['purchasing']
     }

+ 12 - 0
src/web/staticres/common-module/collection/js/ent_portrait.js

@@ -158,6 +158,7 @@ var vNode = {
     if (storageId && storageId !== eId) {
       sessionStorage.removeItem('winner_high_set')
       sessionStorage.removeItem('winner_high_eid')
+      sessionStorage.removeItem('is-click-set')
     }
 
   },
@@ -175,6 +176,16 @@ var vNode = {
       _this.getStickyTop()
     })
   },
+  beforeUpdate: function(){
+    // console.log($('.win-analyse').length)
+    var storageClick = JSON.parse(sessionStorage.getItem('is-click-set'))
+    if ($('.win-analyse').length && $('.win-analyse').length > 0 && storageClick) {
+      this.$nextTick(function(){
+        document.querySelector('.win-analyse').scrollIntoView()
+        // sessionStorage.removeItem('is-click-set')
+      })
+    }
+  },
   watch: {
     tabActiveName: function (newVal, oldVal) {
       var _this = this
@@ -1146,6 +1157,7 @@ var vNode = {
       var url = this.getProjectNewsUrl()
       var reqSign = url.indexOf('subVipPortrait') === -1 ? 'bigmember' : 'svip'
       if (this.conf._4) {
+        sessionStorage.setItem('is-click-set', 1)
         location.href = '/big/wx/page/free_high_set?header=中标信息高级分析设置&eid=' + utils.getParam('eId') + '&reqSign=' + reqSign
       } else {
         this.$dialog.confirm({

+ 15 - 0
src/web/staticres/js/message.js

@@ -77,7 +77,22 @@ function Message() {
 
                     _this.isOpened = r.data.open
                     _this.openedChange()
+                } else {
+                    $("#public-nav .iner .jynav li").bind("mouseleave",function(){
+                        $("#public-nav .iner .jynav li").find('.msg-style').hide()
+                    })
+                    $('#public-nav .iner').find('.useronline').bind("mouseleave", function () {
+                        $('#public-nav .iner .jynav li').find('.msg-style').hide()
+                    })
                 }
+            },
+            error:function () {
+                $("#public-nav .iner .jynav li").bind("mouseleave",function(){
+                    $("#public-nav .iner .jynav li").find('.msg-style').hide()
+                })
+                $('#public-nav .iner').find('.useronline').bind("mouseleave", function () {
+                    $('#public-nav .iner .jynav li').find('.msg-style').hide()
+                })
             }
         })
     }

+ 1 - 1
src/web/staticres/js/wxSupersearch.js

@@ -1103,7 +1103,7 @@ var SuperSearch = {
               // 每次数据插入,必须重置
               SuperSearch.appendListHtml(html);
               //没有下一页了||跟pc端保持一致 最多显示500条
-              if(!data.hasNextPage||SuperSearch.reqParam["pageNum"]==10){
+              if(!data.hasNextPage){
                 SuperSearch.noMoreData();
                 return;
               }

+ 1 - 1
src/web/templates/big-member/wx/page_free_high_set.html

@@ -69,7 +69,7 @@
           </div>
           <div class="data-container">
             <van-cell title="项目搜索范围" is-link :value="conf.scope" @click="popClick('scope')"></van-cell>
-            <van-cell title="项目地区" is-link :value="conf.area" @click="popClick('area')"></van-cell>
+            <van-cell class="area-class" title="项目地区" is-link :value="conf.area" @click="popClick('area')"></van-cell>
             <van-cell title="行业" is-link :value="conf.industry" @click="popClick('industry')"></van-cell>
           </div>
           <div class="years-container">