瀏覽代碼

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

tsz 3 年之前
父節點
當前提交
bb1eed56de

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

@@ -155,7 +155,8 @@ func (s *Short) Article(stype, id string) error {
 	s.T["isMember"] = isMember
 	s.T["isMember"] = isMember
 	s.T["isEntniche"] = isEntniche
 	s.T["isEntniche"] = isEntniche
 	s.T["isEntnicheNew"] = isEntnicheNew
 	s.T["isEntnicheNew"] = isEntnicheNew
-	node, hasRetainedCapital := CNode(userId)
+	node := CNode(userId)
+	hasRetainedCapital := hasRetainedCapital(userId, "jyarticle_see3_plus") //三级页留资source
 	var nodeStr string
 	var nodeStr string
 	if node || hasRetainedCapital {
 	if node || hasRetainedCapital {
 		nodeStr = "true"
 		nodeStr = "true"
@@ -377,9 +378,8 @@ func (s *Short) Article(stype, id string) error {
 	return nil
 	return nil
 }
 }
 
 
-func CNode(userId string) (bool, bool) {
+func CNode(userId string) bool {
 	rM := map[string]interface{}{}
 	rM := map[string]interface{}{}
-	hasRetainedCapital := false
 	rdata, ok := mongodb.Find("saleLeads", map[string]interface{}{
 	rdata, ok := mongodb.Find("saleLeads", map[string]interface{}{
 		"userid": userId,
 		"userid": userId,
 	}, `{"createtime":-1}`, nil, false, 0, 10)
 	}, `{"createtime":-1}`, nil, false, 0, 10)
@@ -399,7 +399,6 @@ func CNode(userId string) (bool, bool) {
 		delete(rM, "userid")
 		delete(rM, "userid")
 		delete(rM, "createtime")
 		delete(rM, "createtime")
 		delete(rM, "client")
 		delete(rM, "client")
-		hasRetainedCapital = true
 	}
 	}
 	if userinfo, ok := mongodb.FindById("user", userId, `{"s_phone":1,"s_m_phone":1,"s_myemail":1,"s_company":1,"o_jy":1,"o_vipjy":1}`); userinfo != nil && ok && len(*userinfo) > 0 {
 	if userinfo, ok := mongodb.FindById("user", userId, `{"s_phone":1,"s_m_phone":1,"s_myemail":1,"s_company":1,"o_jy":1,"o_vipjy":1}`); userinfo != nil && ok && len(*userinfo) > 0 {
 		s_phone := util.ObjToString((*userinfo)["s_phone"])
 		s_phone := util.ObjToString((*userinfo)["s_phone"])
@@ -414,12 +413,12 @@ func CNode(userId string) (bool, bool) {
 	if rM["name"] != nil && rM["name"] != "" && rM["phone"] != nil && rM["phone"] != "" && rM["company"] != nil && rM["company"] != "" && rM["position"] != nil && rM["position"] != "" {
 	if rM["name"] != nil && rM["name"] != "" && rM["phone"] != nil && rM["phone"] != "" && rM["company"] != nil && rM["company"] != "" && rM["position"] != nil && rM["position"] != "" {
 
 
 		if rM["position"] != "总裁" && rM["position"] != "总经理" && (rM["branch"] == nil || rM["branch"] == "") {
 		if rM["position"] != "总裁" && rM["position"] != "总经理" && (rM["branch"] == nil || rM["branch"] == "") {
-			return false, hasRetainedCapital
+			return false
 		}
 		}
-		return true, hasRetainedCapital
+		return true
 
 
 	}
 	}
-	return false, hasRetainedCapital
+	return false
 }
 }
 
 
 //查看公告详情次数限制
 //查看公告详情次数限制
@@ -687,3 +686,11 @@ func RemoveDuplicatesAndEmpty(a []string) (ret []string) {
 	}
 	}
 	return
 	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
+}

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

@@ -96,7 +96,8 @@ func (s *Short) Article(stype, id string) error {
 			s.T["canRead"] = true
 			s.T["canRead"] = true
 		}
 		}
 		//检验是否留资
 		//检验是否留资
-		ok, hasRetainedCapital := CNode(userId)
+		ok := CNode(userId)
+		hasRetainedCapital := hasRetainedCapital(userId, "jyarticle_see3_plus") //三级页source
 		if ok || hasRetainedCapital {
 		if ok || hasRetainedCapital {
 			s.T["canRead"] = true
 			s.T["canRead"] = true
 		}
 		}
@@ -175,8 +176,7 @@ func (s *Short) Article(stype, id string) error {
 	return s.Redirect("/jyapp/free/mob/err")
 	return s.Redirect("/jyapp/free/mob/err")
 }
 }
 
 
-func CNode(userId string) (bool, bool) {
-	hasRetainedCapital := false //是否留过资
+func CNode(userId string) bool {
 	rM := map[string]interface{}{}
 	rM := map[string]interface{}{}
 	rdata, ok := mongodb.Find("saleLeads", map[string]interface{}{
 	rdata, ok := mongodb.Find("saleLeads", map[string]interface{}{
 		"userid": userId,
 		"userid": userId,
@@ -197,7 +197,6 @@ func CNode(userId string) (bool, bool) {
 		delete(rM, "userid")
 		delete(rM, "userid")
 		delete(rM, "createtime")
 		delete(rM, "createtime")
 		delete(rM, "client")
 		delete(rM, "client")
-		hasRetainedCapital = true
 	}
 	}
 	if userinfo, ok := mongodb.FindById("user", userId, `{"s_phone":1,"s_m_phone":1,"s_myemail":1,"s_company":1,"o_jy":1,"o_vipjy":1}`); userinfo != nil && ok && len(*userinfo) > 0 {
 	if userinfo, ok := mongodb.FindById("user", userId, `{"s_phone":1,"s_m_phone":1,"s_myemail":1,"s_company":1,"o_jy":1,"o_vipjy":1}`); userinfo != nil && ok && len(*userinfo) > 0 {
 		s_phone := util.ObjToString((*userinfo)["s_phone"])
 		s_phone := util.ObjToString((*userinfo)["s_phone"])
@@ -212,12 +211,12 @@ func CNode(userId string) (bool, bool) {
 	if rM["name"] != nil && rM["name"] != "" && rM["phone"] != nil && rM["phone"] != "" && rM["company"] != nil && rM["company"] != "" && rM["position"] != nil && rM["position"] != "" {
 	if rM["name"] != nil && rM["name"] != "" && rM["phone"] != nil && rM["phone"] != "" && rM["company"] != nil && rM["company"] != "" && rM["position"] != nil && rM["position"] != "" {
 
 
 		if rM["position"] != "总裁" && rM["position"] != "总经理" && (rM["branch"] == nil || rM["branch"] == "") {
 		if rM["position"] != "总裁" && rM["position"] != "总经理" && (rM["branch"] == nil || rM["branch"] == "") {
-			return false, hasRetainedCapital
+			return false
 		}
 		}
-		return true, hasRetainedCapital
+		return true
 
 
 	}
 	}
-	return false, hasRetainedCapital
+	return false
 }
 }
 
 
 func GetbelongUserId(disWord, userId string) (belongUserId string) {
 func GetbelongUserId(disWord, userId string) (belongUserId string) {
@@ -329,3 +328,11 @@ func RemoveDuplicatesAndEmpty(a []string) (ret []string) {
 	}
 	}
 	return
 	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
+}

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

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

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

+ 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_yScroll=$("#supersearchPage .app-layout-content-b #wrapper").scrollTop();
       sessionStorage.superSearch_industry=$("#supersearchPage .contentthree").html();
       sessionStorage.superSearch_industry=$("#supersearchPage .contentthree").html();
       sessionStorage.searchpageName="superSearch";
       sessionStorage.searchpageName="superSearch";
+
+      if (!$("#supersearchPage").is(":visible")) {
+        sessionStorage.searchpageName = ''
+      }
       sessionStorage.superSearch_dyDiv=SuperSearch.dyDiv;
       sessionStorage.superSearch_dyDiv=SuperSearch.dyDiv;
       sessionStorage.superSearch_advertIsClose=SuperSearch.advertIsClose;
       sessionStorage.superSearch_advertIsClose=SuperSearch.advertIsClose;
 //			if($("#supersearchPage .on").hasClass("showlist")){
 //			if($("#supersearchPage .on").hasClass("showlist")){

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

+ 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 && r.error_msg === '' && r.data) {
             if(r.data.phone != '') {
             if(r.data.phone != '') {
-              _this.vercodecor = true
-              _this.setcodeShow = false
+              // _this.vercodecor = true
+              // _this.setcodeShow = false
               sessionStorage.setItem('strud_phone', r.data.phone)
               sessionStorage.setItem('strud_phone', r.data.phone)
             } else {
             } else {
-              _this.setcodeShow = true
+              // _this.setcodeShow = true
             }
             }
             this.setEchoInfo(r.data)
             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) {
           if (r && r.error_msg === '' && r.data) {
             this.setEchoInfo(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.setcodeShow = true
             }
             }
             this.setEchoInfo(r.data)
             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)
                   var result = checkRequiredKeys(['name', 'phone', 'position', 'branch','company'], res.info)
                   if (!result && res.data && res.data.retainedCapital) {
                   if (!result && res.data && res.data.retainedCapital) {
                     $(".seeMore").show()
                     $(".seeMore").show()
+                    $(".seeMore-btn").on('click', function () {
+                      location.href = '/weixin/frontPage/bigmember/free/perfect_info?source=jypush_see10_plus_wx'
+                    })
                   } else {
                   } else {
                     location.reload()
                     location.reload()
                   }
                   }
@@ -1769,6 +1772,9 @@
                 this.$refs.vKeepComponent.ajaxAddKeep(id, type)
                 this.$refs.vKeepComponent.ajaxAddKeep(id, type)
             },
             },
             changeKeepStatus (type, that) {
             changeKeepStatus (type, that) {
+                if (!that) {
+                  that = $('*[data-id="'+this.nowOpenBid+'"]')
+                }
                 changeCollectStatus(type, that)
                 changeCollectStatus(type, that)
                 changeCollectDataStatus(type, this.nowOpenBid)
                 changeCollectDataStatus(type, this.nowOpenBid)
             }
             }