瀏覽代碼

样式修改

bding 1 年之前
父節點
當前提交
48cfbc79d6
共有 3 個文件被更改,包括 42 次插入9 次删除
  1. 11 7
      pages/index/index.vue
  2. 16 0
      reportPages/keyCompany/keyCompany.vue
  3. 15 2
      reportPages/reportSecretDetail/reportSecretDetail.vue

+ 11 - 7
pages/index/index.vue

@@ -2,12 +2,14 @@
   <page-meta :page-style="isMorningShow ? 'overflow: hidden;' : ''">
     <view class="container New-container">
       <view :class="[!bannerDataList.length ? 'banne-content' : 'content-search']">
-        <swiper v-if="bannerDataList.length" autoplay :interval="4000" circular indicator-dots>
+        <swiper v-if="bannerDataList.length" autoplay :interval="4000000" circular indicator-dots>
           <view v-for="item in bannerDataList" :key="item.BannerId" @click="bannerSwiperHandler(item)">
             <swiper-item>
               <image :src="item.IndexImg"></image>
-              <view class="banner-title text_twoLine">
-                {{ item.Title }}
+              <view class="banner-title">
+                <text class="text_twoLine" :style="{ 'font-size': item.Subtitle.length > 24 ? '45rpx' : '50rpx' }">
+                  {{ item.Title }}
+                </text>
                 <text class="time text_twoLine"> {{ item.Subtitle }}</text>
               </view>
             </swiper-item>
@@ -349,15 +351,17 @@ export default {
     }
     .banner-title {
       position: absolute;
-      bottom: 80rpx;
+      bottom: 35rpx;
       left: 20rpx;
       color: #fff;
       font-weight: 500;
-      font-size: 50rpx;
-      line-height: 70rpx;
+      line-height: 65rpx;
+      min-height: 160rpx;
+      max-height: 225rpx;
+      overflow: hidden;
       .time {
         font-size: 28rpx;
-        line-height: 38rpx;
+        line-height: 39rpx;
       }
     }
     .top-content-box {

+ 16 - 0
reportPages/keyCompany/keyCompany.vue

@@ -117,6 +117,8 @@ export default {
       areacodeShow: false,
       haveData: true,
       hasPermission: "",
+      readTiem: 0,
+      setIntervalTiem: null,
     };
   },
   components: { statement, NotHaveLogin },
@@ -235,6 +237,11 @@ export default {
   },
   onLoad() {},
   onShow() {
+    this.readTiem = 0;
+
+    this.setIntervalTiem = setInterval(() => {
+      this.readTiem++;
+    }, 1000);
     if (!this.$store.state.isAuth && !this.$store.state.isBind) this.reportSelectionDetail();
     this.$store.commit("setRouterReport", "重点公司");
   },
@@ -247,6 +254,15 @@ export default {
       path: "/reportPages/keyCompany/keyCompany",
     };
   },
+  // 页面隐藏/切入后台时触发
+  async onHide() {
+    
+    clearInterval(this.setIntervalTiem);
+  },
+  // 页面卸载时触发
+  async onUnload() {
+    clearInterval(this.setIntervalTiem);
+  },
 };
 </script>
 

+ 15 - 2
reportPages/reportSecretDetail/reportSecretDetail.vue

@@ -159,6 +159,8 @@ export default {
       showAudioBox: false,
       curTime: 0,
       titleTxT: "",
+      readTiem: 0,
+      setIntervalTiem: null,
     };
   },
   filters: {
@@ -229,7 +231,7 @@ export default {
     },
     /* 无权限申请开通权限 */
     applyAuth() {
-      let istype = this.isType == 2 ? "Researchsummary" : "Minutessummary"
+      let istype = this.isType == 2 ? "Researchsummary" : "Minutessummary";
       this.hasPermission === 4
         ? uni.navigateTo({
             url: "/pageMy/applyTrial/applyTrial?tryType=Article&detailId=" + this.id,
@@ -339,14 +341,25 @@ export default {
   },
 
   onShow() {
+    this.readTiem = 0;
+    this.setIntervalTiem = setInterval(() => {
+      this.readTiem++;
+    }, 1000);
     if (!this.$store.state.isAuth && !this.$store.state.isBind) {
       this.getDetilaiList();
     }
     this.$store.commit("setRouterReport", this.titleTxT);
     this.showAudioBox = true;
   },
-  onHide() {
+  // 页面隐藏/切入后台时触发
+  async onHide() {
     this.showAudioBox = false;
+
+    clearInterval(this.setIntervalTiem);
+  },
+  // 页面卸载时触发
+  async onUnload() {
+    clearInterval(this.setIntervalTiem);
   },
   /**
    * 用户点击分享