Browse Source

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

tsz 3 years ago
parent
commit
2dfdb86234
37 changed files with 364 additions and 109 deletions
  1. 16 7
      src/jfw/front/shorturl.go
  2. 28 14
      src/jfw/modules/app/src/app/front/shorturl.go
  3. 10 5
      src/jfw/modules/app/src/web/staticres/jyapp/big-member/js/ent_portrait.js
  4. 7 4
      src/jfw/modules/app/src/web/staticres/jyapp/big-member/js/unit_portrayal.js
  5. 1 1
      src/jfw/modules/app/src/web/templates/big-member/page_ent_portrait.html
  6. 1 1
      src/jfw/modules/app/src/web/templates/big-member/page_free_buyer_project_news.html
  7. 6 4
      src/jfw/modules/app/src/web/templates/big-member/page_unit_portrayal.html
  8. 1 1
      src/jfw/modules/app/src/web/templates/common/baiducc.html
  9. 53 2
      src/jfw/modules/app/src/web/templates/frontRouter/bigmember/free/perfect_info.html
  10. 4 1
      src/jfw/modules/app/src/web/templates/frontRouter/bigmember/free/perfect_info_partner.html
  11. 4 1
      src/jfw/modules/app/src/web/templates/frontRouter/bigmember/free/perfect_info_push.html
  12. 4 1
      src/jfw/modules/app/src/web/templates/frontRouter/bigmember/free/perfect_info_solution.html
  13. 4 1
      src/jfw/modules/app/src/web/templates/frontRouter/bigmember/free/perfect_info_strud.html
  14. 4 3
      src/jfw/modules/app/src/web/templates/weixin/historypush.html
  15. 1 1
      src/jfw/modules/app/src/web/templates/weixin/wxinfocontent.html
  16. 7 0
      src/jfw/modules/common/src/qfw/util/jy/jy.go
  17. 33 0
      src/web/staticres/big-member/js/rem.js
  18. 8 4
      src/web/staticres/big-member/js/unit_portrayal.js
  19. 14 12
      src/web/staticres/common-module/big-member/js/buyer_project_news.js
  20. 12 10
      src/web/staticres/common-module/big-member/js/ent_project_news.js
  21. 12 6
      src/web/staticres/common-module/collection/js/ent_portrait.js
  22. 3 2
      src/web/staticres/common-module/collection/js/index.js
  23. 29 1
      src/web/staticres/common-module/keep-tags/keep-tags-template.js
  24. 1 1
      src/web/staticres/common-module/pc-dialog/js/leave-info-dialog.js
  25. 1 1
      src/web/staticres/frontRouter/pc/bidedoc/js/index-pc.js
  26. 4 1
      src/web/staticres/frontRouter/pc/solution/js/pc-collect-solution-info.js
  27. 13 7
      src/web/staticres/js/pc-collect-bid-info.js
  28. 1 1
      src/web/staticres/js/pc-collect-partner-info.js
  29. 8 2
      src/web/staticres/js/pc-collect-user-info.js
  30. 1 1
      src/web/templates/big-member/wx/page_free_buyer_project_news.html
  31. 4 4
      src/web/templates/big-member/wx/page_unit_portrayal.html
  32. 51 2
      src/web/templates/frontRouter/wx/bigmember/free/perfect_info.html
  33. 4 1
      src/web/templates/frontRouter/wx/bigmember/free/perfect_info_partner.html
  34. 4 1
      src/web/templates/frontRouter/wx/bigmember/free/perfect_info_solution.html
  35. 4 1
      src/web/templates/frontRouter/wx/bigmember/free/perfect_info_strud.html
  36. 1 1
      src/web/templates/frontRouter/wx/collection/sess/ent_portrait.html
  37. 5 3
      src/web/templates/weixin/historypush.html

+ 16 - 7
src/jfw/front/shorturl.go

@@ -155,6 +155,13 @@ func (s *Short) Article(stype, id string) error {
 	s.T["isMember"] = isMember
 	s.T["isEntniche"] = isEntniche
 	s.T["isEntnicheNew"] = isEntnicheNew
+	node := CNode(userId)
+	var nodeStr string
+	if node {
+		nodeStr = "true"
+	} else {
+		nodeStr = "false"
+	}
 	if bm {
 		//判断有没有取关,取关的话,跳转到关于剑鱼标讯页面
 		if ssOpenid != nil && ssOpenid != "" {
@@ -199,7 +206,7 @@ func (s *Short) Article(stype, id string) error {
 		s.T["signature"] = wx.SignJSSDK(s.Site() + s.Url())
 
 		obj := wxvisitD(sid, userId, myopenid, isVip || isMember || isEntniche)
-		s.T["canRead"] = SeeDetailLimit(obj, userId, sid)
+		s.T["canRead"] = SeeDetailLimit(obj, userId, sid, node)
 		if len(obj) > 0 {
 			FieldProcessing(obj, ssOpenid, industry, id, from_userid, userId, stype, isVip || isMember || isEntniche, true)
 
@@ -266,12 +273,14 @@ func (s *Short) Article(stype, id string) error {
 		sid := sids[0]
 		indust := s.GetString("industry")
 		_, _, _, objc := pcVRT(sid, indust, isVip || isMember || isEntniche)
-		s.T["canRead"] = SeeDetailLimit(objc, userId, sid)
+
+		s.T["canRead"] = SeeDetailLimit(objc, userId, sid, node)
 		fmt.Println(s.T["canRead"])
 		if userId != "" && stype == "indexcontent" { //已登录用户直接跳转至正常三级页
 			return s.Redirect(fmt.Sprintf("/article/content/%s.html", util.CommonEncodeArticle("content", sid)))
 		}
-		catchKey := fmt.Sprintf("jypcdetail_%s_%s_%v_%v_%v", stype, sid, isVip, isEntniche, isMember)
+
+		catchKey := fmt.Sprintf("jypcdetail_%s_%s_%s_%v_%v_%v_%s", userId, stype, sid, isVip, isEntniche, isMember, nodeStr)
 		//缓存读取
 		if res := redis.Get("other", catchKey); res == nil || res == "" {
 			industry := s.GetString("industry")
@@ -412,13 +421,13 @@ func CNode(userId string) bool {
 }
 
 //查看公告详情次数限制
-func SeeDetailLimit(obj map[string]interface{}, userId, sid string) bool {
+func SeeDetailLimit(obj map[string]interface{}, userId, sid string, node bool) bool {
 	watchKey := fmt.Sprintf("article_count_%d_%s_%d_%s", time.Now().Year(), time.Now().Month(), time.Now().Day(), userId)
 	if strings.Contains(obj["subtype"].(string), "拟建") || strings.Contains(obj["subtype"].(string), "采购意向") {
 		return false
 	} else {
 		//检验是否留资
-		if CNode(userId) {
+		if node {
 			return true
 		}
 		if seeRes := redis.Get("other", watchKey); seeRes != nil && seeRes != "" {
@@ -429,7 +438,7 @@ func SeeDetailLimit(obj map[string]interface{}, userId, sid string) bool {
 					sidss = append(sidss, sid)
 					arrs := RemoveDuplicatesAndEmpty(sidss)
 					newVal := strings.Join(arrs, "_")
-					redis.Put("other", watchKey, newVal, 60*60*24)
+					redis.Put("other", watchKey, newVal, jy.GetExpire())
 					return true
 				} else {
 					for _, v := range sidss {
@@ -441,7 +450,7 @@ func SeeDetailLimit(obj map[string]interface{}, userId, sid string) bool {
 				}
 			}
 		} else {
-			redis.Put("other", watchKey, sid, 60*60*24)
+			redis.Put("other", watchKey, sid, jy.GetExpire())
 			return true
 		}
 	}

+ 28 - 14
src/jfw/modules/app/src/app/front/shorturl.go

@@ -4,26 +4,25 @@ import (
 	"database/sql"
 	"fmt"
 	"jfw/config"
-	"qfw/util/elastic"
 	"strconv"
 	"strings"
 	"time"
 
 	//"math/rand"
 	. "app/jyutil"
-	"github.com/go-xweb/xweb"
 	"jfw/public"
 	"log"
 	"qfw/util"
 	"qfw/util/jy"
 	"qfw/util/redis"
+
+	"github.com/go-xweb/xweb"
 )
 
 type Short struct {
 	*xweb.Action
 	article     xweb.Mapper `xweb:"/jyapp/article/(\\w+)/(.*).html"` //([pm])
 	replication xweb.Mapper `xweb:"/jyapp/shorturl/replication"`     //用户复制操作记录入库
-
 }
 
 func init() {
@@ -72,10 +71,6 @@ func (s *Short) Article(stype, id string) error {
 	if strings.Contains(obj["subtype"].(string), "拟建") || strings.Contains(obj["subtype"].(string), "采购意向") {
 		s.T["canRead"] = false
 	} else {
-		//检验是否留资
-		if CNode(userId) {
-			s.T["canRead"] = true
-		}
 		if seeRes := redis.Get("other", watchKey); seeRes != nil && seeRes != "" {
 			if resVal, _ := seeRes.(string); resVal != "" {
 				sidss := strings.Split(resVal, "_")
@@ -85,7 +80,7 @@ func (s *Short) Article(stype, id string) error {
 					sidss = append(sidss, sid)
 					arrs := RemoveDuplicatesAndEmpty(sidss)
 					newVal := strings.Join(arrs, "_")
-					redis.Put("other", watchKey, newVal, 60*60*24)
+					redis.Put("other", watchKey, newVal, jy.GetExpire())
 				} else {
 					s.T["canRead"] = false
 					for _, v := range sidss {
@@ -97,7 +92,11 @@ func (s *Short) Article(stype, id string) error {
 				}
 			}
 		} else {
-			redis.Put("other", watchKey, sid, 60*60*24)
+			redis.Put("other", watchKey, sid, jy.GetExpire())
+			s.T["canRead"] = true
+		}
+		//检验是否留资
+		if CNode(userId) {
 			s.T["canRead"] = true
 		}
 	}
@@ -126,12 +125,27 @@ func (s *Short) Article(stype, id string) error {
 		obj["ucbsId"] = util.EncodeArticleId2ByCheck("ucbs#" + userId + "#" + id)
 		if obj["entidlist"] != nil { //大会员中标企业跳转至画像
 			if winner := util.ObjToString(obj["winner"]); winner != "" {
-				//临时更改为企业名称查询企业id
-				rData := elastic.Get("qyxy", "qyxy", fmt.Sprintf(`{"query":{"bool":{"should":[{"term":{"company_name":"%s"}},{"term":{"hname":"%s"}}],"minimum_should_match":1}},"_source":["name","_id","capital","company_phone"],"size":1}`, winner, winner))
-				if rData != nil && len(*rData) == 1 {
-					if entId := util.ObjToString((*rData)[0]["_id"]); entId != "" {
-						obj["entId"] = util.EncodeArticleId2ByCheck(util.ObjToString((*rData)[0]["_id"]))
+				s_winner := util.ObjToString(obj["s_winner"])
+				idObjs, _ := obj["entidlist"].([]interface{})
+				winnerId := ""
+				if names := strings.Split(s_winner, ","); len(names) > 1 {
+					index := 0
+					for i := 0; i < len(names); i++ {
+						if names[i] == winner {
+							index = i
+							break
+						}
+					}
+					if len(idObjs) > index {
+						winnerId = util.ObjToString(idObjs[index])
 					}
+				} else { //中标企业仅一个
+					if len(idObjs) > 0 {
+						winnerId = util.ObjToString(idObjs[0])
+					}
+				}
+				if winnerId != "" && winnerId != "-" {
+					obj["entId"] = util.EncodeArticleId2ByCheck(winnerId)
 				}
 			}
 		}

+ 10 - 5
src/jfw/modules/app/src/web/staticres/jyapp/big-member/js/ent_portrait.js

@@ -502,13 +502,18 @@ var vNode = {
     },
     //数据导出
     onExport(){
-      // var isMember = this.bigStatus > 0 && this.power.indexOf(5) > -1
+      var _this = this
+      var storageSet = JSON.parse(sessionStorage.getItem('winner_high_set'))
+      var data = {
+        entId: this.entInfo.id,
+        pageNum: 1,
+        pageSize: this.topProject.pageSize
+      }
+      var reqSign = url.indexOf('subVipPortrait') === -1 ? 'bigmember' : 'svip'
       $.ajax({
         type:'POST',
-        url: '/bigmember/portrait/winner/winnerNewMsgExport',
-        data:  {
-          entId: this.entInfo.id,
-        },
+        url: '/bigmember/portrait/' + (reqSign === 'svip' ? 'subVipPortrait' : 'winner') + '/winnerNewMsgExport',
+        data: storageSet ? Object.assign(data, storageSet) : data,
         timeout: 8000,
         success:function(res) {
           window.location.href = "/jyapp/front/dataExport/toCreateOrderPage?id=" + res.data

+ 7 - 4
src/jfw/modules/app/src/web/staticres/jyapp/big-member/js/unit_portrayal.js

@@ -489,13 +489,16 @@ var vNode = {
         },
         //数据导出
         onExport(){
-            // var isMember = this.bigStatus > 0 && this.power.indexOf(5) > -1
+          var storageSet = JSON.parse(sessionStorage.getItem('buyer_high_set'))
+          // var isMember = this.bigStatus > 0 && this.power.indexOf(5) > -1
+          var data = {
+            buyer: decodeURIComponent(utils.getParam('entName')),
+            pageNum: 1
+          }
             $.ajax({
                 type:'POST',
                 url: '/bigmember/portrait/buyer/getNewMsgExport',
-                data:  {
-                    buyer: this.buyer.name,
-                },
+                data: storageSet ? Object.assign(data, storageSet) : data,
                 timeout: 8000,
                 success:function(res) {
                     window.location.href = "/jyapp/front/dataExport/toCreateOrderPage?id=" + res.data

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

@@ -474,7 +474,7 @@
                   </div>
                 </li>
                 <li class="show-more clickable"
-                    v-if="topProject.showGetNextButton && isMemberAndSvip && topProject.count > 3"
+                    v-if="topProject.showGetNextButton && (isMemberAndSvip || canFreeTrial) && topProject.count > 3"
                     @click="goToFilterProjectNews">查看更多
                 </li>
               </ul>

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

@@ -250,7 +250,7 @@
                             :key="item.id">
                             <div class="head-group">
                               <div class="project-name">${ item.title }</div>
-                              <span class="icon weishoucang" :class="idx.indexOf(item.id) >-1 ? 'shoucang' : 'weishoucang'" @click.stop="addKeepStatus(item)"></span>
+                              <span :data-id="item.id" class="icon" :class="idx.indexOf(item.id) >-1 ? 'shoucang' : 'weishoucang'" @click.stop="addKeepStatus(item)"></span>
                             </div>
                             <div class="project-info">
                                 <span class="tags">

+ 6 - 4
src/jfw/modules/app/src/web/templates/big-member/page_unit_portrayal.html

@@ -460,9 +460,10 @@
                               <div class="progress-bar-item" >
                                   <div class="item-label">
                                       <span class="item-name">${item.business?item.business:"--"}</span>
-                                      <span class="item-count">${item.total}个</span>
-                                       <span class="item-rate">${item.rate?(item.rate * 100).toFixed(2)+"%":"--"}</span>
-                                      <span class="item-time">${item.lastTime}</span>
+                                    <span class="item-count">${item.total}个</span>
+                                    <span v-if="item.rate == 0" class="item-rate">0%</span>
+                                    <span v-else class="item-rate">${item.rate?(item.rate * 100).toFixed(2)+"%":"--"}</span>
+                                    <span class="item-time">${item.lastTime}</span>
                                   </div>
                                   <div class="item-progress">
                                       <span class="item-money"  v-if="item.amount > 0">中标金额:${utils.moneyUnit(item.amount)}</span>
@@ -490,7 +491,8 @@
                                   <div class="item-label">
                                       <span class="item-name">${item.business?item.business:"--"}</span>
                                       <span class="item-count">${item.total}个</span>
-                                       <span class="item-rate">${item.rate?(item.rate * 100).toFixed(2)+"%":"--"}</span>
+                                    <span v-if="item.rate == 0" class="item-rate">0%</span>
+                                    <span v-else class="item-rate">${item.rate?(item.rate * 100).toFixed(2)+"%":"--"}</span>
                                       <span class="item-time">${item.lastTime}</span>
                                   </div>
                                   <div class="item-progress">

+ 1 - 1
src/jfw/modules/app/src/web/templates/common/baiducc.html

@@ -35,7 +35,7 @@ function adv_statistics(e){
        JyObj.openExternalLink($(e).find("a").attr("ad_link"),ad_title);
     }
     if ($(e).find("a").attr("openurl")!=undefined){//app三级页调用打开方法
-      $.post('/salesLeads/retainedCapital', { source: 'article_original' }).done(function (r) {
+      $.post('/salesLeads/retainedCapital'+ '?source=article_original').done(function (r) {
         // 判断当前信息否在其他页面留资  如果全部留资 直接弹窗提交成功
         var checkKeys = ['name', 'phone', 'company', 'branch', 'position']
         var result = checkRequiredKeys(checkKeys, r.info)

+ 53 - 2
src/jfw/modules/app/src/web/templates/frontRouter/bigmember/free/perfect_info.html

@@ -1223,10 +1223,22 @@
         },
         ajaxGetEchoInfo() {
           this.isEchoInfoLoading = true
-          this.ajaxFn('/salesLeads/echoInfo', {}, function (r) {
+          this.ajaxFn('/salesLeads/retainedCapital' + '?source=' + this.ajaxParams.source, {}, function (r) {
             this.isEchoInfoLoading = false
+            if (r && r.info) {
+              r.data = r.info
+            }
             if (r && r.error_msg === '' && r.data) {
               this.setEchoInfo(r.data)
+              var result = checkRequiredKeys(['name', 'phone', 'company', 'position', 'branch'], r.data)
+              if (result) {
+                var skipAuto = ['jyarticle_see3', 'article_collection', 'article_original', 'jypush_see10']
+                var _this = this
+                var canAuto = !skipAuto.some(function (v) {
+                  return _this.ajaxParams.source.indexOf(v) > -1
+                })
+                this.submitForm(canAuto)
+              }
             }
           })
         },
@@ -1511,7 +1523,7 @@
             history.back()
           })
         },
-        submitForm() {
+        submitForm(auto) {
           this.bigDocAjax('ICRW') // 提交留资埋点引导语
           this.ajaxParams.name = this.infoMap.name
           this.ajaxParams.phone = this.infoMap.phone
@@ -1533,6 +1545,7 @@
           this.ajaxFn('/salesLeads/collectInfo', this.ajaxParams, function (r) {
             if (r) {
               loading.clear()
+
               var source = _this.ajaxParams.source || utils.getParam('source')
               if (r.error_msg === '') {
                 switch (source) {
@@ -1544,6 +1557,38 @@
                     _this.bidShow = true
                     break
                   }
+                  case 'jyarticle_see3_plus_wx': {
+                    _this.showToast('提交成功')
+                    setTimeout(function () {
+                      sessionStorage.setItem('salesBackStatus', 'true')
+                      history.back()
+                    }, 1500)
+                    break
+                  }
+                  case 'jyarticle_see3_plus_app': {
+                    _this.showToast('提交成功')
+                    setTimeout(function () {
+                      sessionStorage.setItem('salesBackStatus', 'true')
+                      history.back()
+                    }, 1500)
+                    break
+                  }
+                  case 'jypush_see10_plus_wx': {
+                    _this.showToast('提交成功')
+                    setTimeout(function () {
+                      sessionStorage.setItem('salesBackStatus', 'true')
+                      history.back()
+                    }, 1500)
+                    break
+                  }
+                  case 'jypush_see10_plus_app': {
+                    _this.showToast('提交成功')
+                    setTimeout(function () {
+                      sessionStorage.setItem('salesBackStatus', 'true')
+                      history.back()
+                    }, 1500)
+                    break
+                  }
                   default: {
                     var message = ''
                     if (source) {
@@ -1572,6 +1617,12 @@
                       }
                       message = text ? '恭喜您,成功解锁【' + text + '】权益1次。如需查看更多,请开通超级订阅,为您提供最新的商业情报,抢占先机。' :
                         '您的申请已提交,我们会尽快联系您并预约演示时间,请耐心等待~您将获得免费体验大会员全部功能!'
+                      // 自动留资跳转
+                      if (text && auto) {
+                        sessionStorage.setItem('salesBackStatus', 'true')
+                        history.back()
+                        return
+                      }
                     }
 
 

+ 4 - 1
src/jfw/modules/app/src/web/templates/frontRouter/bigmember/free/perfect_info_partner.html

@@ -160,8 +160,11 @@
       ajaxGetEchoInfo() {
         this.isEchoInfoLoading = true
         let _this = this
-        this.ajaxFn('/salesLeads/echoInfo', {}, function (r) {
+        this.ajaxFn('/salesLeads/retainedCapital' + '?source=' + this.ajaxParams.source, {}, function (r) {
           this.isEchoInfoLoading = false
+          if (r && r.info) {
+            r.data = r.info
+          }
           if (r && r.error_msg === '' && r.data) {
             if(r.data.phone != '') {
               _this.vercodecor = true

+ 4 - 1
src/jfw/modules/app/src/web/templates/frontRouter/bigmember/free/perfect_info_push.html

@@ -302,8 +302,11 @@
       },
       ajaxGetEchoInfo() {
         this.isEchoInfoLoading = true
-        this.ajaxFn('/salesLeads/echoInfo', {}, function (r) {
+        this.ajaxFn('/salesLeads/retainedCapital' + '?source=' + this.ajaxParams.source, {}, function (r) {
           this.isEchoInfoLoading = false
+          if (r && r.info) {
+            r.data = r.info
+          }
           if (r && r.error_msg === '' && r.data) {
             this.setEchoInfo(r.data)
           }

+ 4 - 1
src/jfw/modules/app/src/web/templates/frontRouter/bigmember/free/perfect_info_solution.html

@@ -316,8 +316,11 @@
       ajaxGetEchoInfo() {
         this.isEchoInfoLoading = true
         let _this = this
-        this.ajaxFn('/salesLeads/echoInfo', {}, function (r) {
+        this.ajaxFn('/salesLeads/retainedCapital' + '?source=' + this.ajaxParams.source, {}, function (r) {
           this.isEchoInfoLoading = false
+          if (r && r.info) {
+            r.data = r.info
+          }
           if (r && r.error_msg === '' && r.data) {
             this.setEchoInfo(r.data)
           }

+ 4 - 1
src/jfw/modules/app/src/web/templates/frontRouter/bigmember/free/perfect_info_strud.html

@@ -422,8 +422,11 @@
       ajaxGetEchoInfo() {
         this.isEchoInfoLoading = true
         let _this = this
-        this.ajaxFn('/salesLeads/echoInfo', {}, function (r) {
+        this.ajaxFn('/salesLeads/retainedCapital' + '?source=' + this.ajaxParams.source, {source: this.ajaxParams.source}, function (r) {
           this.isEchoInfoLoading = false
+          if (r && r.info) {
+            r.data = r.info
+          }
           if (r && r.error_msg === '' && r.data) {
             if(r.data.phone != '') {
               _this.vercodecor = true

+ 4 - 3
src/jfw/modules/app/src/web/templates/weixin/historypush.html

@@ -736,6 +736,7 @@
 //   是否需要留资
   function isNeedSales (callback) {
       $.ajax({
+          type: 'GET',
           url: '/salesLeads/retainedCapital',
           data: { source: 'jypush_see10_plus_app' },
           async: false,
@@ -1658,9 +1659,9 @@ function hasNoData() {
             // 说明未收藏,点击收藏
             if (vKeepComponent) {
                 vKeepComponent.changeBid(id, !shoucang)
-                if(listnum < 100) {
-                    vKeepComponent.changeKeepStatus(!shoucang, _this)
-                }
+                // if(listnum < 100) {
+                //     vKeepComponent.changeKeepStatus(!shoucang, _this)
+                // }
             }
         })
   }

+ 1 - 1
src/jfw/modules/app/src/web/templates/weixin/wxinfocontent.html

@@ -2712,7 +2712,7 @@
     function isReservedInfo(callback){
       $.ajax({
         url: '/salesLeads/retainedCapital',
-        type: 'POST',
+        type: 'GET',
         timeout: 5000,
         data: {
           source: 'article_attach_freeuser'

+ 7 - 0
src/jfw/modules/common/src/qfw/util/jy/jy.go

@@ -466,3 +466,10 @@ func DelUnlimitSessionId(sessid, userid string) []string {
 	}
 	return newArr
 }
+
+//获取当天结束时间 单位秒
+func GetExpire() int {
+	t, _ := time.ParseInLocation(util.Date_Short_Layout, time.Now().AddDate(0, 0, 1).Format(util.Date_Short_Layout), time.Local)
+	t2, _ := time.ParseInLocation(util.Date_Full_Layout, time.Now().Format(util.Date_Full_Layout), time.Local)
+	return int(t.Unix() - t2.Unix())
+}

+ 33 - 0
src/web/staticres/big-member/js/rem.js

@@ -11,3 +11,36 @@
 	win.addEventListener(resizeEvt, recalc, false);
 	doc.addEventListener('DOMContentLoaded', recalc, false);
 })(document, window);
+/**
+ * 根据keys校验object必填项
+ * @param {Array} keys - 待校验字段keys
+ * @param {Object} target - 待校验object
+ * @returns {boolean} - 是否通过
+ */
+function checkRequiredKeys (keys, target) {
+  try {
+    // 职位/部门特殊处理, 满足时移除部门校验
+    if (keys.indexOf('branch') !== -1 && keys.indexOf('position') !== -1) {
+      if (target['position'] === '总裁' || target['position'] === '总经理') {
+        keys.splice(keys.indexOf('branch'), 1)
+      }
+    }
+    return !keys.some(function (k) {
+      var tempValue = target[k]
+      var result = false
+      if (typeof tempValue === 'number') {
+        tempValue = tempValue.toString()
+      }
+      if (typeof tempValue === 'string') {
+        result = tempValue.trim() !== ''
+      }
+      if (typeof tempValue === 'boolean') {
+        result = true
+      }
+      return !result
+    })
+  } catch (e) {
+    console.warn(e)
+    return false
+  }
+}

+ 8 - 4
src/web/staticres/big-member/js/unit_portrayal.js

@@ -484,16 +484,20 @@ var vNode = {
         },
         //数据导出
         onExport(){
+          var storageSet = JSON.parse(sessionStorage.getItem('buyer_high_set'))
+          var data = {
+            buyer: decodeURIComponent(utils.getParam('entName')),
+            pageNum: 1
+          }
         // var isMember = this.bigStatus > 0 && this.power.indexOf(5) > -1
         $.ajax({
           type:'POST',
           url: '/bigmember/portrait/buyer/getNewMsgExport',
-          data:  {
-            buyer: this.buyer.name,
-          },
+          data: storageSet ? Object.assign(data, storageSet) : data,
           timeout: 8000,
           success:function(res) {
-            window.location.href = "/jyapp/front/dataExport/toCreateOrderPage?id=" + res.data
+            var isWeiXinBrowser = navigator.userAgent.toLowerCase().indexOf('micromessenger') !== -1
+            window.location.href = (isWeiXinBrowser ? '/front/wx_dataExport/submitOrder' : '/jyapp/front/dataExport/toCreateOrderPage') + "?id=" + res.data
             // /jyapp/front/dataExport/toCreateOrderPage
             // if(res.error_code == 0) {
             // } else {

+ 14 - 12
src/web/staticres/common-module/big-member/js/buyer_project_news.js

@@ -165,17 +165,19 @@ var vConfig = {
         },
         //数据导出
         onExport(){
-          // var isMember = this.info.bigStatus > 0 && this.info.power.indexOf(5) > -1
-          var params = {
-            buyer: this.entInfo.buyerName,
+          var storageSet = JSON.parse(sessionStorage.getItem('buyer_high_set'))
+          var data = {
+            buyer: decodeURIComponent(utils.getParam('entName')),
+            pageNum: 1
           }
           $.ajax({
             type:'POST',
             url: '/bigmember/portrait/buyer/getNewMsgExport' ,
-            data:  params,
+            data: storageSet ? Object.assign(data, storageSet) : data,
             timeout: 8000,
             success:function(res) {
-              window.location.href = "/jyapp/front/dataExport/toCreateOrderPage?id=" + res.data
+              var isWeiXinBrowser = navigator.userAgent.toLowerCase().indexOf('micromessenger') !== -1
+              window.location.href = (isWeiXinBrowser ? '/front/wx_dataExport/submitOrder' : '/jyapp/front/dataExport/toCreateOrderPage') + "?id=" + res.data
             },
             error:function(err) {
               console.log(err)
@@ -206,7 +208,7 @@ var vConfig = {
           url: '/publicapply/bidcoll/isColl',
           type: 'POST',
           data: {
-            bids: _this.list.join(',')
+            bids: _this.listState.list.map(function (v) { return v.id }).join(',')
           }
         }).done(function (r) {
           if (r && r.data) {
@@ -318,9 +320,9 @@ var vConfig = {
                     item.winner = item.winner[0]
                   }
                 })
-                _this.colList.forEach((val)=>{
-                  _this.list.push(val.id)
-                })
+                // _this.colList.forEach((val)=>{
+                //   _this.list.push(val.id)
+                // })
               } else {
                 _this.$toast('请求失败')
               }
@@ -370,9 +372,9 @@ var vConfig = {
                         //         item.winner = item.winner[0]
                         //     }
                         // })
-                        // _this.colList.forEach((val)=>{
-                        //   _this.list.push(val.id)
-                        // })
+                      list.forEach((val)=>{
+                          _this.list.push(val.id)
+                        })
                         var count = res.data.count
                         if (Array.isArray(list)) {
                             _this.preSortList(list)

+ 12 - 10
src/web/staticres/common-module/big-member/js/ent_project_news.js

@@ -257,14 +257,16 @@ var vConfig = {
         },
         //数据导出
         onExport(){
-          // var isMember = this.info.bigStatus > 0 && this.info.power.indexOf(5) > -1
-          var params = {
+          var storageSet = JSON.parse(sessionStorage.getItem('winner_high_set'))
+          var data = {
             entId: this.entInfo.eid,
+            pageNum: 1,
+            pageSize: this.listState.pageSize
           }
           $.ajax({
             type:'POST',
-            url: '/bigmember/portrait/winner/winnerNewMsgExport' ,
-            data:  params,
+            url: '/bigmember/portrait/' + (this.reqSign === 'svip' ? 'subVipPortrait' : 'winner') + '/winnerNewMsgExport' ,
+            data: storageSet ? Object.assign(data, storageSet) : data,
             timeout: 8000,
             success:function(res) {
               window.location.href = "/jyapp/front/dataExport/toCreateOrderPage?id=" + res.data
@@ -341,9 +343,9 @@ var vConfig = {
                   item.winner = item.winner[0]
                 }
               })
-              _this.colList.forEach((val)=>{
-                _this.list.push(val.id)
-              })
+              // _this.colList.forEach((val)=>{
+              //   _this.list.push(val.id)
+              // })
               } else {
                 _this.$toast('请求失败')
               }
@@ -393,9 +395,9 @@ var vConfig = {
                         //     item.winner = item.winner[0]
                         //   }
                         // })
-                        // _this.colList.forEach((val)=>{
-                        //   _this.list.push(val.id)
-                        // })
+                        list.forEach((val)=>{
+                          _this.list.push(val.id)
+                        })
                         var count = res.data.count
                         if (Array.isArray(list)) {
                             _this.preSortList(list)

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

@@ -520,16 +520,22 @@ var vNode = {
     },
     //数据导出
     onExport(){
-      // var isMember = this.bigStatus > 0 && this.power.indexOf(5) > -1
+      var _this = this
+      var storageSet = JSON.parse(sessionStorage.getItem('winner_high_set'))
+      var data = {
+        entId: this.entInfo.id,
+        pageNum: 1,
+        pageSize: this.topProject.pageSize
+      }
+      var reqSign = url.indexOf('subVipPortrait') === -1 ? 'bigmember' : 'svip'
       $.ajax({
         type:'POST',
-        url: '/bigmember/portrait/winner/winnerNewMsgExport',
-        data:  {
-          entId: this.entInfo.id,
-        },
+        url: '/bigmember/portrait/' + (reqSign === 'svip' ? 'subVipPortrait' : 'winner') + '/winnerNewMsgExport',
+        data: storageSet ? Object.assign(data, storageSet) : data,
         timeout: 8000,
         success:function(res) {
-          window.location.href = "/jyapp/front/dataExport/toCreateOrderPage?id=" + res.data
+          var isWeiXinBrowser = navigator.userAgent.toLowerCase().indexOf('micromessenger') !== -1
+          window.location.href = (isWeiXinBrowser ? '/front/wx_dataExport/submitOrder' : '/jyapp/front/dataExport/toCreateOrderPage') + "?id=" + res.data
           // /jyapp/front/dataExport/toCreateOrderPage
           // if(res.error_code == 0) {
           // } else {

+ 3 - 2
src/web/staticres/common-module/collection/js/index.js

@@ -471,7 +471,8 @@ var vNode = {
           },
           success: function(res) {
             if(res.error_code == 0 && res.data) {
-              location.href = '/jyapp/front/dataExport/toCreateOrderPage?id=' + res.data._id + '&source=d&payway=&dataspec='
+              var isWeiXinBrowser = navigator.userAgent.toLowerCase().indexOf('micromessenger') !== -1
+              location.href = (isWeiXinBrowser ? '/front/wx_dataExport/submitOrder' : '/jyapp/front/dataExport/toCreateOrderPage') + '?id=' + res.data._id + '&source=d&payway=&dataspec='
             }
           }
         })
@@ -479,4 +480,4 @@ var vNode = {
     }
   }
 }
-var myCollection = new Vue(vNode)
+var myCollection = new Vue(vNode)

+ 29 - 1
src/web/staticres/common-module/keep-tags/keep-tags-template.js

@@ -407,7 +407,7 @@ Vue.component('keep-component', {
         _this.ajaxAddKeepFn(id, type)
       }
       if (type) {
-        $.post('/salesLeads/retainedCapital', { source: 'article_collection' }).done(function (r) {
+        $.post('/salesLeads/retainedCapital' + '?source=article_collection', { source: 'article_collection' }).done(function (r) {
           var checkKeys = ['name', 'phone', 'company', 'mail', 'branch', 'position']
           var result = checkRequiredKeys(checkKeys, r.info)
           // 判断当前信息否在其他页面留资  如果全部留资 直接弹窗提交成功
@@ -573,6 +573,34 @@ Vue.component('keep-component', {
     }
   }
 })
+function checkRequiredKeys (keys, target) {
+  try {
+    // 职位/部门特殊处理, 满足时移除部门校验
+    if (keys.indexOf('branch') !== -1 && keys.indexOf('position') !== -1) {
+      if (target['position'] === '总裁' || target['position'] === '总经理') {
+        keys.splice(keys.indexOf('branch'), 1)
+      }
+    }
+    return !keys.some(function (k) {
+      var tempValue = target[k]
+      var result = false
+      if (typeof tempValue === 'number') {
+        tempValue = tempValue.toString()
+      }
+      if (typeof tempValue === 'string') {
+        result = tempValue.trim() !== ''
+      }
+      if (typeof tempValue === 'boolean') {
+        result = true
+      }
+      return !result
+    })
+  } catch (e) {
+    console.warn(e)
+    return false
+  }
+}
+
 // 检查返回是否需要继续下一步
 function checkBackSuccess () {
   var isBackSuccess = sessionStorage.getItem('salesBackStatus') || false

+ 1 - 1
src/web/staticres/common-module/pc-dialog/js/leave-info-dialog.js

@@ -434,7 +434,7 @@ var vm = new Vue({
       this.logAjax(source)
       var _this = this
       $.ajax({
-        type:'POST',
+        type:'GET',
         url:'/salesLeads/retainedCapital',
         data: {
           source: source

+ 1 - 1
src/web/staticres/frontRouter/pc/bidedoc/js/index-pc.js

@@ -72,7 +72,7 @@ var vm = new Vue({
     isNeedSubmit: function() {
       var _this = this
       $.ajax({
-        type:'POST',
+        type:'GET',
         url:'/salesLeads/retainedCapital',
         data: {
           source: _this.source

+ 4 - 1
src/web/staticres/frontRouter/pc/solution/js/pc-collect-solution-info.js

@@ -152,6 +152,9 @@ var vmSolution = new Vue({
     }
     // 新增部门必填
     var validBranch = function(rule,value,callback) {
+      if (!vmSolution.showBranch) {
+        return callback()
+      }
       if(value === '') {
         return callback(new Error('部门不能为空'));
       } else {
@@ -324,7 +327,7 @@ var vmSolution = new Vue({
       this.source = source
       var _this = this
       $.ajax({
-        type:'POST',
+        type:'GET',
         url:'/salesLeads/retainedCapital',
         data: {
           source: source

+ 13 - 7
src/web/staticres/js/pc-collect-bid-info.js

@@ -35,10 +35,10 @@ var temps = `
                 </div>
                 <div class="long-control" style="position: relative;">
                   <el-form-item label="公司名称 :" prop="companyName">
-                    <el-input 
-                    v-model.trim="form.companyName" 
+                    <el-input
+                    v-model.trim="form.companyName"
                     data-long-input
-                    class=" company-name" 
+                    class=" company-name"
                     @focus="companyFocus"
                     @input="searchCompany"
                     placeholder="请输入公司名称">
@@ -279,7 +279,7 @@ var vmbid = new Vue({
             if (!dom.contains((e.target))) {
               that.showSearchResult = false
             }
-        } 
+        }
     })
   },
   beforeDestroy() {
@@ -334,7 +334,7 @@ var vmbid = new Vue({
       this.source = source
       var _this = this
       $.ajax({
-        type:'POST',
+        type:'GET',
         url:'/salesLeads/retainedCapital',
         data: {
           source: source
@@ -406,11 +406,17 @@ var vmbid = new Vue({
       var _this = this
       $.ajax({
         type:'POST',
-        url:'/salesLeads/echoInfo?t=' + Date.now(),
+        url:'/salesLeads/retainedCapital?t=' + Date.now(),
+        data: {
+          source: _this.source
+        },
         success:function (res) {
+          if (res && res.info) {
+            res.data = res.info
+          }
           if (res.data) {
             _this.form.name = res.data.name ? res.data.name : ''
-            _this.form.phone = res.data.phone ? res.data.phone : '' 
+            _this.form.phone = res.data.phone ? res.data.phone : ''
             _this.form.companyName = res.data.company ? res.data.company : ''
             _this.form.branch = res.data.branch || ''
             if (res.data.position) {

+ 1 - 1
src/web/staticres/js/pc-collect-partner-info.js

@@ -257,7 +257,7 @@ var vmPartner = new Vue({
       var _this = this
       $.ajax({
         type:'POST',
-        url:'/salesLeads/retainedCapital',
+        url:'/salesLeads/retainedCapital' + '?source=' + source,
         data: {
           source: source
         },

+ 8 - 2
src/web/staticres/js/pc-collect-user-info.js

@@ -539,7 +539,7 @@ var vm = new Vue({
       var _this = this
 
       $.ajax({
-        type:'POST',
+        type:'GET',
         url:'/salesLeads/retainedCapital',
         data: {
           source: source
@@ -716,8 +716,14 @@ var vm = new Vue({
       var _this = this
       $.ajax({
         type:'POST',
-        url:'/salesLeads/echoInfo?t=' + Date.now(),
+        url:'/salesLeads/retainedCapital?t=' + Date.now(),
+        data: {
+          source: _this.source
+        },
         success:function (res) {
+          if (res && res.info) {
+            res.data = res.info
+          }
           if (res.data) {
             _this.form.name = res.data.name ? res.data.name : ''
             _this.form.phone = res.data.phone ? res.data.phone : ''

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

@@ -245,7 +245,7 @@
                         :key="item.id">
                         <div class="head-group">
                           <div class="project-name">${ item.title }</div>
-                          <span class="icon weishoucang" :class="idx.indexOf(item.id) >-1 ? 'shoucang' : 'weishoucang'" @click.stop="addKeepStatus(item)"></span>
+                          <span class="icon" :class="idx.indexOf(item.id) >-1 ? 'shoucang' : 'weishoucang'" @click.stop="addKeepStatus(item)"></span>
                         </div>
                         <div class="project-info">
                             <span class="tags">

+ 4 - 4
src/web/templates/big-member/wx/page_unit_portrayal.html

@@ -608,8 +608,8 @@
                       <div class="item-label">
                         <span class="item-name">${item.business?item.business:"--"}</span>
                         <span class="item-count">${item.total}个</span>
-                        <span class="item-rate">${item.rate?(item.rate * 100).toFixed(2)+"%":"--"}</span>
-                        <span class="item-time">${item.lastTime}</span>
+                        <span v-if="item.rate == 0" class="item-rate">0%</span>
+                        <span v-else class="item-rate">${item.rate?(item.rate * 100).toFixed(2)+"%":"--"}</span>                        <span class="item-time">${item.lastTime}</span>
                       </div>
                       <div class="item-progress">
                         <span class="item-money"  v-if="item.amount > 0">中标金额:${utils.moneyUnit(item.amount)}</span>
@@ -637,8 +637,8 @@
                       <div class="item-label">
                         <span class="item-name">${item.business?item.business:"--"}</span>
                         <span class="item-count">${item.total}个</span>
-                        <span class="item-rate">${item.rate?(item.rate * 100).toFixed(2)+"%":"--"}</span>
-                        <span class="item-time">${item.lastTime}</span>
+                        <span v-if="item.rate == 0" class="item-rate">0%</span>
+                        <span v-else class="item-rate">${item.rate?(item.rate * 100).toFixed(2)+"%":"--"}</span>                        <span class="item-time">${item.lastTime}</span>
                       </div>
                       <div class="item-progress">
                         <span class="item-money"  v-if="item.amount > 0">中标金额:${utils.moneyUnit(item.amount)}</span>

+ 51 - 2
src/web/templates/frontRouter/wx/bigmember/free/perfect_info.html

@@ -900,10 +900,22 @@
       },
       ajaxGetEchoInfo() {
         this.isEchoInfoLoading = true
-        this.ajaxFn('/salesLeads/echoInfo', {}, function (r) {
+        this.ajaxFn('/salesLeads/retainedCapital' + '?source=' + this.ajaxParams.source, { source: this.ajaxParams.source }, function (r) {
           this.isEchoInfoLoading = false
+          if (r && r.info) {
+            r.data = r.info
+          }
           if (r && r.error_msg === '' && r.data) {
             this.setEchoInfo(r.data)
+            var result = checkRequiredKeys(['name', 'phone', 'company', 'position', 'branch'], r.data)
+            if (result) {
+              var skipAuto = ['jyarticle_see3', 'article_collection', 'article_original', 'jypush_see10']
+              var _this = this
+              var canAuto = !skipAuto.some(function (v) {
+                return _this.ajaxParams.source.indexOf(v) > -1
+              })
+              this.submitForm(canAuto)
+            }
           }
         })
       },
@@ -1185,7 +1197,7 @@
             history.back()
           })
         },
-      submitForm () {
+      submitForm (auto) {
         this.wxTweetAjax('isICRW') // 提交留资埋点公众号推文
         this.bigDocAjax('ICRW') // 提交留资埋点引导语
         this.ajaxParams.name = this.infoMap.name
@@ -1237,6 +1249,38 @@
                   })
                   break
                 }
+                case 'jyarticle_see3_plus_wx': {
+                  _this.showToast('提交成功')
+                  setTimeout(function () {
+                    sessionStorage.setItem('salesBackStatus', 'true')
+                    history.back()
+                  }, 1500)
+                  break
+                }
+                case 'jyarticle_see3_plus_app': {
+                  _this.showToast('提交成功')
+                  setTimeout(function () {
+                    sessionStorage.setItem('salesBackStatus', 'true')
+                    history.back()
+                  }, 1500)
+                  break
+                }
+                case 'jypush_see10_plus_wx': {
+                  _this.showToast('提交成功')
+                  setTimeout(function () {
+                    sessionStorage.setItem('salesBackStatus', 'true')
+                    history.back()
+                  }, 1500)
+                  break
+                }
+                case 'jypush_see10_plus_app': {
+                  _this.showToast('提交成功')
+                  setTimeout(function () {
+                    sessionStorage.setItem('salesBackStatus', 'true')
+                    history.back()
+                  }, 1500)
+                  break
+                }
                 default: {
                   var message = ''
                   if (source) {
@@ -1263,6 +1307,11 @@
                     }
                     message = text ? '恭喜您,成功解锁【' + text + '】权益1次。如需查看更多,请开通超级订阅,为您提供最新的商业情报,抢占先机。' :
                       '您的申请已提交,我们会尽快联系您并预约演示时间,请耐心等待~您将获得免费体验大会员全部功能!'
+                    if (text && auto) {
+                      // 自动留资跳转
+                      sessionStorage.setItem('salesBackStatus', 'true')
+                      history.back()
+                    }
                   }
 
                   if (message.length) {

+ 4 - 1
src/web/templates/frontRouter/wx/bigmember/free/perfect_info_partner.html

@@ -204,8 +204,11 @@
       ajaxGetEchoInfo() {
         this.isEchoInfoLoading = true
         let _this = this
-        this.ajaxFn('/salesLeads/echoInfo', {}, function (r) {
+        this.ajaxFn('/salesLeads/retainedCapital' + '?source=' + this.ajaxParams.source, {source: this.ajaxParams.source}, function (r) {
           this.isEchoInfoLoading = false
+          if (r && r.info) {
+            r.data = r.info
+          }
           if (r && r.error_msg === '' && r.data) {
             if(r.data.phone != '') {
               _this.vercodecor = true

+ 4 - 1
src/web/templates/frontRouter/wx/bigmember/free/perfect_info_solution.html

@@ -335,8 +335,11 @@
       ajaxGetEchoInfo() {
         this.isEchoInfoLoading = true
         let _this = this
-        this.ajaxFn('/salesLeads/echoInfo', {}, function (r) {
+        this.ajaxFn('/salesLeads/retainedCapital' + '?source=' + this.ajaxParams.source, {source: this.ajaxParams.source}, function (r) {
           this.isEchoInfoLoading = false
+          if (r && r.info) {
+            r.data = r.info
+          }
           if (r && r.error_msg === '' && r.data) {
             this.setEchoInfo(r.data)
           }

+ 4 - 1
src/web/templates/frontRouter/wx/bigmember/free/perfect_info_strud.html

@@ -437,8 +437,11 @@
       ajaxGetEchoInfo() {
         this.isEchoInfoLoading = true
         let _this = this
-        this.ajaxFn('/salesLeads/echoInfo', {}, function (r) {
+        this.ajaxFn('/salesLeads/retainedCapital' + '?source=' + this.ajaxParams.source, {source: this.ajaxParams.source}, function (r) {
           this.isEchoInfoLoading = false
+          if (r && r.info) {
+            r.data = r.info
+          }
           if (r && r.error_msg === '' && r.data) {
             if(r.data.phone != '') {
               _this.vercodecor = true

+ 1 - 1
src/web/templates/frontRouter/wx/collection/sess/ent_portrait.html

@@ -453,7 +453,7 @@
                             </li>
                             <li
                                 class="show-more clickable"
-                                v-if="topProject.showGetNextButton && isMemberAndSvip && topProject.count > 3"
+                                v-if="topProject.showGetNextButton && (isMemberAndSvip || canFreeTrial) && topProject.count > 3"
                                 @click="goToFilterProjectNews">查看更多</li>
                         </ul>
                     </div>

+ 5 - 3
src/web/templates/weixin/historypush.html

@@ -1466,6 +1466,7 @@
       //   是否需要留资
      function isNeedSales (callback) {
       $.ajax({
+          type: 'GET',
           url: '/salesLeads/retainedCapital',
           data: { source: 'jypush_see10_plus_wx' },
           async: false,
@@ -1748,9 +1749,10 @@
             //console.log(vKeepComponent)
             if (vKeepComponent) {
                 vKeepComponent.changeBid(id, !shoucang)
-                if(listnum < 100) {
-                   vKeepComponent.changeKeepStatus(!shoucang, _this)
-                }
+                // 移除默认收藏时点亮图标
+                // if(listnum < 100) {
+                //    vKeepComponent.changeKeepStatus(!shoucang, _this)
+                // }
             }
         })
       }