Ver Fonte

企业画像修改

TANGSHIZHE há 4 anos atrás
pai
commit
0b8676edef

+ 22 - 4
src/jfw/modules/app/src/web/staticres/jyapp/big-member/js/ent_portrait.js

@@ -134,8 +134,8 @@ var vNode = {
         this.entInfo.id = eId
         this.entInfo.name = ''
         this.restore = this.reStoreState()
+        this.getPowerInfo()
         if (!this.restore) {
-            this.getPowerInfo()
             // 获取企业基本信息
             this.getEntBaseInfo()
         }
@@ -179,6 +179,10 @@ var vNode = {
                             _this.gotTab2 = true
                             console.log('获取企业中标动态...')
                         }
+                        // if(_this.powerInfo.memberStatus <= 0) {
+                        //     // 不是大会员时才请求访问量接口
+                        //     _this.getEntVisits()
+                        // }
                         _this.gotTab2 = true
                     }
                 });
@@ -196,7 +200,7 @@ var vNode = {
         },
         // 查看次数为零,显示遮罩
         getStatus: function () {
-            return (!this.conf._4 && !this.isVip) || (this.entvisit.total <= this.entvisit.usage)
+            return (!this.conf._4 && !this.isVip) || (this.entvisit.total <= this.entvisit.usage && this.powerInfo.memberStatus <= 0)
         },
         surplus: function () {
             return this.entvisit.total >= this.entvisit.usage
@@ -451,6 +455,22 @@ var vNode = {
                 type: 'GET',
                 url: '/bigmember/use/isAdd',
                 success: function (res) {
+                    res = {
+                        "error_code": 0,
+                        "error_msg": "",
+                        "data": {
+                          "combo": "专家版",
+                          "entname": "北京百智享科技有限公司",
+                          "isSubCount": false,
+                          "isUsed": true,
+                          "is_member_trial": false,
+                          "memberStatus": 0,
+                          "power": [
+                          ],
+                          "vipStatus": 2,
+                          "viper": true
+                        }
+                      }
                     if (res.error_code == 0) {
                         _this.conf.powerLoaded = true
                         if (res.data) {
@@ -480,10 +500,8 @@ var vNode = {
                             if (res.data.memberStatus > 0 && (power.indexOf(4) != -1||power.indexOf(12) != -1||power.indexOf(13) != -1)) {
                                 _this.getEntFollowState()
                             } else {
-                                debugger
                                 _this.entInfo.followSearchFinish = true
                                 _this.entInfo.entExist = false
-                                // 不是大会员时才请求访问量接口
                                 _this.getEntVisits()
                             }
                             _this.singleTab = false

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

@@ -222,10 +222,16 @@ 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 (res.data.memberStatus <= 0) {
+                      // 大会员和免费用户不显示企业画像记录菜单
+                      if(res.data.vipStatus > 0 && res.data.viper ) {
+                        $('#ent-follow-history').show()
+                      } else {
+                        $('#ent-follow-history').hide()
+                      }
+                    } else {
+                      $('#ent-follow-history').hide()
                     }
                     if ($.isArray(res.data.power)) {
                         pageUserInfo.power = res.data.power

+ 29 - 4
src/web/staticres/common-module/collection/js/history-project.js

@@ -94,19 +94,44 @@ var hisproComponent = {
         success: function(res) {
           if(res.error_code == 0) {
             loading.clear()
+            res.data.list = [
+              {
+                  "contacts": {
+                      "0351-5685774,15834073022": "段晓娟",
+                      "15834073022": "段晓娟"
+                  },
+                  "date": 1508413417,
+                  "id": "ABCY2FdcC4eIyA6RGRlc1wOCjMvDSB3V3h%2FPw4oPyEgWXxzdR1UCcU%3D",
+                  "projectname": "山西省教育数据中心运维服务及深度防护升级项目"
+              },
+              {
+                "contacts": {
+                    "0351-5685774": "1",
+                    "15834073022": "2"
+                },
+                "date": 1508410000,
+                "id": "ABCY2FdcC4eIyA6RGRlc1wOCjMvDSB3V3h%2FPw4oPyEgWXxzdR1UCcU%3D",
+                "projectname": "数据中心运维服务及深度防护升级项目"
+              }
+            ]
             if(res.data && res.data.list && res.data.list.length !== 0) {
-              let phoneArr = []
               res.data.list.forEach(function(item, i) {
+                let phoneArr = []
                 if(item.date) {
                   item.date = new Date(item.date * 1000).pattern('yyyy-MM-dd')
                 } else {
                   item.date = ''
                 }
-                Object.keys(item.contacts)[0].split(',').forEach(function(items, i) {
-                  console.log(item.contacts)
-                  phoneArr.push({[items]: item.contacts[Object.keys(item.contacts)[0]]})
+                console.log(Object.keys(item.contacts))
+
+                Object.keys(item.contacts).forEach(function(items, index) {
+                  console.log(items)
+                  console.log({[items]: item.contacts[Object.keys(item.contacts)[index]]})
+                  phoneArr.push({[items]: item.contacts[Object.keys(item.contacts)[index]]})
                 })
                 item.contacts = phoneArr
+                // console.log(item.contacts)
+
               })
               if(res.data.list.length <= 3) {
                 _this.hisData.showMoreBtn = false

+ 4 - 4
src/web/staticres/common-module/collection/js/vip-dialog.js

@@ -143,9 +143,9 @@ var vipComponent = {
       let isWeixin = utils.isWeiXinBrowser
       if(!isWeixin) {
         if (this.btnText == '去开通') {
-          if(this.type == 'item_9' || item.type == 'item_8') {
+          if(this.type == 'item_9' || this.type == 'item_8') {
             // 跳转到大会员
-            location.href = '/jyapp/big/page/landingPage'
+            location.href = '/jyapp/big/page/buy_commit'
           } else {
             // 跳转到超级订阅
             location.href = '/jyapp/vipsubscribe/vipsubscribe_new'
@@ -159,9 +159,9 @@ var vipComponent = {
         }
       } else {
         if (this.btnText == '去开通') {
-          if(this.type == 'item_9') {
+          if(this.type == 'item_9' || this.type == 'item_8') {
             // 跳转到大会员
-            location.href = '/big/wx/page/landingPage'
+            location.href = '/big/wx/page/buy_commit'
           } else {
             // 跳转到超级订阅
             location.href = '/front/vipsubscribe/vipsubscribe_new'

+ 5 - 1
src/web/staticres/me/js/mine.js

@@ -90,11 +90,15 @@ var mine = {
           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.memberStatus <= 0) {
                       // 大会员和免费用户不显示企业画像记录菜单
                       if(res.data.vipStatus > 0 && res.data.viper ) {
                         $('#ent-follow-history').show()
+                      } else {
+                        $('#ent-follow-history').hide()
                       }
+                  } else {
+                    $('#ent-follow-history').hide()
                   }
               }
           }