Ver Fonte

Merge branch 'master' into feature/v4.9.21

lianbingjie há 1 ano atrás
pai
commit
3ef146fe69

+ 3 - 1
src/jfw/modules/subscribepay/src/config.json

@@ -200,7 +200,9 @@
       "tid": "04"
     },
     "saleDep": {
-      "040000": true
+      "040000": true,
+      "040100": true,
+      "040200": true
     }
   },
   "payRaffle": {

+ 7 - 7
src/jfw/modules/subscribepay/src/entity/equityActive.go

@@ -39,7 +39,7 @@ var equityStockLock = sync.Mutex{} // 赠送视频权益码库存锁
 type EquityActive struct {
 	UserId           string // id 这边取到的id可能是职位id也可能是mongo库id
 	mgoId            string // mongo库id
-	positionId       string // 职位id
+	positionId       int    // 职位id
 	Phone            string // 手机号 用于发短信
 	OrderCode        string // 订单号
 	OrderType        int    // 1购买 2升级 3续费
@@ -203,7 +203,7 @@ func (e *EquityActive) setUserID() {
 	if info != nil && len(*info) > 0 {
 		log.Println("equityActive 获取到redis保存的用户身份信息:", orderKey, info)
 		e.mgoId = common.ObjToString((*info)["mgoId"])
-		e.positionId = fmt.Sprintf("%v", common.IntAll((*info)["positionId"]))
+		e.positionId = common.IntAll((*info)["positionId"])
 		phone = common.ObjToString((*info)["phone"])
 	}
 	if phone != "" {
@@ -229,7 +229,7 @@ func (e *EquityActive) setUserIDPayRaffle() {
 	if info != nil && len(*info) > 0 {
 		log.Println("PayRaffle 获取到redis保存的用户身份信息:", orderKey, info)
 		e.mgoId = common.ObjToString((*info)["mgoId"])
-		e.positionId = fmt.Sprintf("%v", common.IntAll((*info)["positionId"]))
+		e.positionId = common.IntAll((*info)["positionId"])
 		phone = common.ObjToString((*info)["phone"])
 	}
 	if phone != "" {
@@ -272,7 +272,7 @@ func (e *EquityActive) sendVipMsg(eName, code, ex_end_time string) {
 	// 发送站内信
 	p := util.MessageParam{
 		UserIds:     e.mgoId,
-		PositionIds: e.positionId,
+		PositionIds: fmt.Sprintf("%v", e.positionId),
 		Title:       fmt.Sprintf(siteMsg.Title, eName),
 		Content:     fmt.Sprintf(siteMsg.Content, e.ProductType, eName, code, ex_end_time, e.ProductType, eName, code),
 		MsgType:     siteMsg.MsgType,
@@ -309,7 +309,7 @@ func (e *EquityActive) isYearVip() bool {
 // SendPayRaffleMsg 支付成后发送抽奖消息
 func (e *EquityActive) SendPayRaffleMsg() {
 	// 获取用户id
-	e.setUserIDPayRaffle()
+	e.setUserID()
 	if e.mgoId == "" {
 		log.Println("SendPayRaffleMsg 未获取到有效的mgoId", e.OrderCode)
 		return
@@ -331,7 +331,7 @@ func (e *EquityActive) SendPayRaffleMsg() {
 	prizeOrder := map[string]interface{}{
 		"active_id":   activityInfo.ActivityId,
 		"phone":       e.Phone,
-		"position_id": e.positionId,
+		"position_id": common.If(e.positionId>0,e.positionId,nil),
 		"mgo_user_id": e.mgoId,
 		"order_code":  e.OrderCode,
 		"create_time": date.NowFormat(date.Date_Full_Layout),
@@ -352,7 +352,7 @@ func (e *EquityActive) SendPayRaffleMsg() {
 	// 发送站内信
 	p := util.MessageParam{
 		UserIds:     e.mgoId,
-		PositionIds: e.positionId,
+		PositionIds: fmt.Sprintf("%v", e.positionId),
 		Title:       siteMsg.Title,
 		Content:     fmt.Sprintf(siteMsg.Content, activityInfo.Name),
 		MsgType:     siteMsg.MsgType,

+ 3 - 0
src/web/staticres/public-pc/css/header-nav-mini.css

@@ -147,6 +147,9 @@ a.j-s-button:hover {
 #public-nav {
     height: unset;
 }
+#public-nav.relative{
+  position: relative;
+}
 .fixed-header {
     position: fixed;
     top: 0;

+ 5 - 0
src/web/staticres/public-pc/js/header-nav-mini.js

@@ -140,6 +140,11 @@ var headerNavMini = {
       $('.go-to-workspace').hide()
     }
     this.changeHeaderPlaceholder()
+    // 导航栏置顶or不置顶  登录:置顶  未登录:不置顶
+    var noStickMeta = document.querySelector('meta[name="cancel-nav-sticky"]')
+    if (noStickMeta) {
+      this.headerFixed(login)
+    }
   },
   changeMenuActive: function (name) {
     this.headerNav.find('[name='+name+']').addClass('active')

+ 30 - 5
src/web/staticres/tags/css/no-login-detail.css

@@ -147,15 +147,18 @@
   width: 100%;
   margin: 20px 0;
 }
-.no-login-detail .bid-banner > img{
+.no-login-detail .bid-banner > a{
+  width: 100%;
+  display: block;
+}
+.no-login-detail .bid-banner img{
   display: inline-block;
   width: 100%;
   max-height: 64px;
-  object-fit: contain;
+  /* object-fit: contain; */
   cursor: pointer;
+  border-radius: 4px;
 }
-
-
 .no-login-detail .bid-content {
   margin-top: 20px;
   padding: 32px;
@@ -472,4 +475,26 @@
 }
 .no-login-detail ul li{
   float: unset!important;
-}
+}
+
+
+.fixed-bottom-banner {
+    position: fixed;
+    bottom: 0;
+    left: 0;
+    right: 0;
+    display: flex;
+    justify-content: center;
+    width: 100%;
+    z-index: 999;
+}
+.advert-bottom-banner{
+    width: 100%;
+}
+.advert-bottom-banner img {
+    display: block;
+    /* object-fit: contain; */
+    cursor: pointer;
+    /* width: 1920px; */
+    width: 100%;
+}

+ 1 - 0
src/web/templates/pc/newIndex.html

@@ -9,6 +9,7 @@
   <meta name="format-detection" content="telephone=no" />
   <meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1" />
   <meta name="renderer" content="webkit" >
+  <meta name="cancel-nav-sticky" content="no-login" />
   <!-- pnc.html是pcbottom.html的依赖 -->
   {{include "/common/pnc.html"}}
   <link rel="canonical" href="https://www.jianyu360.cn">

+ 62 - 2
src/web/templates/pc/tags/detail.html

@@ -89,9 +89,16 @@
               </div>
             </div>
           </div>
+          {{$ad_1:=(Ad "pc-nologin-detail-middle" -1 .Host (cookie "SESSIONID"))}}
+          {{if $ad_1}}
           <div class="bid-banner">
-            <img id="login-banner-btn" class="login-node" src='{{Msg "seo" "cdn"}}/tags/images/login-banner.png?v={{Msg "seo" "version"}}' alt="loginBanner" />
+            {{range $ad := $ad_1}}
+            <a target="_blank" {{if $ad.S_link}}href="{{$ad.S_link}}"{{end}}>
+              <img id="login-banner-btn" src='{{$ad.S_pic}}' alt="{{$ad.S_picalt}}" />
+            </a>
+            {{end}}
           </div>
+          {{end}}
           {{if .T.canRead}}
           <div class="bid-content">
             <!-- 非<拟建项目>、<采购意向>基本信息表格 -->
@@ -323,7 +330,16 @@
     </div>
   </div>
 
-  {{include "/pc/tags/template/bottom-banner.html"}}
+    {{$ad_bottom:=(Ad "pc-nologin-detail-bottom" -1 .Host (cookie "SESSIONID"))}}
+    {{if $ad_bottom}}
+    <div class="fixed-bottom-banner advert-bottom-banner">
+      {{range $ad := $ad_bottom}}
+      <a class="advert-bottom-banner-link" target="_blank" {{if $ad.S_link}}href="{{$ad.S_link}}"{{end}}>
+        <img id="login-advert-bottom-btn" src='{{$ad.S_pic}}' alt="{{$ad.S_picalt}}" />
+      </a>
+      {{end}}
+    </div>
+    {{end}}
 	{{include "/common/pcbottom.html"}}
 
 
@@ -354,6 +370,50 @@
       } catch (e) {
         console.warn(e)
       }
+      $('.login-node').on('click', function () {
+          try {
+              if (!loginflag) {
+                  openLoginDig(false, 'reload')
+              }
+          } catch (error) {
+              openLoginDig(false, 'reload')
+          }
+      })
+
+      var memberTimer = setInterval(function () {
+          clearInterval(memberTimer)
+          adBottomFn()
+      }, 2000)
+      function adBottomFn () {
+          var top1 = 0;
+          var top2 = 0;
+          var timer = null;
+          $(document).scroll(function(){
+              clearTimeout(timer)
+              timer = setTimeout(isScrollEnd, 1000);
+              top1 = document.documentElement.scrollTop || document.body.scrollTop;
+              $('.fixed-bottom-banner').fadeOut()
+          })
+          function isScrollEnd() {
+              top2 = document.documentElement.scrollTop || document.body.scrollTop;
+              if(top1 == top2){
+                  $('.fixed-bottom-banner').fadeIn()
+              }
+          }
+      }
+      // 广告位链接如果是登录链接 则阻止a标签默认事件 在当前页打开登录弹框
+      $('.advert-bottom-banner-link').click(function(){
+        if (this.href.indexOf('?nol=1') > -1) {
+          openLoginDig(false, 'reload')
+          return false
+        }
+      })
+      $('.bid-banner > a').click(function(){
+        if (this.href.indexOf('?nol=1') > -1) {
+          openLoginDig(false, 'reload')
+          return false
+        }
+      })
     })
   </script>
   <!--百度统计start-->

+ 2 - 0
src/web/templates/pc/tags/index.html

@@ -6,6 +6,8 @@
     <meta name="renderer" content="webkit">
     <meta content="telephone=no" name="format-detection"/>
     <meta content="剑鱼标讯" theme="light" name="enable-header"/>
+    <!-- 未登录取消导航栏置顶效果meta标识 -->
+    <meta name="cancel-nav-sticky" content="no-login" />
     {{include "/common/pnc.html"}}
     <link href='{{Msg "seo" "cdn"}}/css/pc.css?v={{Msg "seo" "version"}}' rel="stylesheet" />
     <link href='{{Msg "seo" "cdn"}}/pccss/index.css?v={{Msg "seo" "version"}}' rel="stylesheet" />

+ 3 - 2
src/web/templates/pc/tags/template/bottom-banner.html

@@ -15,9 +15,10 @@
 }
 .advert-bottom-banner > img {
     display: block;
-    object-fit: contain;
+    /* object-fit: contain; */
     cursor: pointer;
-    width: 1920px;
+    /* width: 1920px; */
+    width: 100%;
 }
 </style>
 <div class="fixed-bottom-banner advert-bottom-banner">