فهرست منبع

Merge branch 'release' into dev4.6.1.5

luwenna 3 سال پیش
والد
کامیت
82e56e0fbc

+ 6 - 4
src/active.json

@@ -13,7 +13,9 @@
 	},
 	"shortUrl":{
 		"introducePage":"https://www.jianyu360.cn/swordfish/SingleLogin?toHref=https%3A%2F%2Fwww.jianyu360.cn%2Fswordfish%2FSingleLogin%3FtoHref%3Dhttps%3A%2F%2Fwww.jianyu360.cn%2Ffront%2Fvipsubscribe%2FintroducePage&title=%E8%B6%85%E7%BA%A7%E8%AE%A2%E9%98%85",
-		"vipsubscribe":"https://www.jianyu360.cn/swordfish/SingleLogin?toHref=https%3A%2F%2Fwww.jianyu360.cn%2Fswordfish%2FSingleLogin%3FtoHref%3Dhttps%3A%2F%2Fwww.jianyu360.cn%2Ffront%2Fvipsubscribe%2Fvipsubscribe_new?source=wx_double11%26title%3D%E8%B6%85%E7%BA%A7%E8%AE%A2%E9%98%85",
-		"dataPack":" https://www.jianyu360.cn/swordfish/SingleLogin?toHref=https%3A%2F%2Fwww.jianyu360.cn%2Fswordfish%2FSingleLogin%3FtoHref%3Dhttps%3A%2F%2Fwww.jianyu360.cn%2Fswordfish%2FdataPack%2FcreateOrder?source=wx_double11%26title%3D%E6%95%B0%E6%8D%AE%E6%B5%81%E9%87%8F%E5%8C%85"
-	}
-}
+		"vipsubscribe":"https://www.jianyu360.cn/swordfish/SingleLogin?toHref=https://www.jianyu360.cn/swordfish/SingleLogin?toHref=https://www.jianyu360.cn/front/vipsubscribe/vipsubscribe_new?source=wx_double11&title=%E8%B6%85%E7%BA%A7%E8%AE%A2%E9%98%85",
+		"dataPack":"https://www.jianyu360.cn/swordfish/SingleLogin?toHref=https://www.jianyu360.cn/swordfish/SingleLogin?toHref=https://www.jianyu360.cn/swordfish/dataPack/createOrder?source=wx_double11&title=%E6%95%B0%E6%8D%AE%E6%B5%81%E9%87%8F%E5%8C%85",
+		"doubleEleven":"https://www.jianyu360.cn/swordfish/SingleLogin?toHref=https://www.jianyu360.cn/swordfish/SingleLogin?toHref=https://www.jianyu360.cn/weixin/leads/doubleEleven&title=%E7%95%99%E8%B5%84%E4%BA%92%E5%8A%A8%E6%8A%BD%E5%A5%96"
+	},
+	"lottery":"https://host.huiju.cool/p/26256"	
+	}

+ 1 - 0
src/jfw/config/active.go

@@ -16,6 +16,7 @@ type activeConfig struct {
 	ActiveDiscount     float64           `json:"activeDiscount"`     //直播活动折扣
 	DoubleEleven       *doubleEleven     `json:"doubleEleven"`       //双十一
 	ShortUrl           map[string]string `json:"shortUrl"`           //短地址跳转
+	Lottery            string            `json:"lottery"`            //抽奖跳转连接
 }
 
 //双十一活动

+ 15 - 0
src/jfw/front/frontRouter.go

@@ -42,6 +42,9 @@ type CommonRouter struct {
 	//pc大会员
 	bigpcIndex xweb.Mapper `xweb:"/swordfish/page_big_pc/"`
 	bigpcPage  xweb.Mapper `xweb:"/swordfish/page_big_pc/(.*)"`
+
+	//双十一活动留资
+	activityLeads xweb.Mapper `xweb:"/weixin/leads/(.*)"`
 }
 
 func init() {
@@ -219,3 +222,15 @@ func (this *CommonRouter) CouponActive() error {
 	}
 	return this.Redirect(url)
 }
+
+//活动留资
+func (this *CommonRouter) ActivityLeads(sign string) error {
+	userid, _ := this.GetSession("userId").(string)
+	if data, ok := mongodb.FindOne("saleLeads", map[string]interface{}{
+		"userid": userid,
+		"source": sign,
+	}); data != nil && ok && len(*data) > 0 {
+		return this.Redirect(config.ActiveConfig.Lottery)
+	}
+	return this.Redirect(fmt.Sprintf("/weixin/frontPage/bigmember/free/perfect_info?source=%v", sign))
+}

+ 11 - 1
src/jfw/modules/app/src/app/front/vipsubscribe.go

@@ -182,7 +182,17 @@ func (s *Subscribepay) ToPurchasePage(flag string) {
 		s.T["isTrial"] = true
 		s.T["orderType"] = -1
 	} else { //付费
-		if flag == "renew" {
+		userId := util.ObjToString(s.GetSession("userId"))
+		if userId == "" {
+			s.Redirect("/jyapp/login")
+			return
+		}
+		m, ok := public.MQFW.FindById("user", userId, `{"o_vipjy":1,"i_vip_status":1}`)
+		if !ok {
+			s.Redirect("/jyapp/login")
+			return
+		}
+		if util.IntAll((*m)["i_vip_status"]) > 0 || flag == "renew" {
 			s.Render("/vipsubscribe/vip_renew.html")
 			return
 		}

+ 7 - 4
src/jfw/modules/app/src/app/tag/ad.go

@@ -58,11 +58,10 @@ func Ad(s_code string, n int) []adInfo {
 		res, ok := mongodb.FindOneByField("ad", `{"s_code":"`+s_code+`"}`, f)
 		if ok && res != nil && (*res)["a_son"] != nil {
 			son := (*res)["a_son"].([]interface{})
-			resmap := adHandle(son, s_code)
-			if len(resmap) > 0 {
-				redis.PutCKV("other", "ad_"+s_code, resmap)
+			if len(son) > 0 {
+				redis.PutCKV("other", "ad_"+s_code, son)
 			}
-			return resmap
+			return adHandle(son, s_code)
 		}
 	}
 	return nil
@@ -78,7 +77,9 @@ type adInfo struct {
 		Width     string `json:"width"`     //宽度
 		StartTime string `json:"startTime"` //开始时间
 		EndTime   string `json:"endTime"`   //结束时间
+		IosHref   string `json:"iosHref"`   //根据客户端不同 是否访问不同地址
 	} `json:"o_extend"` //拓展属性
+	S_script string `json:"s_script"` //脚本代码
 }
 
 //广告位信息处理
@@ -96,6 +97,7 @@ func adHandle(data []interface{}, s_code string) []adInfo {
 			for _, v := range adInfo_Arr {
 				if v.O_extend.StartTime != "" && len(strings.Split(v.O_extend.StartTime, "-")) == 6 {
 					if thisTime, err := time.ParseInLocation("2006-01-02-15-04-05", v.O_extend.StartTime, time.Local); err == nil {
+						// log.Println(thisTime.Unix(), "---开始时间----", now.Unix())
 						//广告还未开始
 						if thisTime.Unix() > now.Unix() {
 							continue
@@ -104,6 +106,7 @@ func adHandle(data []interface{}, s_code string) []adInfo {
 				}
 				if v.O_extend.EndTime != "" && len(strings.Split(v.O_extend.EndTime, "-")) == 6 {
 					if thisTime, err := time.ParseInLocation("2006-01-02-15-04-05", v.O_extend.EndTime, time.Local); err == nil {
+						// log.Println(thisTime.Unix(), "---结束时间----", now.Unix())
 						//广告已经结束
 						if thisTime.Unix() < now.Unix() {
 							continue

+ 20 - 7
src/jfw/modules/app/src/web/staticres/jyapp/js/searchindex.js

@@ -1790,7 +1790,11 @@ var SuperSearch = {
           SuperSearch.advert = $("#advertscript").html();
           $("#advertscript").remove();
         }
-        $(this).html(SuperSearch.advert);
+        if(SuperSearch.advert!=""){
+        	$(this).html(SuperSearch.advert);
+        }else{
+        	$(this).hide();
+        }
       }
       if(SuperSearch.limitFlag&&$(this).hasClass("tslist")){
         if(showCount >= 50){
@@ -3634,9 +3638,12 @@ var Active_Tip = function(){
       if(parseInt(time) >= tipEndTime){
         //return   //超过弹窗结束日期
       }
-      if(!time||_this.nowDay>parseInt(time)){
-        _this.active = new Active_Vip_Invite(_this.nowDay);
-      }
+//      if(!time||_this.nowDay>parseInt(time)){
+//        _this.active = new Active_Vip_Invite(_this.nowDay);
+//      }
+    	if(!time||_this.nowTime>parseInt(time)+1000*60*60*24){
+        	_this.active = new Active_Vip_Invite(_this.nowTime);
+      	}
     }
   }
   //无分销提示弹框common.js
@@ -3983,7 +3990,7 @@ var Active_Vip_Invite = function(nowTime){
   this.init = function(){
     $(".pop-new").on("tap",function(){
       //外部链接打开
-      if (adv_within=="abroad"){
+      if (adv_url.indexOf("host.huiju.cool")==-1&&(adv_within=="abroad"|| adv_url.indexOf("http")>-1)){
         ActiveTip.close();
         JyObj.openExternalLink(adv_url,"");
       }else{
@@ -3991,12 +3998,18 @@ var Active_Vip_Invite = function(nowTime){
           ActiveTip.close();
           window.location.href = adv_url;
         }else{
-          window.location.href = "/jyapp/free/login?url="+encodeURIComponent(adv_url);
+          	if(adv_url.indexOf("host.huiju.cool")>-1){
+				window.location.href = "/jyapp/free/login?back=index";
+			}else{
+	          	window.location.href = "/jyapp/free/login?url="+encodeURIComponent(adv_url);
+	        }
         }
       }
     });
     //nowTime = new Date(formatDate(nowTime,true)+ " 00:00:00").getTime();
-    localStorage.setItem("Active_Vip_Invite_Day",nowTime);
+    if ((userId!=undefined&&userId!="")||adv_url.indexOf("host.huiju.cool")==-1){
+    	localStorage.setItem("Active_Vip_Invite_Day",nowTime);
+    }
   }
   this.getHtml = function(){
     var html = '<img class="pop-new" id="wx-mainSearch-dialog" style="border-radius: 8px;" src ="'+adv_img+'">'

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

@@ -424,6 +424,9 @@
                     if (AD.o_extend != undefined && AD.o_extend.title != undefined) {
                         ADtitle = AD.o_extend.title;
                     }
+                    if(AD.o_extend != undefined &&AD.o_extend.iosHref!=""&&!!navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)){
+                      AD.s_link = "https://"+AD.o_extend.iosHref
+                    }
                     if (AD.o_extend != undefined && AD.o_extend.linktype == "within") {
                         ADHtml += "<a onclick=\"AdClick(this," + false + ",'" + AD.s_link + "')\"><img src='" + AD.s_pic + "'/></a>"
                     } else {
@@ -1301,7 +1304,7 @@ function hasNoData() {
           }
           if (showAd && index == 3 && !closeAdvert) {//广告位
               var ad = $("#advertscript").html()
-              if (ad != "") {
+              if (ad != ""&&ad.length>20) {
                   listhtml += '<div class="tslist ' + visited + '" style="border-bottom: none;" words="' + mWords + '">'
                       + '<div class="resnumb">'
                       + '<div class="one">'

+ 15 - 4
src/jfw/modules/app/src/web/templates/weixin/search/mainSearch.html

@@ -510,6 +510,7 @@
 <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/ent-search/ent-search-template.js?v={{Msg "seo" "version"}}'></script>
 <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/js/searchindex.js?v={{Msg "seo" "version"}}'></script>
 <script>
+    var isIos = !!navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
     let _this = this
     if (sessionStorage.getItem('mainSkipAppointTabed') !== 'true') {
         $.ajax({
@@ -603,6 +604,9 @@
   if (ADList.length>0){
   	  var AD=ADList[0]
   		if(AD.s_link){
+        if(AD.o_extend!=undefined&&AD.o_extend.iosHref!=""&&isIos){
+          AD.s_link = "https://"+AD.o_extend.iosHref
+        }
         adv_url = AD.s_link
       }
       if(AD.s_pic){
@@ -1244,7 +1248,7 @@
         console.log(r, 'r')
         var ADList=r["jyapp-wxsearch-middle"];
         console.log(ADList, 'ADList')
-        if(ADList!=null){
+        if(ADList&&ADList!=null&&ADList.length>0){
             var random=Math.floor(Math.random()*ADList.length)
             var AD=ADList[random]
             var ADHtml="<span class=\"closeadv-bg\"></span>"
@@ -1255,6 +1259,9 @@
                     if(AD.o_extend!=undefined&&AD.o_extend.title!=undefined){
                         ADtitle=AD.o_extend.title;
                     }
+                    if(AD.o_extend!=undefined&&AD.o_extend.iosHref!=""&&isIos){
+                      AD.s_link = "https://"+AD.o_extend.iosHref
+                    }
                     if(AD.o_extend!=undefined&&AD.o_extend.linktype=="within"){
                         ADHtml+="<a onclick=\"AdClick(this,"+false+",'"+AD.s_link+"')\"><img id='adv-appsearch-center-a' src='"+AD.s_pic+"'/></a>"
                     }else{
@@ -1271,7 +1278,7 @@
         //jy-appsearch-home-top
         window.swiper1 = null;
         var ADTopList=r["jy-appsearch-home-top"];
-        if (ADTopList!=null){
+        if (ADTopList&&ADTopList!=null){
             var adhtml = '';
             for(var i=0;i<ADTopList.length;i++){
                 var ADtitle = "";
@@ -1284,10 +1291,14 @@
                 if (i === 0 || i === ADTopList.length - 1) {
                     imgHTML = "<img src='"+ADTopList[i]["s_pic"]+"'/></a>"
                 }
+                var s_link = ADTopList[i]["s_link"]
+                if(ADTopList[i]["o_extend"]!=undefined&&ADTopList[i]["o_extend"].iosHref!=""&&isIos){
+                  s_link = "https://"+ADTopList[i]["o_extend"].iosHref
+                }
                 if(ADTopList[i]["o_extend"]!=undefined&&ADTopList[i]["o_extend"].linktype=="within"){
-                    adhtml+="<a onclick=\"AdClick(this,"+false+",'"+ADTopList[i]["s_link"]+"')\">" + imgHTML
+                    adhtml+="<a onclick=\"AdClick(this,"+false+",'"+s_link+"')\">" + imgHTML
                 }else{
-                    adhtml+="<a onclick=\"AdClick(this,"+true+",'"+ADTopList[i]["s_link"]+"','"+ADtitle+"')\">" + imgHTML
+                    adhtml+="<a onclick=\"AdClick(this,"+true+",'"+s_link+"','"+ADtitle+"')\">" + imgHTML
                 }
                 adhtml+='</div>'
             }

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

@@ -636,6 +636,7 @@
                         </div>
                         <div  onclick="adv_statistics(this)" adv_name="APP快照页-底部"  class="adv-appcontent-bottom" id="C1">
                             <script>
+                                var isiOS = !!navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
                                 var ADList={{$s}}
                                 var random=Math.floor(Math.random()*ADList.length)
                                 var AD=ADList[random]
@@ -646,6 +647,9 @@
                                         if(AD.o_extend.title!=undefined){
                                             ADtitle=AD.o_extend.title;
                                         }
+                                        if(AD.o_extend!=undefined&&AD.o_extend.iosHref!=""&&isiOS){
+                                          AD.s_link = "https://"+AD.o_extend.iosHref
+                                        }
                                         if(AD.o_extend.linktype=="within"){
                                             ADHtml="<a id='advRedirect' datalink='"+AD.s_link+"'><img id='app-article-content-ft-advImg' src='"+AD.s_pic+"'/></a>"
                                         }else if(AD.o_extend.linktype=="abroad"){

+ 1 - 1
src/jfw/modules/bigmember/src/service/analysis/forecastproject.go

@@ -40,7 +40,7 @@ func (this *Analysis) ForPContent() {
 							continue
 						}
 						pv_key := qutil.ObjToString(pv["p_purchasing"])
-						for _, kv := range strings.Split(keys, ",") {
+						for _, kv := range strings.Split(keys, "") {
 							if strings.Contains(pv_key, kv) {
 								if resultsMap[pv["p_id"].(string)] != nil {
 									rmp := qutil.ObjToMap(resultsMap[pv["p_id"].(string)])

+ 3 - 2
src/jfw/tag/ad.go

@@ -59,11 +59,10 @@ func Ad(s_code string, n int) []adInfo {
 		res, ok := mongodb.FindOneByField("ad", `{"s_code":"`+s_code+`"}`, f)
 		if ok && res != nil && (*res)["a_son"] != nil {
 			son := (*res)["a_son"].([]interface{})
-			resmap := adHandle(son, s_code)
 			if len(son) > 0 {
 				redis.PutCKV("other", "ad_"+s_code, son)
 			}
-			return resmap
+			return adHandle(son, s_code)
 		}
 	}
 	return nil
@@ -79,7 +78,9 @@ type adInfo struct {
 		Width     string `json:"width"`     //宽度
 		StartTime string `json:"startTime"` //开始时间
 		EndTime   string `json:"endTime"`   //结束时间
+		IosHref   string `json:"iosHref"`   //根据客户端不同 是否访问不同地址
 	} `json:"o_extend"` //拓展属性
+	S_script string `json:"s_script"` //脚本代码
 }
 
 //广告位信息处理

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

@@ -1828,7 +1828,12 @@ var SuperSearch = {
           SuperSearch.advert = $("#advertscript").html();
           $("#advertscript").remove();
         }
-        $(this).html(SuperSearch.advert);
+        //$(this).html(SuperSearch.advert);
+        if(SuperSearch.advert!=""){
+        	$(this).html(SuperSearch.advert);
+        }else{
+        	$(this).hide();
+        }
       }
       if(SuperSearch.limitFlag&&$(this).hasClass("tslist")){
         if(showCount >= 50){

+ 31 - 4
src/web/templates/frontRouter/wx/bigmember/free/perfect_info.html

@@ -564,7 +564,8 @@
         '经理',
         '主管',
         '职员'
-      ]
+      ],
+      submitResponse: {}
     },
     created() {
       // 大会员落地页免费体验
@@ -645,13 +646,23 @@
         } else {
           document.title = '完善信息'
         }
+
         if (source == 'bid_document_Introduction_page') {
           var hideType = ['email', 'class', 'companyType', 'workScope', 'partnerNeeds', 'agree']
           for (var k in this.moduleShow) {
-            if (hideType.indexOf(k) !== -1)
+            if (hideType.indexOf(k) !== -1) {
               this.moduleShow[k] = false
+            }
+          }
+        } else if (source === 'doubleEleven') {
+          var hideType = ['area', 'class', 'companyType', 'workScope', 'partnerNeeds', 'agree']
+          for (var k in this.moduleShow) {
+            if (hideType.indexOf(k) !== -1) {
+              this.moduleShow[k] = false
+            }
           }
         }
+
         return infoText || ''
       },
       getPopHeight () {
@@ -1097,9 +1108,25 @@
           if (r) {
             loading.clear()
             if (r.error_msg === '') {
-              if (_this.ajaxParams.source === 'member_freeuse' ||  utils.getParam('target') || utils.getParam('source')) {
-                if (_this.ajaxParams.source === 'bid_document_Introduction_page') {
+              var source = _this.ajaxParams.source
+              Object.assign(_this.submitResponse, r)
+              if (utils.getParam('target') || utils.getParam('source')) {
+                if (source === 'bid_document_Introduction_page') {
                   _this.bidShow = true
+                } else if (source === 'doubleEleven') {
+                  _this.$toast({
+                    message: '提交成功',
+                    forbidClick: true,
+                    duration: 1000,
+                    onClose: function () {
+                      if (r.url) {
+                        location.replace(r.url)
+                      } else {
+                        sessionStorage.setItem('salesBackStatus', 'true')
+                        history.back()
+                      }
+                    }
+                  })
                 } else {
                   _this.$dialog.close()
                   _this.$dialog.confirm({

+ 1 - 1
src/web/templates/weixin/historypush.html

@@ -1397,7 +1397,7 @@
               }
               if (showAd && index == 3 && !closeAdvert) {//广告位
                   var ad = $("#advertscript").html()
-                  if (ad != "") {
+                  if (ad != ""&&ad.length>20) {
                       listhtml += '<div data-cl-event="c_wx_article_list_linkclick" class="tslist" style="border-bottom: none;" words="' + mWords + '">'
                           + '<div class="resnumb">'
                           + '<div class="one">'