Quellcode durchsuchen

企业画像去开通返回问题

TANGSHIZHE vor 4 Jahren
Ursprung
Commit
11c2517505

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

@@ -207,6 +207,10 @@ var vNode = {
         }
     },
     methods: {
+        // 点击去开通记住tab栏下标
+        tabActive: function(data) {
+            this.savePageState()
+        },
         showToast: function (message) {
             this.$toast({
                 duration: 1500,

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

@@ -255,13 +255,13 @@
                     </div>
                 </div>
                 <div class="vip_component" v-if="getStatus" style="height:9.16rem;background:url('/common-module/collection/image/bg/vip_bg_1.png') no-repeat;background-size:100% 100%">
-                    <vip-component type="item_1" :entvisit="entvisit" imgurl='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/collection/image/bg/vip_ex_1.png'></vip-component>
+                    <vip-component @tabactive="tabActive" type="item_1" :entvisit="entvisit" imgurl='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/collection/image/bg/vip_ex_1.png'></vip-component>
                 </div>
                 <div class="bg-white tab-card cell-list history-list" v-if="conf._4 && tabActiveName == '2' && !getStatus">
                     <hispro-component type="winner" :id="entInfo.id"></hispro-component>
                 </div>
                 <div class="vip_component" v-if="getStatus" style="height:11.36rem;background:url('/common-module/collection/image/bg/vip_bg_9.png') no-repeat;background-size:100% 100%">
-                    <vip-component type="item_9" :entvisit="entvisit" imgurl='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/collection/image/bg/vip_ex_9.png'></vip-component>
+                    <vip-component @tabactive="tabActive" type="item_9" :entvisit="entvisit" imgurl='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/collection/image/bg/vip_ex_9.png'></vip-component>
                 </div>
                 <div class="bg-white tab-card charts" v-if="conf._4 && tabActiveName == '2' && annualData.rows.length !== 0 && !getStatus">
                     <div class="tab-card-title">年度项目统计</div>
@@ -280,7 +280,7 @@
                     <div class="tab-card-tip">注:项目金额指所有项目的中标金额之和,少数缺失的中标金额,用项目预算补充。</div>
                 </div>
                 <div class="vip_component" v-if="getStatus" style="height:11.12rem;background:url('/common-module/collection/image/bg/vip_bg_2.png') no-repeat;background-size:100% 100%">
-                    <vip-component type="item_2" :entvisit="entvisit" imgurl='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/collection/image/bg/vip_ex_2.png'></vip-component>
+                    <vip-component @tabactive="tabActive" type="item_2" :entvisit="entvisit" imgurl='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/collection/image/bg/vip_ex_2.png'></vip-component>
                 </div>
                 <div class="bg-white tab-card charts"  v-if="conf._4 && tabActiveName == '2' && monthZbData.rows.length !== 0 && !getStatus">
                     <div class="tab-card-title">月度中标金额统计</div>
@@ -296,7 +296,7 @@
                     <div class="tab-card-tip">注:少数缺失的中标金额,用项目预算补充。</div>
                 </div>
                 <div class="vip_component" v-if="getStatus" style="height:10.8rem;background:url('/common-module/collection/image/bg/vip_bg_3.png') no-repeat;background-size:100% 100%">
-                    <vip-component type="item_3" :entvisit="entvisit" imgurl='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/collection/image/bg/vip_ex_3.png'></vip-component>
+                    <vip-component @tabactive="tabActive" type="item_3" :entvisit="entvisit" imgurl='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/collection/image/bg/vip_ex_3.png'></vip-component>
                 </div>
                 <div class="bg-white tab-card charts" v-if="conf._4 && tabActiveName == '2' && mapChartData.rows.length !== 0 && !getStatus">
                     <div class="tab-card-title">市场区域分布</div>
@@ -312,7 +312,7 @@
                     </div>
                 </div>
                 <div class="vip_component" v-if="getStatus" style="height:10.56rem;background:url('/common-module/collection/image/bg/vip_bg_4.png') no-repeat;background-size:100% 100%">
-                    <vip-component type="item_4" :entvisit="entvisit" imgurl='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/collection/image/bg/vip_ex_4.png'></vip-component>
+                    <vip-component @tabactive="tabActive" type="item_4" :entvisit="entvisit" imgurl='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/collection/image/bg/vip_ex_4.png'></vip-component>
                 </div>
                 <div class="bg-white tab-card charts"  v-if="conf._4 && tabActiveName == '2' && rateData.rows.length !== 0 && !getStatus">
                     <div class="tab-card-title">各类客户平均折扣率</div>
@@ -328,7 +328,7 @@
                     <div class="tab-card-tip">注:平均折扣率=(全部项目预算-全部中标金额)/全部项目预算,是指价格减让部分与原价的比率,仅统计预算和中标金额同时存在的项目。</div>
                 </div>
                 <div class="vip_component" v-if="getStatus" style="height:11.24rem;background:url('/common-module/collection/image/bg/vip_bg_5.png') no-repeat;background-size:100% 100%">
-                    <vip-component type="item_5" :entvisit="entvisit" imgurl='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/collection/image/bg/vip_ex_5.png'></vip-component>
+                    <vip-component @tabactive="tabActive" type="item_5" :entvisit="entvisit" imgurl='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/collection/image/bg/vip_ex_5.png'></vip-component>
                 </div>
                 <div class="bg-white tab-card charts"  v-show="conf._4 && tabActiveName == '2' && entPortraitInfo.top10 && entPortraitInfo.top10.length != 0 && !getStatus">
                     <div class="tab-card-title">客户类型分布</div>
@@ -338,7 +338,7 @@
                     <div class="tab-card-tip">注:各客户类型占比以中标金额计算,最多展示占比排名前十的客户类型。</div>
                 </div>
                 <div class="vip_component" v-if="getStatus" style="height:11.92rem;background:url('/common-module/collection/image/bg/vip_bg_6.png') no-repeat;background-size:100% 100%">
-                    <vip-component type="item_6" :entvisit="entvisit" imgurl='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/collection/image/bg/vip_ex_6.png'></vip-component>
+                    <vip-component @tabactive="tabActive" type="item_6" :entvisit="entvisit" imgurl='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/collection/image/bg/vip_ex_6.png'></vip-component>
                 </div>
                 <div class="bg-white tab-card customers client"  v-show="conf._4 && tabActiveName == '2' && importantCustomers.length !== 0 && !getStatus">
                     <div class="tab-card-title">重点客户</div>
@@ -368,7 +368,7 @@
                     </div>
                 </div>
                 <div class="vip_component" v-if="getStatus" style="height:10.8rem;background:url('/common-module/collection/image/bg/vip_bg_7.png') no-repeat;background-size:100% 100%">
-                    <vip-component type="item_7" :entvisit="entvisit" imgurl='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/collection/image/bg/vip_ex_7.png'></vip-component>
+                    <vip-component @tabactive="tabActive" type="item_7" :entvisit="entvisit" imgurl='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/collection/image/bg/vip_ex_7.png'></vip-component>
                 </div>
             </van-tab>
         </van-tabs>

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

@@ -206,6 +206,10 @@ var vNode = {
         }
     },
     methods: {
+        // 点击去开通记住tab栏下标
+        tabActive: function(data) {
+            this.savePageState()
+        },
         showToast: function (message) {
             this.$toast({
                 duration: 1500,

+ 21 - 19
src/web/staticres/common-module/collection/js/keyword-mobile.js

@@ -121,29 +121,31 @@ var keywordComponent = {
           if(res && res.userData) {
             let maxarr = []
             if(_this.isvip) {
-              let data = res.userData.o_vipjy.a_items
-              data.forEach(function(item,index) {
-                let minarr = []
-                let keyname = item.s_item
-                let eachArr = item.a_key
-                eachArr.forEach(function(data, i){
-                  data = {
-                    name: data.key[0],
+              if(res.userData && res.userData.o_vipjy) {
+                let data = res.userData.o_vipjy.a_items
+                data.forEach(function(item,index) {
+                  let minarr = []
+                  let keyname = item.s_item
+                  let eachArr = item.a_key
+                  eachArr.forEach(function(data, i){
+                    data = {
+                      name: data.key[0],
+                      type: false
+                    }
+                    minarr.push(data)
+                  })
+                  let obj = {
+                    [keyname]: minarr,
                     type: false
                   }
-                  minarr.push(data)
+                  maxarr.push(obj)
                 })
-                let obj = {
-                  [keyname]: minarr,
-                  type: false
+                _this.tablist = maxarr
+                if(maxarr.length == 0) {
+                  _this.active = 0
+                }else {
+                  _this.active = 1
                 }
-                maxarr.push(obj)
-              })
-              _this.tablist = maxarr
-              if(maxarr.length == 0) {
-                _this.active = 0
-              }else {
-                _this.active = 1
               }
             } else {
               let initArr = [

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

@@ -140,6 +140,8 @@ var vipComponent = {
       }
     },
     goOpen: function() {
+      // 点击按钮保存tabActiveName值
+      this.$emit('tabactive', 'save')
       let isWeixin = utils.isWeiXinBrowser
       if(!isWeixin) {
         if (this.btnText == '去开通') {

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

@@ -260,13 +260,13 @@
                     </div>
                 </div>
                 <div class="vip_component" v-if="getStatus" style="height:9.16rem;background:url('/common-module/collection/image/bg/vip_bg_1.png') no-repeat;background-size:100% 100%">
-                    <vip-component type="item_1" :entvisit="entvisit" imgurl='{{Msg "seo" "cdn"}}/common-module/collection/image/bg/vip_ex_1.png'></vip-component>
+                    <vip-component @tabactive="tabActive" type="item_1" :entvisit="entvisit" imgurl='{{Msg "seo" "cdn"}}/common-module/collection/image/bg/vip_ex_1.png'></vip-component>
                 </div>
                 <div class="bg-white tab-card cell-list history-list" v-if="conf._4 && tabActiveName == '2' && !getStatus">
                     <hispro-component type="winner" :id="entInfo.id"></hispro-component>
                 </div>
                 <div class="vip_component" v-if="getStatus" style="height:11.36rem;background:url('/common-module/collection/image/bg/vip_bg_9.png') no-repeat;background-size:100% 100%">
-                    <vip-component type="item_9" :entvisit="entvisit" imgurl='{{Msg "seo" "cdn"}}/common-module/collection/image/bg/vip_ex_9.png'></vip-component>
+                    <vip-component @tabactive="tabActive" type="item_9" :entvisit="entvisit" imgurl='{{Msg "seo" "cdn"}}/common-module/collection/image/bg/vip_ex_9.png'></vip-component>
                 </div>
                 <div class="bg-white tab-card charts" v-if="conf._4 && tabActiveName == '2' && annualData.rows.length !== 0  && !getStatus">
                     <div class="tab-card-title">年度项目统计</div>
@@ -285,7 +285,7 @@
                     <div class="tab-card-tip">注:项目金额指所有项目的中标金额之和,少数缺失的中标金额,用项目预算补充。</div>
                 </div>
                 <div class="vip_component" v-if="getStatus" style="height:11.12rem;background:url('/common-module/collection/image/bg/vip_bg_2.png') no-repeat;background-size:100% 100%">
-                    <vip-component type="item_2" :entvisit="entvisit" imgurl='{{Msg "seo" "cdn"}}/common-module/collection/image/bg/vip_ex_2.png'></vip-component>
+                    <vip-component @tabactive="tabActive" type="item_2" :entvisit="entvisit" imgurl='{{Msg "seo" "cdn"}}/common-module/collection/image/bg/vip_ex_2.png'></vip-component>
                 </div>
                 <div class="bg-white tab-card charts"  v-if="conf._4 && tabActiveName == '2' && monthZbData.rows.length !== 0  && !getStatus">
                     <div class="tab-card-title">月度中标金额统计</div>
@@ -301,7 +301,7 @@
                     <div class="tab-card-tip">注:少数缺失的中标金额,用项目预算补充。</div>
                 </div>
                 <div class="vip_component" v-if="getStatus" style="height:10.8rem;background:url('/common-module/collection/image/bg/vip_bg_3.png') no-repeat;background-size:100% 100%">
-                    <vip-component type="item_3" :entvisit="entvisit" imgurl='{{Msg "seo" "cdn"}}/common-module/collection/image/bg/vip_ex_3.png'></vip-component>
+                    <vip-component @tabactive="tabActive" type="item_3" :entvisit="entvisit" imgurl='{{Msg "seo" "cdn"}}/common-module/collection/image/bg/vip_ex_3.png'></vip-component>
                 </div>
                 <div class="bg-white tab-card charts" v-if="conf._4 && tabActiveName == '2' && mapChartData.rows.length !== 0  && !getStatus">
                     <div class="tab-card-title">市场区域分布</div>
@@ -317,7 +317,7 @@
                     </div>
                 </div>
                 <div class="vip_component" v-if="getStatus" style="height:10.56rem;background:url('/common-module/collection/image/bg/vip_bg_4.png') no-repeat;background-size:100% 100%">
-                    <vip-component type="item_4" :entvisit="entvisit" imgurl='{{Msg "seo" "cdn"}}/common-module/collection/image/bg/vip_ex_4.png'></vip-component>
+                    <vip-component @tabactive="tabActive" type="item_4" :entvisit="entvisit" imgurl='{{Msg "seo" "cdn"}}/common-module/collection/image/bg/vip_ex_4.png'></vip-component>
                 </div>
                 <div class="bg-white tab-card charts"  v-if="conf._4 && tabActiveName == '2' && rateData.rows.length !== 0  && !getStatus">
                     <div class="tab-card-title">各类客户平均折扣率</div>
@@ -333,7 +333,7 @@
                     <div class="tab-card-tip">注:平均折扣率=(全部项目预算-全部中标金额)/全部项目预算,是指价格减让部分与原价的比率,仅统计预算和中标金额同时存在的项目。</div>
                 </div>
                 <div class="vip_component" v-if="getStatus" style="height:11.24rem;background:url('/common-module/collection/image/bg/vip_bg_5.png') no-repeat;background-size:100% 100%">
-                    <vip-component type="item_5" :entvisit="entvisit" imgurl='{{Msg "seo" "cdn"}}/common-module/collection/image/bg/vip_ex_5.png'></vip-component>
+                    <vip-component @tabactive="tabActive" type="item_5" :entvisit="entvisit" imgurl='{{Msg "seo" "cdn"}}/common-module/collection/image/bg/vip_ex_5.png'></vip-component>
                 </div>
                 <div class="bg-white tab-card charts"  v-show="conf._4 && tabActiveName == '2' && entPortraitInfo.top10 && entPortraitInfo.top10.length != 0  && !getStatus">
                     <div class="tab-card-title">客户类型分布</div>
@@ -343,7 +343,7 @@
                     <div class="tab-card-tip">注:各客户类型占比以中标金额计算,最多展示占比排名前十的客户类型。</div>
                 </div>
                 <div class="vip_component" v-if="getStatus" style="height:11.92rem;background:url('/common-module/collection/image/bg/vip_bg_6.png') no-repeat;background-size:100% 100%">
-                    <vip-component type="item_6" :entvisit="entvisit" imgurl='{{Msg "seo" "cdn"}}/common-module/collection/image/bg/vip_ex_6.png'></vip-component>
+                    <vip-component @tabactive="tabActive" type="item_6" :entvisit="entvisit" imgurl='{{Msg "seo" "cdn"}}/common-module/collection/image/bg/vip_ex_6.png'></vip-component>
                 </div>
                 <div class="bg-white tab-card customers client"  v-show="conf._4 && tabActiveName == '2' && importantCustomers.length !== 0  && !getStatus">
                     <div class="tab-card-title">重点客户</div>
@@ -373,7 +373,7 @@
                     </div>
                 </div>
                 <div class="vip_component" v-if="getStatus" style="height:10.8rem;background:url('/common-module/collection/image/bg/vip_bg_7.png') no-repeat;background-size:100% 100%">
-                    <vip-component type="item_7" :entvisit="entvisit" imgurl='{{Msg "seo" "cdn"}}/common-module/collection/image/bg/vip_ex_7.png'></vip-component>
+                    <vip-component @tabactive="tabActive" type="item_7" :entvisit="entvisit" imgurl='{{Msg "seo" "cdn"}}/common-module/collection/image/bg/vip_ex_7.png'></vip-component>
                 </div>
             </van-tab>
         </van-tabs>