Преглед изворни кода

Merge branch 'release' into dev4.5.5

luwenna пре 4 година
родитељ
комит
2a37901116

+ 2 - 1
src/config.json

@@ -296,5 +296,6 @@
     "pcindexCacheTime":7200,
     "pcIndexHotCacheTime":7200,
     "pcindexCacheKey":"jypcindex2",
-    "dedupUrl":  "http://127.0.0.1:8888/data/deduplication"
+    "dedupUrl":  "http://127.0.0.1:8888/data/deduplication",
+    "bmwxrcoll":"drainage_wxreply_log"
 }

+ 17 - 0
src/jfw/front/singleLogin.go

@@ -5,6 +5,7 @@ import (
 	"jfw/config"
 	"jfw/jyutil"
 	"jfw/public"
+	"log"
 	"net/url"
 	qutil "qfw/util"
 	"qfw/util/redis"
@@ -72,6 +73,22 @@ func (this *SingleLogin) SingleLogin() error {
 	//判断是否关注
 	isSubscribe := CheckUserIsSubscribe(openid)
 	if isSubscribe { //关注跳转
+		//微信关键词回复图文 处理
+		if strings.Contains(this.GetString("toHref"), "?wxreply=") {
+			data["toHref"] = strings.Split(this.GetString("toHref"), "?wxreply=")[0]
+			id := strings.Split(this.GetString("toHref"), "?wxreply=")[1]
+			go func(id string) {
+				//点击回复图文
+				if !public.Mgo_Log.UpdateById(config.Sysconfig["bmwxrcoll"].(string), id, map[string]interface{}{
+					"$set": map[string]interface{}{
+						"isCRW": 1,
+					},
+				}) {
+					log.Println("wxreply err id:" + id)
+				}
+				redis.Put("other", fmt.Sprintf("digitalreplay_%s", openid), id, 24*60*60)
+			}(id)
+		}
 		if this.GetSession("userId") == nil {
 			loginCreateSess(openid, this.Session())
 		}

+ 1 - 0
src/jfw/modules/publicapply/src/drainage/biddingtype.json

@@ -2,5 +2,6 @@
 	"subtypecoll":"biddingtype",
 	"cwcollotion":"drainage_content_config",
 	"cwlogcoll":"drainage_content_log",
+	"wxdrcoll":"drainage_wxreply_log",
 	"butlogcoll":"drainage_buyerunit_log"
 }

+ 15 - 0
src/jfw/modules/publicapply/src/drainage/entity/wxdreply.go

@@ -0,0 +1,15 @@
+package drainage
+
+import (
+	"db"
+	. "drainage/initjson"
+)
+
+func UpdateDigitalReplyLogById(id, mold string) bool {
+	var set = map[string]interface{}{
+		mold: 1,
+	}
+	return db.Mgo_Log.UpdateById(BidType.Wxdrcoll, id, map[string]interface{}{
+		"$set": set,
+	})
+}

+ 1 - 0
src/jfw/modules/publicapply/src/drainage/initjson/initjson.go

@@ -13,6 +13,7 @@ type bidType struct {
 	Cwcollotion string `json:"cwcollotion"` //快照页引流文案库 mysql
 	Cwlogcoll   string `json:"cwlogcoll"`   //引流文案点击日志 mongo
 	Butlogcoll  string `json:"butlogcoll"`  //采购单位日志表 mongo
+	Wxdrcoll    string `json:"wxdrcoll"`    //微信自动回复统计
 }
 
 var BidType *bidType

+ 5 - 4
src/jfw/modules/publicapply/src/drainage/service/action.go

@@ -6,8 +6,9 @@ import (
 
 type DrainageStruct struct {
 	*xweb.Action
-	copywriting  xweb.Mapper `xweb:"/drainage/copywriting"` //快照页引流文案和链接信息
-	behaviorLog  xweb.Mapper `xweb:"/drainage/behaviorLog"` //快照页引流文案点击信息
-	bmbutinfo    xweb.Mapper `xweb:"/drainage/bmt/(.*)"`    //大会员介绍页购买按钮点击事件
-	buyerUnitLog xweb.Mapper `xweb:"/drainage/buyerunit"`   //采购单位画像引流日志
+	copywriting  xweb.Mapper `xweb:"/drainage/copywriting"`     //快照页引流文案和链接信息
+	behaviorLog  xweb.Mapper `xweb:"/drainage/behaviorLog"`     //快照页引流文案点击信息
+	bmbutinfo    xweb.Mapper `xweb:"/drainage/bmt/(.*)"`        //大会员介绍页购买按钮点击事件
+	buyerUnitLog xweb.Mapper `xweb:"/drainage/buyerunit"`       //采购单位画像引流日志
+	digitalReply xweb.Mapper `xweb:"/drainage/wx/digitalReply"` //微信公众号自动回复信息采集
 }

+ 36 - 0
src/jfw/modules/publicapply/src/drainage/service/wxreply.go

@@ -0,0 +1,36 @@
+package service
+
+import (
+	. "api"
+	. "drainage/entity"
+	"fmt"
+	"log"
+	qu "qfw/util"
+	"qfw/util/redis"
+)
+
+var drrKey = "digitalreplay_%s"
+var drrCode = "other"
+
+//
+func (this *DrainageStruct) DigitalReply() {
+	defer qu.Catch()
+	r := func() Result {
+		if this.Method() != "POST" {
+			return Result{Data: nil, Error_msg: Error_msg_1005}
+		}
+		s_m_openid, _ := this.GetSession("s_m_openid").(string)
+		mold := this.GetString("mold")
+		if id := redis.GetStr(drrCode, fmt.Sprintf(drrKey, s_m_openid)); id != "" && mold != "" {
+			log.Println("id:", id)
+			m := UpdateDigitalReplyLogById(id, mold)
+			//结束后 清缓存
+			if m && mold == "isICRW" {
+				redis.Del(drrCode, fmt.Sprintf(drrKey, s_m_openid))
+			}
+			return Result{Data: m}
+		}
+		return Result{Data: nil, Error_msg: Error_msg_1002}
+	}()
+	this.ServeJson(r)
+}

+ 17 - 10
src/jfw/modules/weixin/src/config.json

@@ -1,26 +1,26 @@
 {
-    "mongodbServers": "192.168.3.206:27080",
+    "mongodbServers": "127.0.0.1:27080",
     "mongodbPoolSize": "5",
     "mongodbName": "qfw",
   	"mongodblog": {
-			"address": "192.168.3.206:27090",
+			"address": "127.0.0.1:27090",
 	 		"size": 5,
 	 		"dbName": "qfw",
 			"replSet": "",
 			"userName": "admin",
 			"password": "123456"
 	},
-    "redisServers": "sso=192.168.3.206:1712,other=192.168.3.206:1712,jyop_other=192.168.3.206:1712,push=192.168.3.206:1712,wxtoken=192.168.3.206:1712",
-    "redisLogin": "login=192.168.3.206:1712",
+    "redisServers": "sso=127.0.0.1:1712,other=127.0.0.1:1712,jyop_other=127.0.0.1:1712,push=127.0.0.1:1712,wxtoken=127.0.0.1:1712",
+    "redisLogin": "login=127.0.0.1:1712",
     "weixinport": "82",
     "weixinrpcport": "8083",
     "webrpcport": "127.0.0.1:8084",
     "jyop_webrpcport": "127.0.0.1:8012",
-    "webdomain": "http://web-zxl.jydev.jianyu360.com",
-    "appid":"wxdedd73f450993685",
-    "appsecret":"d55898fde0b7887e5fe4660bd2494700",
+    "webdomain": "https://web-ws.jydev.jianyu360.com",
+    "appid":"wx5b1c6e7cc4dac0e4",
+    "appsecret":"b026103ffebd2291b3edb7a269612112",
     "apptoken": "top2022top2022",
-    "proxysess": "http://web-zxl.jydev.jianyu360.com/front/sess/%s",
+    "proxysess": "https://web-ws.jydev.jianyu360.com/front/sess/%s",
     "followCompany": 10,
     "welcomemsg": "用剑鱼标讯,所有功能完全免费,\n和传统的会员制说再见!\n\n<a href='%s'>点击这里</a>设置关键词,或直接回复“订阅 关键词”,如“订阅 教学设备”,您将随时随地接收招标信息!\n\n剑鱼标讯,让投标无限可能!",
     "tpl_subscribe_push_id": "IY_RWWzMlwDK6hcd6RAzTec6qre8n5r8PNOOUM_hgk0",
@@ -113,8 +113,8 @@
 	},
 	"reply":[
         {
-        		"text":"Hi~欢迎关注剑鱼标讯!\n\n每日更新10万+招标采购信息,\n定制项目监控,实时跟踪全部销售线索,\n已帮助数百万用户获取全网商机!\n\n点击这里<a href='%s'>免费订阅</a>,帮你抓住每个业务机会!\n\n<a href='%s'>【超级订阅重磅升级】</a>\n● 招标动态第一时间精准推送\n●直接对接项目联系人\n● 大容量300组关键词订阅\n● 项目一键分类收藏,重要信息不遗漏!\n● 全国七千万企业随手查,竞争实力全面洞察!",
-			"href":["keysetIndex","viphomepage_new"]
+        		"text":"Hi~欢迎关注剑鱼标讯!\n\n【超级订阅升级】\n每日更新10万+招标采购信息\n300组关键词订阅,商机第一时间推送\n直接对接项目联系人\n全国七千万企业随手查,竞争实力全面洞察\n项目分类收藏检索,重要信息不遗漏\n点击体验<a href='%s'>【超级订阅】</a>!获取全网商机!\n\n【大会员企业服务】\n企业多维度画像分析,掌握一手商业情报\n采购单位项目/重点客户画像,辅助投标决策\n市场周报/月报,多维度分析市场体量、区域热度\n回复1,查看企业画像\n回复2,查看采购单位画像\n回复3,查看市场周报/月报\n了解更多功能,拨打400-108-6670",
+			"href":["viphomepage_new"]
         }
 	],
 	"newYearReply":{
@@ -133,5 +133,12 @@
 	},
     "menuClickReplyText": {
         "BusinessCoop": "剑鱼标讯-智创未来 让数据赋能决策\n\n商务合作、媒体合作、投稿\n\n联系人:剑鱼标讯商务\n微信号:jybxsw\n"
+    },
+    "replyUrl":"/swordfish/SingleLogin?toHref=",
+    "bmwxrcoll":"drainage_wxreply_log",
+    "bigmemberReplyText": {
+        "EntUrl": ["企业全景分析","多维度帮你分析竞争对手","/big-member/image/wxreply/entportrait.png","https://mp.weixin.qq.com/s/0HguU-yu8eTf96Y8mNsD3A?wxreply=%s"],
+        "BuyerUrl": ["采购单位全景分析","快速、全面地了解采购单位","/big-member/image/wxreply/buyportrait.png","https://mp.weixin.qq.com/s/gXpB25K6I8401115pBGV1g?wxreply=%s"],
+        "ReportUrl": ["市场分析周报/月报","分析市场规模、增长趋势,评估市场体量","/big-member/image/wxreply/reportmm.png","https://mp.weixin.qq.com/s/rlJenKOvmHvqd9_4811otg?wxreply=%s"]
     }
 }

+ 34 - 4
src/jfw/modules/weixin/src/wx/wx.go

@@ -156,6 +156,36 @@ func MsgTxtHandler(w ResponseWriter, r *Request) {
 		w.ReplyText(config.Sysconfig["policysupport"].(string))
 	} else if r.Content == "2017政策" {
 		w.ReplyText(config.Sysconfig["2017policy"].(string))
+	} else if r.Content == "1" || r.Content == "2" || r.Content == "3" {
+		webdomain := config.Sysconfig["webdomain"].(string)
+		replyUrl := config.Sysconfig["replyUrl"].(string)
+		brt := *util.ObjToMap(config.Sysconfig["bigmemberReplyText"])
+		BRTArray := []string{}
+		switch r.Content {
+		case "1":
+			BRTArray = util.ObjArrToStringArr(brt["EntUrl"].([]interface{}))
+		case "2":
+			BRTArray = util.ObjArrToStringArr(brt["BuyerUrl"].([]interface{}))
+		case "3":
+			BRTArray = util.ObjArrToStringArr(brt["ReportUrl"].([]interface{}))
+		}
+		id := tools.MGLOG.Save(config.Sysconfig["bmwxrcoll"].(string), &map[string]interface{}{
+			"s_openid":    r.FromUserName,
+			"s_msg":       r.Content,
+			"l_timestamp": now.Unix(),
+			"isICRP":      0, //是否进入留资页面
+			"isICRW":      0, //是否提交留资信息
+			"isCRW":       0, //是否点击回复
+		})
+		go func() {
+			redis.Put("other", fmt.Sprintf("digitalreplay_%s", r.FromUserName), id, 24*60*60)
+		}()
+		w.ReplyNews([]Article{Article{
+			Title:       BRTArray[0],
+			PicUrl:      webdomain + BRTArray[2],
+			Description: BRTArray[1],
+			Url:         webdomain + replyUrl + fmt.Sprintf(BRTArray[3], id),
+		}})
 	} else if len(autoReply_reg.FindStringIndex(r.Content)) == 2 {
 		rContent := strings.TrimSpace(r.Content)
 		fastSubscribeText := config.Sysconfig["fastSubscribe"].(map[string]interface{})
@@ -408,8 +438,8 @@ func saveUser(u *UserInfo, source, pre, RSource, CSource string) (bool, string,
 		newUser["s_province"] = u.Province
 		newUser["s_city"] = u.City
 		newUser["i_applystatus"] = 1
-		if len(strings.Split(source, "_")) >2 {
-			if (strings.Split(source, "_")[2] == "GX") {
+		if len(strings.Split(source, "_")) > 2 {
+			if strings.Split(source, "_")[2] == "GX" {
 				disStr := strings.Split(source, "_")[0] + "_" + strings.Split(source, "_")[1][1:] + "_" + strings.Split(source, "_")[2]
 				log.Println("disStr", disStr)
 				diswordStr := redis.Get("other", disStr)
@@ -913,7 +943,7 @@ func Subscribe(w ResponseWriter, r *Request) {
 		ek := strings.SplitN(r.EventKey, "_", 3)[2]
 		log.Println("ek:", ek)
 		encry := ek[:1]
-		if (len(strings.Split(ek, "_"))>1){
+		if len(strings.Split(ek, "_")) > 1 {
 			suffix := strings.Split(ek, "_")[1]
 			fmt.Println(r.EventKey, ek, suffix)
 			if suffix == "GX" {
@@ -1093,7 +1123,7 @@ func ScanHandler(w ResponseWriter, r *Request) {
 	if strings.Contains(r.EventKey, "DIS_") {
 		ek := strings.Split(r.EventKey, "_")[1]
 		encry := ek[:1]
-		if (len(strings.Split(r.EventKey, "_"))>2){
+		if len(strings.Split(r.EventKey, "_")) > 2 {
 			suffix := strings.Split(r.EventKey, "_")[2]
 			if suffix == "GX" {
 				encry = "G"

BIN
src/web/staticres/big-member/image/wxreply/buyportrait.png


BIN
src/web/staticres/big-member/image/wxreply/entportrait.png


BIN
src/web/staticres/big-member/image/wxreply/reportmm.png


BIN
src/web/staticres/images/kfrx.png


BIN
src/web/staticres/images/zxzx.png


+ 1 - 0
src/web/staticres/js/login.js

@@ -294,6 +294,7 @@ function checkBigStatus () {
     url: '/bigmember/use/isAdd',
     success: function (res) {
       if (res && res.data) {
+        window.memberStatus = res.data.memberStatus
         if (res.data.memberStatus > 0) {
           $(".myorderDiv.lastBox").show()
         }

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

@@ -475,6 +475,8 @@ var vm = new Vue({
               } else {
                 $('#bid-collect').trigger('click') // 列表页批量收藏事件
               }
+            } else if (source == 'pc_index_bottom_adv') {
+              location.href = '/big/page/index'
             }
           }
         }

+ 1 - 1
src/web/templates/big-member/pc/page_index.html

@@ -15,7 +15,7 @@
     <link href='{{Msg "seo" "cdn"}}/css/pc.css?v={{Msg "seo" "version"}}' rel="stylesheet"/>
     <link href='{{Msg "seo" "cdn"}}/pccss/public-nav-1200.css?v={{Msg "seo" "version"}}' rel="stylesheet" type="text/css"/>
     <link href='{{Msg "seo" "cdn"}}/css/swiper.min.css?v={{Msg "seo" "version"}}' rel="stylesheet" type="text/css"/>
-    <link href='{{Msg "seo" "cdn"}}/big-member/css/page_index.css?v={{Msg "seo" "version"}}2' rel="stylesheet" type="text/css"/>
+    <link href='{{Msg "seo" "cdn"}}/big-member/css/page_index.css?v={{Msg "seo" "version"}}' rel="stylesheet" type="text/css"/>
     <link href="//cdn.jsdelivr.net/npm/element-ui@2.13.2/lib/theme-chalk/index.css" rel="stylesheet" />
     <link href='{{Msg "seo" "cdn"}}/css/collect-user-info.css?v={{Msg "seo" "version"}}' rel="stylesheet">
     <style>

+ 1 - 0
src/web/templates/common/baiducc.html

@@ -93,6 +93,7 @@
       "pccontent_bottom":  "PC快照页-底部",
       "pccontent_right":   "PC快照页-右部",
       "pcsearch_bottom":   "PC搜索列表页-底部",
+      "jy_pc_index_bottom": "PC首页广告位-底部",
       "wxcontent_bottom":  "微信快照页-底部",
       "wxpush_middle":     "微信推送历史页-中部",
       "wxsearch_middle":   "微信搜索列表页-中部",

+ 111 - 1
src/web/templates/common/pcbottom.html

@@ -505,17 +505,113 @@ if (location.href.indexOf('jyblog') === -1) {
     .right-side-box  .back-to-up:hover{
         background: #2cb7ca;
     }
+    .help-slide{
+      position: absolute;
+      left: -210px;
+      top: -20px;
+      width: 200px;
+      height: 86px;
+      background: #ffffff;
+      border-radius: 8px;
+      box-shadow: 0px 0px 28px 0px rgb(0 0 0 / 16%);
+      z-index: 100;
+    }
+    .help-slide-top{
+      text-align: center;
+      line-height: 46px;
+      color: #1d1d1d;
+      font-size: 14px;
+      border-bottom: 1px solid #ececec;
+    }
+    .help-slide-bottom{
+      position: relative;
+      padding: 8px 12px;
+    }
+    .help-slide-kf,.help-slide-zx{
+      display: inline-block;
+      font-size: 14px;
+      color: #2cb7ca;
+      padding-left: 20px;
+      line-height: 22px;
+      cursor: pointer;
+    }
+    .help-slide-kf{
+      float: left;
+      background: url('{{Msg "seo" "cdn"}}/images/kfrx.png?v={{Msg "seo" "version"}}') no-repeat left center;
+      background-size: 16px 16px;
+    }
+    .help-slide-zx{
+      position: relative;
+      float: right;
+      background: url('{{Msg "seo" "cdn"}}/images/zxzx.png?v={{Msg "seo" "version"}}') no-repeat left center;
+      background-size: 16px 16px;
+    }
+    .help-slide-bottom::after{
+      position: absolute;
+      content: '';
+      height: 38px;
+      width: 1px;
+      background-color: #ececec;
+      top: 0;
+      left: 49%;
+    }
+    .help-close{
+      position: absolute;
+      top: -12px;
+      left: -12px;
+      width: 24px;
+      height: 24px;
+      box-shadow: 0px 0px 28px 0px rgba(0,0,0,0.08);
+      cursor: pointer;
+    }
+    .kf-phone{
+      display: none;
+      position: absolute;
+      left: 10px;
+      top: 92px;
+      width: 189px;
+      height: 48px;
+      background: #2cb7ca;
+      border-radius: 8px;
+      color: #fff;
+      line-height: 48px;
+      font-size: 14px;
+      text-align: center;
+    }
+    .kf-phone::after{
+      content:'';
+      position: absolute;
+      left: 32px;
+      top: -6px;
+      width: 0;
+      height: 0;
+      border-left: 6px solid transparent;
+      border-bottom: 8px solid #2cb7ca;
+      border-right: 6px solid transparent;
+    }
+    .right-side-box .right-side-pop:hover::after .kf-phone{
+      display: none;
+    }
 </style>
 <!--E-侧边样式-->
 <!--S-侧边栏-->
 <div class="right-side-box" data-backside>
-    <div class="right-side-item open-customer" id="go-customer-4">
+    <div class="right-side-item" id="go-customer-4">
         <div class="hover-open-box" style="padding: 0;">
             <div class="icon-customer white icon-badge-number" data-badge-number=""></div>
             <div class="icon-badge-number text-customer" data-badge-number="">
                 <img src='{{Msg "seo" "cdn"}}/images/pc/slide_kefu_grey.png?v={{Msg "seo" "version"}}' alt="">
             </div>
         </div>
+        <div class="help-slide">
+          <img class="help-close" src='{{Msg "seo" "cdn"}}/images/t-close.png?v={{Msg "seo" "version"}}' alt="">
+          <div class="help-slide-top">有什么可以帮助您吗?</div>
+          <div class="help-slide-bottom">
+            <div class="help-slide-kf">客服热线</div>
+            <div class="help-slide-zx open-customer">在线咨询</div>
+          </div>
+          <div class="kf-phone">客服热线:400-108-6670</div>
+        </div>
     </div>
     <div class="right-side-phone right-side-pop">
         <span class=" text-customer"><img src='{{Msg "seo" "cdn"}}/images/pc/slide_phone_grey.png?v={{Msg "seo" "version"}}' alt=""></span>
@@ -704,6 +800,20 @@ if (location.href.indexOf('jyblog') === -1) {
             }, 10);
         }
         $("div[data-backtop]").off('click').on('click', goBackTop)
+        // 显示帮助弹框
+        $('#go-customer-4').click(function(){
+          $('.right-side-box .help-slide').fadeIn()
+        })
+        // 关闭帮助弹框
+        $('.right-side-box .help-close').off('click').on('click', function(e) {
+          e.stopPropagation()
+          $(this).parents('.help-slide').fadeOut()
+        })
+        // 客服
+        $('.help-slide-kf').off('click').on('click', function(e) {
+          e.stopPropagation()
+          $('.right-side-box .kf-phone').toggle()
+        })
     });
 </script>
 <script type="text/javascript">

+ 38 - 3
src/web/templates/frontRouter/wx/bigmember/free/perfect_info.html

@@ -10,6 +10,7 @@
     <meta name="apple-mobile-web-app-status-bar-style" content="black">
     <meta http-equiv="X-UA-Compatible" content="ie=edge">
     <meta http-equiv="X-UA-Compatible" content="ie=edge">
+    <meta name="referrer" content="always">
     <!--引入公共资源头部-->
     {{include "/big-member/meta.html"}}
     <script src="{{Msg "seo" "cdn"}}/js/jquery-3.2.1.min.js?v={{Msg "seo" "version"}}"></script>
@@ -105,7 +106,7 @@
             </div>
             <div class="j-footer">
                 <div class="j-button-group">
-                    <button class="j-button-cancel" @click="cancelForm">暂不提供</button>
+                    <button v-show="isShowCancel" class="j-button-cancel" @click="cancelForm">暂不提供</button>
                     <button class="j-button-confirm" :disabled="isSubmitDisabled" @click="submitForm">提交</button>
                 </div>
             </div>
@@ -513,7 +514,7 @@
       ajaxParams: {
         "name": "",
         "phone": "",
-        "source": utils.getParam('origin'),
+        "source": '',
         "agree": false,
         "mail": "",
         "province": "",
@@ -528,11 +529,23 @@
         "partnerNeeds": ""
       }
     },
+    created() {
+      if (utils.getParam('origin')) {
+        this.ajaxParams.source = utils.getParam('origin')
+      }
+      if (utils.getParam('target')) {
+        this.ajaxParams.source = utils.getParam('target')
+      }
+    },
     mounted() {
       this.ajaxGetEchoInfo()
+      this.wxTweetAjax('isICRP') // 公众号推文进入的埋点
       this.bigDocAjax('ICRP') // 进入留资页面埋点
     },
     computed: {
+      isShowCancel () {
+        return !utils.getParam('target')
+      },
       getTipStr () {
         var tipMap = {
           'article_original': '为给您匹配精准的推荐信息,请完善个人信息,免费查看原文',
@@ -617,6 +630,26 @@
       }
     },
     methods: {
+      // 从微信公众号推文进来的埋点
+      wxTweetAjax: function (type) {  
+        var wx_reply = utils.getParam('target')
+        if (wx_reply) {
+          try {
+            $.ajax({
+              type: "POST",
+              url: "/publicapply/drainage/wx/digitalReply",
+              data: {
+                mold: type
+              },
+              success: function(r) {
+                console.log(r, '触发留资 or 提交留资')
+              }
+            })
+          } catch (error) {
+            console.log(error)
+          }
+        }
+      },
       // 从引导语文案点击免费体验进来埋点
       bigDocAjax: function(type) {
         if (utils.getParam('mid')) {
@@ -897,6 +930,7 @@
         history.back()
       },
       submitForm () {
+        this.wxTweetAjax('isICRW') // 提交留资埋点公众号推文
         this.bigDocAjax('ICRW') // 提交留资埋点引导语
         this.ajaxParams.name = this.infoMap.name
         this.ajaxParams.phone = this.infoMap.phone
@@ -913,11 +947,12 @@
 
         var _this = this
         var loading = _this.showLoading()
+
         this.ajaxFn('/salesLeads/collectInfo', this.ajaxParams, function (r) {
           if (r) {
             loading.clear()
             if (r.error_msg === '') {
-              if (_this.ajaxParams.source === 'member_freeuse') {
+              if (_this.ajaxParams.source === 'member_freeuse' ||  utils.getParam('target')) {
                 _this.$dialog.close()
                 _this.$dialog.confirm({
                   message: '您的申请已提交,我们的客户经理会在24小时内尽快与您联系。',

+ 86 - 4
src/web/templates/pc/index.html

@@ -18,6 +18,8 @@
 <link rel="stylesheet" type="text/css" href="{{Msg "seo" "cdn"}}/pccss/public-nav-1200.css?v={{Msg "seo" "version"}}" />
 <link rel="stylesheet" type="text/css" href="{{Msg "seo" "cdn"}}/pccss/index.css?v={{Msg "seo" "version"}}" />
 <link href="{{Msg "seo" "cdn"}}/css/pc.css?v={{Msg "seo" "version"}}" rel="stylesheet">
+<link href="//cdn.jsdelivr.net/npm/element-ui@2.13.2/lib/theme-chalk/index.css" rel="stylesheet" />
+<link href='{{Msg "seo" "cdn"}}/css/collect-user-info.css?v={{Msg "seo" "version"}}' rel="stylesheet">
 <style>
 .useronline>img.nomalheadimg{
   border: none;
@@ -113,6 +115,26 @@
 	top: 50%;
 	z-index: 1001;
 }
+.pc-index-bottom{
+  position: fixed;
+  bottom: 0;
+  left: 0;
+  right: 0;
+  width: 100%;
+  height: 88px;
+  background: rgba(5,2,132,0.95);
+  z-index: 999;
+}
+.pc-index-bottom > .bottom-member-ad {
+  position: absolute;
+  display: inline-block;
+  width: 1200px;
+  height: 124px;
+  top: -34px;
+  left: 50%;
+  transform: translateX(-50%);
+  cursor: pointer;
+}
 </style>
 </head>
 	<body>
@@ -506,7 +528,10 @@
             </li>
           </ul>
       </div>
-
+      <!-- 底部广告位 -->
+      <div class="pc-index-bottom">
+        <img class="bottom-member-ad" adv_name="PC首页广告位-底部" src="" alt="底部广告位">
+      </div>
       {{include "/common/pcbottom.html"}}
 
 
@@ -581,8 +606,14 @@
         <img src="{{Msg "seo" "cdn"}}/images/pc/live_preheat_close.png" class="live_preheat_close"/>
       </div>
     </div>
-
-	</body>
+    <!-- 用户留资 -->
+  <div id="vue-collect-user-info"></div>
+  </body>
+<script src='{{Msg "seo" "cdn"}}/common-module/selector/js/china_area.js?v={{Msg "seo" "version"}}'></script>
+<script src='{{Msg "seo" "cdn"}}/common-module/selector/js/static-data.js?v={{Msg "seo" "version"}}'></script>
+<script src="//cdn.jsdelivr.net/npm/vue@2.6.12/dist/vue.min.js"></script>
+<script src="//cdn.jsdelivr.net/npm/element-ui@2.13.2/lib/index.js"></script>
+<script src='{{Msg "seo" "cdn"}}/js/pc-collect-user-info.js?v={{Msg "seo" "version"}}'></script>
 <script>
 $(function () {
     // 处理低高度屏幕下无法显示下方文字
@@ -611,6 +642,40 @@ $(function () {
     }else{
       console.log("11号后或者2号前")
     }
+    console.log(loginflag, '登录or未登录')
+    // 从login.js isAdd接口取大会员状态  赋值给全局变量
+    clearInterval(memberTimer)
+    var memberTimer = setInterval(() => {
+      if (window.memberStatus >= 0) {
+        clearInterval(memberTimer)
+      }
+      adBottomFn()
+    }, 500)
+    function adBottomFn () {
+      // 是大会员则不显示底部广告位
+      if (window.memberStatus > 0) {
+        // 首页底部广告位隐藏
+        $('.pc-index-bottom').hide()
+      } else {
+        var top1 = 0;
+        var top2 = 0;
+        var timer = null; // 定时器
+        $(document).scroll(function(){
+          clearTimeout(timer);
+            timer = setTimeout(isScrollEnd, 800);
+            top1 = document.documentElement.scrollTop || document.body.scrollTop;
+            // console.log("滚动中")
+            $('.pc-index-bottom').fadeOut()
+        });
+        function isScrollEnd() {
+            top2 = document.documentElement.scrollTop || document.body.scrollTop;
+            if(top1 == top2){
+              // console.log('滚动结束了')
+              $('.pc-index-bottom').fadeIn()
+            }
+        }
+      }
+    }
 })
 // 弹窗
 var times = new Date().getTime();
@@ -832,7 +897,23 @@ if(right_img_index > 0){
 }
 
 
-
+// 首页底部广告位
+{{$bottom:=(Ad "jy_pc_index_bottom" -1)}}
+console.log({{$bottom}})
+var bottom_img = ({{$bottom}})
+$('.pc-index-bottom .bottom-member-ad').attr('src', bottom_img[0].s_pic)
+$('.pc-index-bottom .bottom-member-ad').unbind('click').click(function () {
+  if (!loginflag) {
+    openLoginDig()
+    return
+  }
+  adv_statistics($(this)); // 广告百度统计
+  vm.dialogTitle = '请完善个人信息,立刻获得全部功能的产品试用'
+  vm.isNeedSubmit('pc_index_bottom_adv',function(){
+    // 不需要留资 回调
+    location.href = '/big/page/index'
+  })
+})
 
 //广告轮播
 $('.carousel').carousel({
@@ -915,6 +996,7 @@ window._bd_share_config = {
 		bdTop : 100
 	}],
 }
+
 $(function(){
 	setTimeout("document.getElementById(\"keywords\").focus()",50);
 	haslogin({{.T.logid}});