瀏覽代碼

Merge branch 'dev4.6.2.4' of ssh://192.168.3.207:10022/qmx/jy into dev4.6.2.4

wangchuanjin 3 年之前
父節點
當前提交
f74a3ba286

+ 5 - 12
src/jfw/front/swordfish.go

@@ -2115,20 +2115,13 @@ func (f *Front) HistorypushPaging() error {
 
 //电脑端招标订阅
 func (m *Front) Subscribe() error {
-	var shareid = m.GetString("id")
-	if len(shareid) == 0 {
-		shareid = "10" //fmt.Sprintf("%s%d", config.Seoconfig["jydyy"].(string)+fmt.Sprintf("%d", time.Now().UnixNano())[7:14], rand.Intn(9))
+	isBuyed := false
+	if userId, _ := m.GetSession("userId").(string); userId != "" {
+		vStatus := jy.GetVipState(public.Mysql, public.MQFW, userId)
+		isBuyed = vStatus.VipState > 0
 	}
+	m.T["isBuyed"] = isBuyed
 	m.T["logid"] = config.Seoconfig["jydyy"].(string)
-	m.T["noshareid"] = shareid
-	m.T["shareid"] = se.EncodeString(shareid)
-	myopenid, _ := m.Session().Get("s_m_openid").(string)
-	m.T["openid"] = se.EncodeString(myopenid)
-	mynickname, _ := m.Session().Get("s_nickname").(string)
-	myavatar, _ := m.Session().Get("s_avatar").(string)
-	m.T["nickname"] = mynickname
-	m.T["avatar"] = myavatar
-	m.T["signature"] = wx.SignJSSDK(m.Site() + m.Url())
 	return m.Render("/pc/subscribe_new.html", &m.T)
 }
 

+ 1 - 1
src/jfw/modules/app/src/web/staticres/jyapp/big-member/css/analysis_result.css

@@ -358,7 +358,7 @@
     display: flex;
     align-items: center;
     justify-content: space-between;
-    padding: 5px 6px 8px;
+    padding: 5px 8px 8px;
     color: #5F5E64;
     font-size: .2rem;
     line-height: .36rem;

+ 38 - 26
src/jfw/modules/app/src/web/staticres/jyapp/big-member/js/ent_portrait.js

@@ -161,6 +161,7 @@ var vNode = {
     if (storageId && storageId !== eId) {
       sessionStorage.removeItem('winner_high_set')
       sessionStorage.removeItem('winner_high_eid')
+      sessionStorage.removeItem('is-click-set')
     }
   },
   mounted: function () {
@@ -177,35 +178,45 @@ var vNode = {
       _this.getStickyTop()
     })
   },
+  beforeUpdate: function(){
+    // console.log($('.win-analyse').length)
+    var storageClick = JSON.parse(sessionStorage.getItem('is-click-set'))
+    if ($('.win-analyse').length && $('.win-analyse').length > 0 && storageClick) {
+      this.$nextTick(function(){
+        document.querySelector('.win-analyse').scrollIntoView()
+        // sessionStorage.removeItem('is-click-set')
+      })
+    }
+  },
   watch: {
     tabActiveName: function (newVal, oldVal) {
-        var _this = this
-        if (newVal == '2') {
-            this.$nextTick(function () {
-                if (_this.gotTab2) {
-                    // 初始化图表
-                    if (_this.entPortraitInfo && _this.conf.showPortraitAll && !_this.singleTab) {
-                        _this.initChartsData();
-                    }
-                } else {
-                    if (_this.conf._4) {
-                        // 获取企业画像信息-4
-                        _this.getEntPortrait(function () {
-                            _this.initChartsData()
-                        })
-                        _this.gotTab2 = true
-                        console.log('获取企业全景分析...')
-                    }
-                    // 获取企业中标动态-13
-                    if (_this.conf._13) {
-                        // _this.getProjectNews()
-                        _this.gotTab2 = true
-                        console.log('获取企业中标动态...')
-                    }
+      var _this = this
+      if (newVal == '2') {
+        this.$nextTick(function () {
+            if (_this.gotTab2) {
+                // 初始化图表
+                if (_this.entPortraitInfo && _this.conf.showPortraitAll && !_this.singleTab) {
+                    _this.initChartsData();
                 }
-            });
-        }
-    },
+            } else {
+                if (_this.conf._4) {
+                    // 获取企业画像信息-4
+                    _this.getEntPortrait(function () {
+                        _this.initChartsData()
+                    })
+                    _this.gotTab2 = true
+                    console.log('获取企业全景分析...')
+                }
+                // 获取企业中标动态-13
+                if (_this.conf._13) {
+                    // _this.getProjectNews()
+                    _this.gotTab2 = true
+                    console.log('获取企业中标动态...')
+                }
+            }
+        });
+      }
+    }
   },
   computed: {
     // 3个权限有1个就为true(取反为3个权限1个都没有)
@@ -1163,6 +1174,7 @@ var vNode = {
       var url = this.getProjectNewsUrl()
       var reqSign = url.indexOf('subVipPortrait') === -1 ? 'bigmember' : 'svip'
       if (this.conf._4) {
+        sessionStorage.setItem('is-click-set', 1)
         location.href = './free_high_set?header=中标信息高级分析设置&eid=' + utils.getParam('eId') + '&reqSign=' + reqSign
       } else {
         this.$dialog.confirm({

+ 11 - 13
src/jfw/modules/app/src/web/staticres/jyapp/big-member/js/unit_portrayal.js

@@ -174,6 +174,15 @@ var vNode = {
           newVal.setOption(chartOptions.deformPieChart);
           newVal.resize()
         }
+      },
+      chartLoading: function (params) {
+        var storageClick = sessionStorage.getItem('is-click-set')
+        if (!params && storageClick) {
+          this.$nextTick(function(){
+            document.querySelector('.win-analyse').scrollIntoView()
+            sessionStorage.removeItem('is-click-set')
+          })
+        }
       }
     },
     created () {
@@ -191,7 +200,7 @@ var vNode = {
         
         this.getNewMsg(); // 中标动态
         this.getChartData(); // 企业画像
-        // this.init();
+        // this.init()
     },
     beforeDestroy() {
       window.removeEventListener("resize", this.init,20);
@@ -1318,19 +1327,8 @@ var vNode = {
             return maxIndex
         },
         goHighSet: function() {
+          sessionStorage.setItem('is-click-set', 1)
           location.href = './free_high_set?header=采购单位高级分析设置&entName=' + decodeURIComponent(utils.getParam('entName'))
-          // if (!this.getStatus) {
-          //   location.href = './free_high_set?header=采购单位高级分析设置&entName=' + decodeURIComponent(utils.getParam('entName'))
-          // } else {
-          //   this.$dialog.confirm({
-          //     className:'promatch',
-          //     title: '您暂无使用权限',
-          //     message: '您未购买此服务,如需使用请联系您的销售人员或客服升级套餐,谢谢!',
-          //     showCancelButton: false,
-          //     confirmButtonColor: '#2cb7ca',
-          //     confirmButtonText: '我知道了'
-          //   }).then(function () {})
-          // }
         }
     }
 }

+ 1 - 1
src/jfw/modules/app/src/web/templates/big-member/page_ent_portrait.html

@@ -222,7 +222,7 @@
             <hispro-component type="winner" :id="entInfo.id"></hispro-component>
           </div>
           <!-- 高级分析 -->
-          <div class="win-analyse">
+          <div class="win-analyse" ref="setRef">
             <span class="win-bid-title">中标分析</span>
             <div class="high-link" @click="goHighSet">
               <span>高级分析设置</span>

+ 1 - 1
src/jfw/modules/app/src/web/templates/big-member/page_free_high_set.html

@@ -69,7 +69,7 @@
           </div>
           <div class="data-container">
             <van-cell title="项目搜索范围" is-link :value="conf.scope" @click="popClick('scope')"></van-cell>
-            <van-cell title="项目地区" is-link :value="conf.area" @click="popClick('area')"></van-cell>
+            <van-cell class="area-class" title="项目地区" is-link :value="conf.area" @click="popClick('area')"></van-cell>
             <van-cell title="行业" is-link :value="conf.industry" @click="popClick('industry')"></van-cell>
           </div>
           <div class="years-container">

+ 10 - 12
src/web/staticres/big-member/js/unit_portrayal.js

@@ -171,6 +171,15 @@ var vNode = {
           newVal.setOption(chartOptions.deformPieChart);
           newVal.resize()
         }
+      },
+      chartLoading: function (params) {
+        var storageClick = sessionStorage.getItem('is-click-set')
+        if (!params && storageClick) {
+          this.$nextTick(function(){
+            document.querySelector('.win-analyse').scrollIntoView()
+            sessionStorage.removeItem('is-click-set')
+          })
+        }
       }
     },
     created () {
@@ -1299,19 +1308,8 @@ var vNode = {
             return maxIndex
         },
         goHighSet: function() {
+          sessionStorage.setItem('is-click-set', 1)
           location.href = '/big/wx/page/free_high_set?header=采购单位高级分析设置&entName=' + decodeURIComponent(utils.getParam('entName'))
-          // if (!this.getStatus) {
-          //   location.href = '/big/wx/page/free_high_set?header=采购单位高级分析设置&entName=' + decodeURIComponent(utils.getParam('entName'))
-          // } else {
-          //   this.$dialog.confirm({
-          //     className:'promatch',
-          //     title: '您暂无使用权限',
-          //     message: '您未购买此服务,如需使用请联系您的销售人员或客服升级套餐,谢谢!',
-          //     showCancelButton: false,
-          //     confirmButtonColor: '#2cb7ca',
-          //     confirmButtonText: '我知道了'
-          //   }).then(function () {})
-          // }
         }
     }
 }

+ 19 - 0
src/web/staticres/common-module/big-member/js/high_set.js

@@ -83,6 +83,14 @@ var highSet = new Vue({
         this.conf.start = this.conf.end
         this.conf.end = newVal
       }
+    },
+    'conf.area': function (newVal) {
+      console.log(newVal)
+      if (newVal == '全国') {
+        $('.area-class .van-cell__value span').html('全部')
+      } else {
+        $('.area-class .van-cell__value span').html(newVal)
+      }
     }
   },
   computed: {
@@ -143,6 +151,11 @@ var highSet = new Vue({
     var header = decodeURIComponent(utils.getParam('header'))
     this.setHeaderTitle(header)
     this.getFilterApi()
+    if (this.conf.area == '全国') {
+      $('.area-class .van-cell__value span').html('全部')
+    } else {
+      $('.area-class .van-cell__value span').html(this.conf.area)
+    }
   },
   methods: {
     // 设置title
@@ -325,6 +338,11 @@ var highSet = new Vue({
       }
       this.$refs.projectAreaSelector.arrangeListMap(map)
       this.$refs.projectAreaSelector.setState(this.selectAreaList)
+      $('.area-card-item').each(function(){
+        if($(this).html() == '全国') {
+          $(this).html('全部')
+        }
+      })
     },
     // 过滤行业数据
     initProjectIndustrySelector: function (data) {
@@ -464,6 +482,7 @@ var highSet = new Vue({
       this.conf.end = new Date().getFullYear()
       this.conf.match = 0
       this.filterInitData.area = []
+      this.selectAreaList = ['全国']
       this.selectIndustryList = []
       this.selectScopeList = ['purchasing']
     }

+ 12 - 0
src/web/staticres/common-module/collection/js/ent_portrait.js

@@ -158,6 +158,7 @@ var vNode = {
     if (storageId && storageId !== eId) {
       sessionStorage.removeItem('winner_high_set')
       sessionStorage.removeItem('winner_high_eid')
+      sessionStorage.removeItem('is-click-set')
     }
 
   },
@@ -175,6 +176,16 @@ var vNode = {
       _this.getStickyTop()
     })
   },
+  beforeUpdate: function(){
+    // console.log($('.win-analyse').length)
+    var storageClick = JSON.parse(sessionStorage.getItem('is-click-set'))
+    if ($('.win-analyse').length && $('.win-analyse').length > 0 && storageClick) {
+      this.$nextTick(function(){
+        document.querySelector('.win-analyse').scrollIntoView()
+        // sessionStorage.removeItem('is-click-set')
+      })
+    }
+  },
   watch: {
     tabActiveName: function (newVal, oldVal) {
       var _this = this
@@ -1146,6 +1157,7 @@ var vNode = {
       var url = this.getProjectNewsUrl()
       var reqSign = url.indexOf('subVipPortrait') === -1 ? 'bigmember' : 'svip'
       if (this.conf._4) {
+        sessionStorage.setItem('is-click-set', 1)
         location.href = '/big/wx/page/free_high_set?header=中标信息高级分析设置&eid=' + utils.getParam('eId') + '&reqSign=' + reqSign
       } else {
         this.$dialog.confirm({

+ 30 - 0
src/web/staticres/css/subscribe_new.css

@@ -798,6 +798,36 @@
     text-align: center;
     margin: 0 30px;
     cursor: pointer;
+    position: relative;
+    overflow: hidden;
+    transition: 0.7s;
+}
+
+.subpage-button::after {
+    position: absolute;
+    left: 0;
+    top: 0;
+    content: '';
+    display: block;
+    width: 180px;
+    height: 46px;
+    background-image: linear-gradient(
+            0deg,
+            rgba(0, 0, 0, 0),
+            rgba(255, 255, 255, 0.3),
+            rgba(0, 0, 0, 0)
+    );
+    transform: rotate(-45deg) translate(0, -360px);
+}
+.subpage-button:hover::after {
+    /* 过渡效果只能再鼠标放上去生效 不然鼠标离开也会有效果 */
+    transition: 1s ease-in-out;
+    transform: rotate(-45deg) translate(0, 80px);
+}
+
+.subpage-button:hover {
+    transform: scale(1.2);
+    box-shadow: 10px 10px 10px rgba(0, 0, 0, 0.5);
 }
 
 .subpage-button.gold {

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

@@ -210,9 +210,6 @@ var getNewShareId = function(num,isFirst){
 					$(".wxlinkdiv").attr("src","/front/share/"+pageshareid);
 					break;
 				case "11"://订阅页面
-					$("#dyym-1 img").attr("src","/front/share/"+kopshareid);
-					$("#dyym-2").attr("src","/front/share/"+pageshareid);
-					$(".secondleft img").attr("src","/front/share/"+pageshareid);
 					$("#vipCode").attr("src","/front/share/"+kopshareid);
 					break;
 				case "12"://搜索列表页

+ 1 - 1
src/web/templates/big-member/wx/page_free_high_set.html

@@ -69,7 +69,7 @@
           </div>
           <div class="data-container">
             <van-cell title="项目搜索范围" is-link :value="conf.scope" @click="popClick('scope')"></van-cell>
-            <van-cell title="项目地区" is-link :value="conf.area" @click="popClick('area')"></van-cell>
+            <van-cell class="area-class" title="项目地区" is-link :value="conf.area" @click="popClick('area')"></van-cell>
             <van-cell title="行业" is-link :value="conf.industry" @click="popClick('industry')"></van-cell>
           </div>
           <div class="years-container">

+ 36 - 12
src/web/templates/pc/subscribe_new.html

@@ -56,7 +56,7 @@
 <!--购买按钮-->
 <div class="line-flex CfadeInUp">
     <div class="subpage-button gold  open-customer" id="go-info-subscribe-0">了解详情</div>
-    <div class="subpage-button darkblue" data-go-buy-subscribe id="go-buy-subscribe-0">立即购买</div>
+    <div class="subpage-button darkblue" id="go-buy-subscribe-0"  data-go-buy-subscribe>立即购买</div>
 </div>
 
 <div class="space_60px"></div>
@@ -83,13 +83,13 @@
                 <div class="content">搜索全国超七千万企业工商、项目情报信息。</div>
             </div>
             <div class="content-right">
-                <img src="/images/subscribe/scenario_1.png" alt="" style="width: 706px;height: 432px">
+                <img src="{{Msg "seo" "cdn"}}/images/subscribe/scenario_1.png?v={{Msg "seo" "version"}}" alt="" style="width: 706px;height: 432px">
             </div>
         </div>
         <div class="space_30px"></div>
         <div class="line-flex">
             <div class="subpage-button gold  open-customer" id="go-info-subscribe-1">了解详情</div>
-            <div class="subpage-button darkblue" data-go-buy-subscribe id="go-buy-subscribe-1">立即购买</div>
+            <div class="subpage-button darkblue" id="go-buy-subscribe-1"  data-go-buy-subscribe>立即购买</div>
         </div>
     </div>
     <!--线索获取更精准-->
@@ -111,13 +111,13 @@
                 <div class="content">企业联系方式全公开,一键直达项目负责人。</div>
             </div>
             <div class="content-right">
-                <img src="/images/subscribe/scenario_2.png" alt="" style="width: 532px;height: 432px">
+                <img src="{{Msg "seo" "cdn"}}/images/subscribe/scenario_2.png?v={{Msg "seo" "version"}}" alt="" style="width: 532px;height: 432px">
             </div>
         </div>
         <div class="space_30px"></div>
         <div class="line-flex">
             <div class="subpage-button gold  open-customer" id="go-info-subscribe-2">了解详情</div>
-            <div class="subpage-button darkblue" data-go-buy-subscribe id="go-buy-subscribe-2">立即购买</div>
+            <div class="subpage-button darkblue" id="go-buy-subscribe-2"  data-go-buy-subscribe>立即购买</div>
         </div>
     </div>
     <!--分析决策更科学-->
@@ -139,13 +139,13 @@
                 <div class="content">订阅招标项目信息提供周报/月报多维分析,帮助销售管理者快速做出预判与决策。</div>
             </div>
             <div class="content-right">
-                <img src="/images/subscribe/scenario_3.png" alt="" style="width: 630px;height: 432px">
+                <img src="{{Msg "seo" "cdn"}}/images/subscribe/scenario_3.png?v={{Msg "seo" "version"}}" alt="" style="width: 630px;height: 432px">
             </div>
         </div>
         <div class="space_30px"></div>
         <div class="line-flex">
             <div class="subpage-button gold  open-customer" id="go-info-subscribe-3">了解详情</div>
-            <div class="subpage-button darkblue" data-go-buy-subscribe id="go-buy-subscribe-3">立即购买</div>
+            <div class="subpage-button darkblue" id="go-buy-subscribe-3"  data-go-buy-subscribe>立即购买</div>
         </div>
     </div>
 </div>
@@ -155,7 +155,7 @@
         <div class="line-flex">
             <span class="split-box--before"></span>
             <div class="second-desc">免费订阅</div>
-            <img src="/images/subscribe/sub-compare.png" alt="对比" style="width: 39px;height: 18px;margin: 0 10px;">
+            <img src="{{Msg "seo" "cdn"}}/images/subscribe/sub-compare.png?v={{Msg "seo" "version"}}" alt="对比" style="width: 39px;height: 18px;margin: 0 10px;">
             <div class="second-desc">超级订阅</div>
             <span class="split-box--after"></span>
         </div>
@@ -245,11 +245,26 @@
     </div>
 </div>
 <div class="app-bottom-box">
-    <img class="app-bottom-tobuy" src="/images/subscribe/sub-bottom-bg.png" usemap="#image_map">
+    <img class="app-bottom-tobuy" src="{{Msg "seo" "cdn"}}/images/subscribe/sub-bottom-bg.png?v={{Msg "seo" "version"}}" usemap="#image_map">
     <map name="image_map">
         <area data-go-buy-subscribe coords="1553,95,1853,174" shape="rect">
     </map>
 </div>
+
+<!-- 超级订阅弹窗 -->
+<div class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel">
+    <div class="modal-dialog modal-dialog-subvip modal-sm" role="document">
+        <div class="modal-content">
+            <img src="{{Msg "seo" "cdn"}}/images/subscribe/vip_toUse.png?v={{Msg "seo" "version"}}" alt="" style="width: 335px;height: 447px">
+            <button type="button" class="close vip" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
+            <div class="vip-code">
+                <img id="vipCode" alt="" style="width: 139px;height: 139px">
+                <p class="vip-text">扫描二维码购买超级订阅</p>
+            </div>
+        </div>
+    </div>
+</div>
+
 <button class="btn hidden" id="cb-01" data-toggle="modal" data-target="#myModal-01"></button>
 <!--百度统计start-->
 {{include "/common/pcbottom.html"}}
@@ -257,21 +272,30 @@
 <!--百度统计end-->
 <script src="https://cdn.jsdelivr.net/npm/countup.js@1.9.3/dist/countUp.js"></script>
 <script>
+    haslogin({{.T.logid}});
+    toggleShowBuy({{.T.isBuyed}})
     window.onbeforeunload = function(){
         document.documentElement.scrollTop = 0;  //ie下
         document.body.scrollTop = 0;  //非ie
     }
     function toggleShowBuy (type) {
         if (type) {
+            //已购买扫码使用
             $("div*[data-go-buy-subscribe]").siblings().hide()
-            $("div*[data-go-buy-subscribe]").text('立即使用')
+            $("div*[data-go-buy-subscribe]").text('立即使用').attr("data-toggle","modal").attr("data-target",".bs-example-modal-sm")
             $(".app-bottom-box").hide()
         } else {
+            //为购买点击跳转购买链接
             $("div*[data-go-buy-subscribe]").siblings().show()
-            $("div*[data-go-buy-subscribe]").text('立即购买')
+            $("div*[data-go-buy-subscribe]").text('立即购买').on("click",function (){
+                window.location.href="/"
+            })
             $(".app-bottom-box").show()
         }
     }
+    $("#myModal-01").on("hidden.bs.modal", function () {
+        $(".public-nav").css({"padding-right":""});
+    })
     $(function () {
         ;(function animateUp(){
             var obj = $('.CfadeInUp');
@@ -288,7 +312,6 @@
             // 循环数组,判断obj的位置是否在可视区中
             function judgeTop(){
                 for(var j=0; j<num.length;j++){
-                    console.log(j,wScrollTop,num[j],wScrollTop+wH-50,num[j] >= wScrollTop && num[j] < (wScrollTop+wH-50))
                     if (num[j] >= wScrollTop && num[j] < (wScrollTop+wH-50)) {
                         if(j == 0){
                             obj.eq(j).css({
@@ -357,6 +380,7 @@
         }
         $(window).scroll(windowScrollFn)
     })
+
 </script>
 </body>
 </html>