Sfoglia il codice sorgente

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

wangkaiyue 3 anni fa
parent
commit
8245c7029e

+ 10 - 1
src/jfw/front/shorturl.go

@@ -156,8 +156,9 @@ func (s *Short) Article(stype, id string) error {
 	s.T["isEntniche"] = isEntniche
 	s.T["isEntnicheNew"] = isEntnicheNew
 	node := CNode(userId)
+	hasRetainedCapital := hasRetainedCapital(userId, "jyarticle_see3_plus") //三级页留资source
 	var nodeStr string
-	if node {
+	if node || hasRetainedCapital {
 		nodeStr = "true"
 	} else {
 		nodeStr = "false"
@@ -685,3 +686,11 @@ func RemoveDuplicatesAndEmpty(a []string) (ret []string) {
 	}
 	return
 }
+
+//该节点是否留资
+func hasRetainedCapital(uid, source string) bool {
+	if count, err := mongodb.CountByErr("saleLeads", map[string]interface{}{"userid": uid, "source": source}); err != nil || count > 0 {
+		return true
+	}
+	return false
+}

+ 12 - 1
src/jfw/modules/app/src/app/front/shorturl.go

@@ -96,7 +96,9 @@ func (s *Short) Article(stype, id string) error {
 			s.T["canRead"] = true
 		}
 		//检验是否留资
-		if CNode(userId) {
+		ok := CNode(userId)
+		hasRetainedCapital := hasRetainedCapital(userId, "jyarticle_see3_plus") //三级页source
+		if ok || hasRetainedCapital {
 			s.T["canRead"] = true
 		}
 	}
@@ -173,6 +175,7 @@ func (s *Short) Article(stype, id string) error {
 	}
 	return s.Redirect("/jyapp/free/mob/err")
 }
+
 func CNode(userId string) bool {
 	rM := map[string]interface{}{}
 	rdata, ok := mongodb.Find("saleLeads", map[string]interface{}{
@@ -325,3 +328,11 @@ func RemoveDuplicatesAndEmpty(a []string) (ret []string) {
 	}
 	return
 }
+
+//该节点是否留资
+func hasRetainedCapital(uid, source string) bool {
+	if count, err := mongodb.CountByErr("saleLeads", map[string]interface{}{"userid": uid, "source": source}); err != nil || count > 0 {
+		return true
+	}
+	return false
+}

+ 35 - 0
src/jfw/modules/app/src/web/templates/frontRouter/bigmember/free/perfect_info.html

@@ -1548,6 +1548,9 @@
 
               var source = _this.ajaxParams.source || utils.getParam('source')
               if (r.error_msg === '') {
+                sessionStorage.setItem('salesBackData', JSON.stringify({
+                  type: source,
+                }))
                 switch (source) {
                   case 'member_freeuse': {
                     _this.showMessage('您的申请已提交,我们会尽快联系您并预约演示时间,请耐心等待~您将获得免费体验大会员全部功能!')
@@ -1557,6 +1560,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) {

+ 9 - 0
src/jfw/modules/app/src/web/templates/frontRouter/bigmember/free/perfect_info_partner.html

@@ -174,6 +174,15 @@
               _this.setcodeShow = true
             }
             this.setEchoInfo(r.data)
+            var result = checkRequiredKeys(['name', 'phone'], 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)
+            }
           }
         })
       },

+ 9 - 0
src/jfw/modules/app/src/web/templates/frontRouter/bigmember/free/perfect_info_solution.html

@@ -323,6 +323,15 @@
           }
           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)
+            }
           }
         })
       },

+ 9 - 0
src/jfw/modules/app/src/web/templates/frontRouter/bigmember/free/perfect_info_strud.html

@@ -436,6 +436,15 @@
               _this.setcodeShow = true
             }
             this.setEchoInfo(r.data)
+            var result = checkRequiredKeys(['name', 'phone', 'company', 'mail', '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)
+            }
           }
         })
       },

+ 6 - 0
src/jfw/modules/app/src/web/templates/weixin/historypush.html

@@ -1018,6 +1018,9 @@
                   var result = checkRequiredKeys(['name', 'phone', 'position', 'branch','company'], res.info)
                   if (!result && res.data && res.data.retainedCapital) {
                     $(".seeMore").show()
+                    $(".seeMore-btn").on('click', function () {
+                      location.href = '/jyapp/frontPage/bigmember/free/perfect_info?source=jypush_see10_plus_app'
+                    })
                   } else {
                     location.reload()
                   }
@@ -1678,6 +1681,9 @@ function hasNoData() {
                 this.$refs.vKeepComponent.ajaxAddKeep(id, type)
             },
             changeKeepStatus (type, that) {
+                if (!that) {
+                  that = $('*[data-id="'+this.nowOpenBid+'"]')
+                }
                 changeCollectStatus(type, that)
                 changeCollectDataStatus(type, this.nowOpenBid)
             }

+ 11 - 6
src/jfw/modules/app/src/web/templates/weixin/search/mainSearch.html

@@ -1148,6 +1148,11 @@
     }
     //回车事件
     document.onkeydown = function () {
+        var isNowIndex = $(".tabs-box .tabs-nav .active").index()
+        if(isNowIndex === 2) {
+          SuperSearch.isMyPage = false
+          EntSearch.isMyPage = false
+        }
         if(window.event && window.event.keyCode == 13) {
             window.event.returnValue = false;
             //超级搜索
@@ -1155,7 +1160,6 @@
               if ($("#search-header-input").val().trim() === '') {
                 return
               }
-              var isNowIndex = $(".tabs-box .tabs-nav .active").index()
                 if (!$(".tabs-box").hasClass('hidden') && isNowIndex !== 0) {
                     if (isNowIndex === 1) {
                       $("#supersearchPage input[name=super_searchinput]").blur();
@@ -1183,13 +1187,14 @@
                 }
                 EntSearch.formSubmit();
             } else {
-              var isNowIndex = $(".tabs-box .tabs-nav .active").index()
+              // var isNowIndex = $(".tabs-box .tabs-nav .active").index()
+              var setEntStatus = sessionStorage.getItem('setEntStatus')
               if (!$(".tabs-box").hasClass('hidden') && isNowIndex !== 0) {
-                  if (isNowIndex === 1) {
-                    $("#supersearchPage input[name=super_searchinput]").blur();
+                  if (isNowIndex === 2 && (SuperSearch.isEntNicheNew || setEntStatus == "true")) {
+                    $("#supersearchPage input[name=super_searchinput]").blur()
                     window.isKeyDownToEntSearch = true
-                    if (vEntSearchComponent) {
-                      vEntSearchComponent.toggleEntShow(true)
+                    if (vBuyerSearchComponent) {
+                      vBuyerSearchComponent.toggleEntShow(true)
                     }
                   }
               }

+ 19 - 7
src/web/staticres/common-module/keep-tags/keep-ent-tags-template.js

@@ -532,14 +532,26 @@ function checkBackSuccess () {
   var isBackSuccess = sessionStorage.getItem('salesBackStatus') || false
   if (isBackSuccess == 'true') {
     var sessionData = JSON.parse(sessionStorage.getItem('salesBackData') || '{}')
-    if (sessionData.type === 'article_collection') {
-      if (vKeepComponent) {
-        vKeepComponent.changeBid(sessionData.id, sessionData.shoucang)
+    switch (sessionData.type) {
+      case 'article_collection': {
+        if (vKeepComponent) {
+          vKeepComponent.changeBid(sessionData.id, sessionData.shoucang)
+        }
+        break
       }
-    }
-    if (sessionData.type === 'article_original') {
-      if (!utils.isWeiXinBrowser) {
-        JyObj.openExternalLink(sessionData.url,"查看原文");
+      case 'article_original': {
+        if (!utils.isWeiXinBrowser) {
+          JyObj.openExternalLink(sessionData.url,"查看原文");
+        }
+        break
+      }
+      case 'jyarticle_see3_plus_wx': {
+        location.reload()
+        break
+      }
+      case 'jyarticle_see3_plus_app': {
+        location.reload()
+        break
       }
     }
   }

+ 19 - 7
src/web/staticres/common-module/keep-tags/keep-tags-template.js

@@ -606,14 +606,26 @@ function checkBackSuccess () {
   var isBackSuccess = sessionStorage.getItem('salesBackStatus') || false
   if (isBackSuccess == 'true') {
     var sessionData = JSON.parse(sessionStorage.getItem('salesBackData') || '{}')
-    if (sessionData.type === 'article_collection') {
-      if (vKeepComponent) {
-        vKeepComponent.changeBid(sessionData.id, sessionData.shoucang)
+    switch (sessionData.type) {
+      case 'article_collection': {
+        if (vKeepComponent) {
+          vKeepComponent.changeBid(sessionData.id, sessionData.shoucang)
+        }
+        break
       }
-    }
-    if (sessionData.type === 'article_original') {
-      if (!utils.isWeiXinBrowser) {
-        JyObj.openExternalLink(sessionData.url,"查看原文");
+      case 'article_original': {
+        if (!utils.isWeiXinBrowser) {
+          JyObj.openExternalLink(sessionData.url,"查看原文");
+        }
+        break
+      }
+      case 'jyarticle_see3_plus_wx': {
+        location.reload()
+        break
+      }
+      case 'jyarticle_see3_plus_app': {
+        location.reload()
+        break
       }
     }
   }

+ 4 - 0
src/web/staticres/js/wxSupersearch.js

@@ -2248,6 +2248,10 @@ var SuperSearch = {
       sessionStorage.superSearch_yScroll=$("#supersearchPage .app-layout-content-b #wrapper").scrollTop();
       sessionStorage.superSearch_industry=$("#supersearchPage .contentthree").html();
       sessionStorage.searchpageName="superSearch";
+
+      if (!$("#supersearchPage").is(":visible")) {
+        sessionStorage.searchpageName = ''
+      }
       sessionStorage.superSearch_dyDiv=SuperSearch.dyDiv;
       sessionStorage.superSearch_advertIsClose=SuperSearch.advertIsClose;
 //			if($("#supersearchPage .on").hasClass("showlist")){

+ 35 - 0
src/web/templates/frontRouter/wx/bigmember/free/perfect_info.html

@@ -1223,6 +1223,9 @@
 
             var source = _this.ajaxParams.source || utils.getParam('target') || utils.getParam('source')
             if (r.error_msg === '') {
+              sessionStorage.setItem('salesBackData', JSON.stringify({
+                type: source,
+              }))
               Object.assign(_this.submitResponse, r)
               switch (source) {
                 case 'member_freeuse': {
@@ -1249,6 +1252,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) {

+ 12 - 3
src/web/templates/frontRouter/wx/bigmember/free/perfect_info_partner.html

@@ -211,13 +211,22 @@
           }
           if (r && r.error_msg === '' && r.data) {
             if(r.data.phone != '') {
-              _this.vercodecor = true
-              _this.setcodeShow = false
+              // _this.vercodecor = true
+              // _this.setcodeShow = false
               sessionStorage.setItem('strud_phone', r.data.phone)
             } else {
-              _this.setcodeShow = true
+              // _this.setcodeShow = true
             }
             this.setEchoInfo(r.data)
+            var result = checkRequiredKeys(['name', 'phone'], 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)
+            }
           }
         })
       },

+ 9 - 0
src/web/templates/frontRouter/wx/bigmember/free/perfect_info_solution.html

@@ -342,6 +342,15 @@
           }
           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)
+            }
           }
         })
       },

+ 9 - 0
src/web/templates/frontRouter/wx/bigmember/free/perfect_info_strud.html

@@ -451,6 +451,15 @@
               _this.setcodeShow = true
             }
             this.setEchoInfo(r.data)
+            var result = checkRequiredKeys(['name', 'phone', 'company', 'mail', '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)
+            }
           }
         })
       },

+ 6 - 0
src/web/templates/weixin/historypush.html

@@ -1219,6 +1219,9 @@
                   var result = checkRequiredKeys(['name', 'phone', 'position', 'branch','company'], res.info)
                   if (!result && res.data && res.data.retainedCapital) {
                     $(".seeMore").show()
+                    $(".seeMore-btn").on('click', function () {
+                      location.href = '/weixin/frontPage/bigmember/free/perfect_info?source=jypush_see10_plus_wx'
+                    })
                   } else {
                     location.reload()
                   }
@@ -1769,6 +1772,9 @@
                 this.$refs.vKeepComponent.ajaxAddKeep(id, type)
             },
             changeKeepStatus (type, that) {
+                if (!that) {
+                  that = $('*[data-id="'+this.nowOpenBid+'"]')
+                }
                 changeCollectStatus(type, that)
                 changeCollectDataStatus(type, this.nowOpenBid)
             }