瀏覽代碼

企业画像记录菜单修改、企业画像访问修改

TANGSHIZHE 4 年之前
父節點
當前提交
e2cbcf3871

+ 1 - 0
src/jfw/modules/app/src/web/staticres/jyapp/big-member/js/ent_portrait.js

@@ -981,6 +981,7 @@ var vNode = {
                 Object.assign(this.topProject, $data.topProject || {})
                 Object.assign(this.entPortraitInfo, $data.entPortraitInfo || {})
                 Object.assign(this.powerInfo, $data.powerInfo || {})
+                Object.assign(this.entvisit, $data.entvisit || {})
                 this.singleTab = $data.singleTab
                 this.scrollTop = $data.scrollTop
                 this.gotTab2 = $data.gotTab2

+ 4 - 19
src/jfw/modules/app/src/web/staticres/jyapp/me/js/mine.js

@@ -21,8 +21,6 @@ var mine = {
         this.showUserMerge()
         // 获取小红点状态
         this.getRedDotState()
-        // 企业画像访问量查询
-        this.getEntVisits()
     },
     // ios返回刷新问题
     iosBackInvoke: function () {
@@ -86,23 +84,6 @@ var mine = {
             return false
         }
     },
-    // 企业画像访问量查询
-    getEntVisits: function() {
-      let _this = this
-      $.ajax({
-          type: "POST",
-          url: "/bigmember/portrait/subVipPortrait/usage",
-          success: function (res) {
-              console.log(res)
-              if(res.error_code == 0) {
-                  if(res.data) {
-                      $('.ent-follow-history .his_usage').text(res.data.usage)
-                      $('.ent-follow-history .his_total').text('/' + ' ' + res.data.total)
-                  }
-              }
-          }
-      });
-    },
     // 设置用户头像
     setUserImg: function () {
         console.log(pageUserInfo)
@@ -241,6 +222,10 @@ var mine = {
                 if (res && res.data) {
                     if (res.data.memberStatus != null || res.data.memberStatus != undefined) {
                         pageUserInfo.bigMemberStatus = res.data.memberStatus
+                        // 大会员和免费用户不显示企业画像记录菜单
+                        if(res.data.vipStatus > 0 && res.data.viper ) {
+                          $('.ent-follow-history').show()
+                        }
                     }
                     if ($.isArray(res.data.power)) {
                         pageUserInfo.power = res.data.power

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

@@ -195,7 +195,7 @@
                 <template #title>
                     <span :class="{bidinfo:!hasOnePower}">中标信息</span>
                     <span v-if="!hasOnePower || !surplus" class="bid_upgrade">升级</span>
-                    <span v-if="hasOnePower && surplus" class="bid_surplus">剩余:${entvisit.total - entvisit.usage}</span>
+                    <span v-if="hasOnePower && surplus && isVip" class="bid_surplus">剩余:${entvisit.total - entvisit.usage}</span>
                 </template>
                 <div class="bg-white tab-card" v-if="conf._4 && !getStatus">
                     <div class="card-row zb-info">

+ 1 - 5
src/jfw/modules/app/src/web/templates/me/mine.html

@@ -168,16 +168,12 @@
                             <span class="j-icon base-icon icon-arrow-right"></span>
                         </div>
                     </div>
-                    <div data-need-bind-phone class="menu_list ent-follow-history" data-href='/jyapp/frontPage/portraitRecord/sess/index'>
+                    <div style="display: none;" data-need-bind-phone class="menu_list ent-follow-history" data-href='/jyapp/frontPage/portraitRecord/sess/index'>
                         <div class="menu_list_left">
                             <span class="j-icon base-icon icon-company"></span>
                             <span class="label">企业画像记录</span>
                         </div>
                         <div class="menu_list_right">
-                            <span style="margin-right: .08rem;">
-                                <span class="his_usage" style="font-size: .28rem;color: #2ABED1;"></span>
-                                <span class="his_total" style="font-size: .22rem;color: #9B9CA3;"></span>
-                            </span>
                             <i class="dot-red"></i>
                             <span class="j-icon base-icon icon-arrow-right"></span>
                         </div>

+ 4 - 3
src/web/staticres/common-module/collection/js/ent_portrait.js

@@ -112,9 +112,9 @@ var vNode = {
                 btntext: '去开通'
             },
             entvisit: {
-                total: 150, // 本月画像次数总量
-                usage: 10, // 本月已使用次数
-                provin: -1 // 购买省份数量
+                total: 0, // 本月画像次数总量
+                usage: 0, // 本月已使用次数
+                provin: 0 // 购买省份数量
             }
         }
     },
@@ -974,6 +974,7 @@ var vNode = {
                 Object.assign(this.topProject, $data.topProject || {})
                 Object.assign(this.entPortraitInfo, $data.entPortraitInfo || {})
                 Object.assign(this.powerInfo, $data.powerInfo || {})
+                Object.assign(this.entvisit, $data.entvisit || {})
                 this.singleTab = $data.singleTab
                 this.scrollTop = $data.scrollTop
                 this.gotTab2 = $data.gotTab2

+ 19 - 19
src/web/staticres/me/js/mine.js

@@ -22,8 +22,8 @@ var mine = {
 
         this.linkClickEvents()
         this.getOfflineMessageCount()
-        // 企业画像访问量查询
-        this.getEntVisits()
+        // 企业画像记录访问权限
+        this.getBigVipState()
     },
     // ios返回刷新问题
     iosBackInvoke: function () {
@@ -38,23 +38,6 @@ var mine = {
             isPageHide = true
         });
     },
-    // 企业画像访问量查询
-    getEntVisits: function() {
-      let _this = this
-      $.ajax({
-          type: "POST",
-          url: "/bigmember/portrait/subVipPortrait/usage",
-          success: function (res) {
-              console.log(res)
-              if(res.error_code == 0) {
-                  if(res.data) {
-                      $('#ent-follow-history .his_usage').text(res.data.usage)
-                      $('#ent-follow-history .his_total').text('/' + ' ' + res.data.total)
-                  }
-              }
-          }
-      });
-    },
     // 设置用户头像
     setUserImg: function () {
         $('.user-img > img').attr("src", this.pageUserInfo.avatar || this.pageUserInfo.headimageurl)
@@ -100,6 +83,23 @@ var mine = {
             }
         })
     },
+    getBigVipState: function () {
+      var _this = this
+      $.ajax({
+          type: 'GET',
+          url: '/bigmember/use/isAdd?t=' + Date.now(),
+          success: function (res) {
+              if (res && res.data) {
+                  if (res.data.memberStatus != null || res.data.memberStatus != undefined) {
+                      // 大会员和免费用户不显示企业画像记录菜单
+                      if(res.data.vipStatus > 0 && res.data.viper ) {
+                        $('#ent-follow-history').show()
+                      }
+                  }
+              }
+          }
+      })
+    },
     setPageState: function (info) {
         if (!info) return
         Object.assign(this.pageUserInfo, info)

+ 2 - 1
src/web/templates/frontRouter/wx/collection/sess/ent_portrait.html

@@ -200,7 +200,7 @@
                 <template #title>
                     <span :class="{bidinfo:!hasOnePower}">中标信息</span>
                     <span v-if="!hasOnePower || !surplus" class="bid_upgrade">升级</span>
-                    <span v-if="hasOnePower && surplus" class="bid_surplus">剩余:${entvisit.total - entvisit.usage}</span>
+                    <span v-if="hasOnePower && surplus && isVip" class="bid_surplus">剩余:${entvisit.total - entvisit.usage}</span>
                 </template>
                 <div class="bg-white tab-card" v-if="conf._4 && !getStatus">
                     <div class="card-row zb-info">
@@ -228,6 +228,7 @@
                         <span>${entPortraitInfo.timeRangeEnd ? new Date(entPortraitInfo.timeRangeEnd * 1000).pattern('yyyy/MM/dd') : '至今'}</span>
                     </div>
                 </div>
+                <div class="vip_component" v-if="getStatus" style="height:2.12rem;background:url('/common-module/collection/image/bg/vip_bg_0.png') no-repeat;background-size:100% 100%"></div>
                 <div class="j-container empty" v-if="conf._13 && !conf._4 && topProject.list.length === 0">
                     <div class="j-img img-empty empty-img"></div>
                     <p class="empty-text">暂无项目动态</p>

+ 1 - 5
src/web/templates/weixin/my.html

@@ -144,16 +144,12 @@
                             <span class="j-icon base-icon icon-arrow-right"></span>
                         </div>
                     </div>
-                    <div class="menu-list-item clickable" id="ent-follow-history" data-href="/weixin/frontPage/portraitRecord/sess/index">
+                    <div style="display: none;" class="menu-list-item clickable" id="ent-follow-history" data-href="/weixin/frontPage/portraitRecord/sess/index">
                         <div class="m-l-i-left">
                             <span class="j-icon base-icon icon-company"></span>
                             <span class="m-l-i-label">企业画像记录</span>
                         </div>
                         <div class="m-l-i-right">
-                            <span style="margin-right: .08rem;">
-                                <span class="his_usage" style="font-size: .28rem;color: #2ABED1;"></span>
-                                <span class="his_total" style="font-size: .22rem;color: #9B9CA3;"></span>
-                            </span>
                             <i class="dot-red"></i>
                             <span class="j-icon base-icon icon-arrow-right"></span>
                         </div>