liyongli 3 năm trước cách đây
mục cha
commit
90874f29be
1 tập tin đã thay đổi với 13 bổ sung3 xóa
  1. 13 3
      src/views/Jugou/Jugou.vue

+ 13 - 3
src/views/Jugou/Jugou.vue

@@ -44,7 +44,11 @@
             @canplay="videoload"
             :src="videoUrl"
           />
-          <img v-show="videoerrorStart" class="videoerror" src="../../assets/img/videoerror.png" />
+          <img
+            v-show="videoerrorStart"
+            class="videoerror"
+            src="../../assets/img/videoerror.png"
+          />
         </div>
         <div style="position: relative;">
           <div
@@ -67,6 +71,9 @@
                 <el-col :span="12">
                   <span class="iconLine"></span>
                   收视率%
+                  <div style="float: right;padding: 0 5px 0 0">
+                    {{ tof(nowItem.audienceRating, 4) }}%
+                  </div>
                 </el-col>
               </el-row>
               <div style="padding: 5px 20px">
@@ -199,6 +206,9 @@ export default {
           this.load.close();
         });
     },
+    tof(num, t) {
+      return Number(num * 100).toFixed(t || 2);
+    },
     selectChannel(item) {
       if (this.channel === item.channelName) return;
       this.channel = item.channelName;
@@ -418,9 +428,9 @@ export default {
     videoerror() {
       this.videoerrorStart = true;
     },
-    videoload(){
+    videoload() {
       this.videoerrorStart = false;
-    }
+    },
   },
   components: {},
 };