Ver Fonte

Merge branch 'main' into feature/v1.1.1

yuelujie há 4 meses atrás
pai
commit
dc3ec6ffcb

+ 7 - 13
apps/bigmember_pc/src/views/portrayal/Loading.vue

@@ -35,7 +35,7 @@ export default {
     async getLink() {
       const member = this.bigmember
       const sVip = this.svip
-      const position = this.position ? `?position=${this.position}` : ''
+      let position = this.position ? `?position=${this.position}` : ''
       if (this.inResourceBI) {
         position += position ? '&resource=BI' : '?resource=BI'
       }
@@ -48,8 +48,7 @@ export default {
           // 如果是专家版、智慧版跳大会员页面
           if (this.power.includes(4)) {
             window.location.replace(memberLink)
-          }
-          else {
+          } else {
             // 如果是商机版、自定义版
             // 如果同时是超级订阅 判断有没有画像查看次数
             if (sVip) {
@@ -61,29 +60,24 @@ export default {
                 if (usage >= total) {
                   // 如果次数已用完 跳大会员企业画像页面
                   window.location.replace(memberLink)
-                }
-                else {
+                } else {
                   // 没用完 超级订阅跳企业画像页面
                   window.location.replace(vipLink)
                 }
               }
-            }
-            else {
+            } else {
               window.location.replace(memberLink)
             }
           }
-        }
-        else {
+        } else {
           window.location.replace(vipLink)
         }
-      }
-      else if (this.type === 'buyer') {
+      } else if (this.type === 'buyer') {
         const buyerLink = `/swordfish/page_big_pc/unit_portrayal/${this.params}${position}`
         const entBuyerLink = `/entpc/unit_portrayal/${this.params}${position}`
         if (this.isNewEntNiche) {
           window.location.replace(entBuyerLink)
-        }
-        else {
+        } else {
           window.location.replace(buyerLink)
         }
       }

+ 80 - 7
apps/bigmember_pc/src/views/subscribe/SubPush.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="page--sub-push">
-    <div class="page-content">
+    <div class="page-content" ref='pageContent'>
       <div class="content-header">
         <span class="header-left card-title">{{ subscribeTitle }}</span>
         <div class="header-right">
@@ -49,7 +49,7 @@
           <button class="action-btn" @click="toBuySvip">立即开通</button>
         </div>
       </div>
-      <div class="border-box">
+      <div class="border-box" :class='{"is-stop": urlPushTime }'>
         <TimeSelector
           ref="timeSelector"
           selectorTime="sub"
@@ -339,6 +339,10 @@
         @viewDetailCallBack="viewDetailCallBack"
       ></SubscribeOverview>
     </DrawerCard>
+    <div v-if="urlPushTime" class="look-more-tips" :style='{ width: tipWidth }'>
+      <span>当前筛选查看的为此次推送的信息,</span>
+      <span class="look-more-tips-btn" @click="doLookMoreData">点击查看全部></span>
+    </div>
   </div>
 </template>
 
@@ -397,6 +401,8 @@ export default {
   },
   data() {
     return {
+      urlPushTime: '',
+      tipWidth: '100%',
       tip: {
         maxPushTip: false
       },
@@ -596,15 +602,20 @@ export default {
     }
   },
   async created() {
+    this.checkPushTime()
     this.getParams()
     this.getInitInfo()
     await this.getSubScribeKeyList({ vt: this.vt })
     await this.getNewSubScribeKeyList(this.vt)
     this.moduleList = moreFiltersNeedVipKeyList()
+    window.addEventListener('resize', this.computedTipWidth)
+  },
+  beforeDestroy() {
+    window.removeEventListener('resize', this.computedTipWidth)
   },
   mounted() {
-    this.initQuery()
-    this.initKeyMap()
+      this.initQuery()
+      this.initKeyMap()
   },
   watch: {
     subscribeKeyList: function () {
@@ -613,6 +624,31 @@ export default {
   },
   methods: {
     ...mapActions('user', ['getEntInfo', 'getSubScribeKeyList']),
+    computedTipWidth () {
+      this.$nextTick(() => {
+        this.tipWidth = this.$refs.pageContent.clientWidth + 'px'
+      })
+    },
+    checkPushTime () {
+      // 首次进入清除缓存
+      if (performance.navigation.type === 0) {
+        sessionStorage.removeItem('skip-sub-time')
+      }
+      // 存在缓冲跳过二次使用
+      if (sessionStorage.getItem('skip-sub-time') === 'skip') {
+        sessionStorage.removeItem('skip-sub-time')
+        this.resetPushTime()
+      }
+    },
+    resetPushTime () {
+      const query = Object.assign({}, this.$route.query)
+      delete query.times;
+      delete query.pushtime;
+      this.$router.replace({ query: { ... query, skip: true } })
+    },
+    doLookMoreData () {
+      this.doQuery()
+    },
     // 关键词数据
     onKeywordChange(data) {
       this.filters.keyWords = data.two_noall.join(',')
@@ -912,10 +948,16 @@ export default {
       }
     },
     getParams() {
-      const { vt, subscribe_drawer: drawer } = this.$route.query
+      const { vt, subscribe_drawer: drawer, pushtime, times } = this.$route.query
       if (vt) {
         this.filters.vt = vt
       }
+      const time = pushtime || times
+      if (time) {
+        this.urlPushTime = time
+        this.computedTipWidth()
+        this.filters.pushTime = time
+      }
       if (drawer) {
         this.onCloseDrawer(true)
       }
@@ -1106,7 +1148,7 @@ export default {
         time = tempTime.start / 1000 + '_' + tempTime.end / 1000
       }
       this.filters.selectTime = time
-      this.doQuery()
+      this.doQuery(false)
     },
     formatIndustryMap(item) {
       const tempArr = []
@@ -1143,7 +1185,12 @@ export default {
       }
       this.doQuery()
     },
-    doQuery() {
+    doQuery(reset = true) {
+      if (reset && this.urlPushTime) {
+        this.urlPushTime = ''
+        this.filters.pushTime = ''
+        sessionStorage.setItem('skip-sub-time', 'skip')
+      }
       const filterBuyerClass = this.formatIndustryMap(this.filters.buyerClass).map((v) => v.split('_')[1]).join(',')
       const filterSubtype = InfoTypeTransform.mapToList(this.filters.subtype)
       const payload = {
@@ -1383,6 +1430,25 @@ export default {
 @include diy-icon('edit', 20, 20);
 @include diy-icon('set-default', 20, 20);
 
+.look-more-tips {
+  position: fixed;
+  bottom: 0;
+  width: 100%;
+  background: rgba(234, 249, 251, 1);
+  text-align: center;
+  border-radius: 6px;
+  padding: 9px 24px;
+  color: #1d1d1d;
+  font-size: 14px;
+  line-height: 22px;
+
+  &-btn {
+    color: #2ABED1;
+    cursor: pointer;
+  }
+
+}
+
 .in-app {
   margin: 0 12px;
 
@@ -1427,6 +1493,13 @@ export default {
       }
     }
   }
+  .is-stop .search-time-scope-selector {
+    .j-button-item.active.bgc {
+      background: unset;
+      border-color: transparent;
+      color: #1d1d1d;
+    }
+  }
 }
 .border-box{
   ::v-deep{