liyongli 2 rokov pred
rodič
commit
3167c3686a

+ 2 - 2
public/index.html

@@ -6,10 +6,10 @@
     <meta http-equiv="X-UA-Compatible" content="IE=edge">
     <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=0" />
     <link rel="icon" href="<%= BASE_URL %>favicon.ico">
-    <!-- <script src="//cdn.bootcdn.net/ajax/libs/eruda/2.4.1/eruda.min.js"></script>
+    <script src="//cdn.bootcdn.net/ajax/libs/eruda/2.4.1/eruda.min.js"></script>
     <script>
       eruda.init();
-    </script> -->
+    </script>
     <!--导入原生js库-->
     <!-- <script src="http://cmp/v1.0.0/js/cordova/__CMPSHELL_PLATFORM__/cordova.js"></script>
     <script src="http://cmp/v1.0.0/js/cordova/cordova-plugins.js"></script> -->

+ 16 - 1
src/views/report/SilkRoadData/index.vue

@@ -1,6 +1,9 @@
 <template>
   <div class="SilkRoadData">
-    <van-image v-if="width" :width="width" :height="height" @load="load" :src="isOnlyDay" />
+    <div class="topImg" v-if="width">
+        <van-image :width="width" :height="height" @load="load" :src="isOnlyDay" />
+        <span class="days">{{ times.join(" 到 ") }}</span>
+    </div>
 
     <van-cell-group inset>
       <template #title> </template>
@@ -102,6 +105,7 @@ export default {
       let times = (this.$route.params.time || '').split('+');
       if(times.length > 1 && times[0] === times[1]) times = [times[0]];
       this.times = times;
+      console.log(window.matchMedia('(prefers-color-scheme: dark)'))
       if (this.times.length > 1)
         this.isOnlyDay = require('@/assets/image/2023slcw.jpg');
       else this.isOnlyDay = require('@/assets/image/2023slcw-day.jpg');
@@ -163,4 +167,15 @@ export default {
     width: calc(100% - 56px);
     vertical-align: middle;
 }
+
+.SilkRoadData .topImg{
+    position: relative;
+}
+.SilkRoadData .days{
+    position: absolute;
+    left: 5%;
+    top: 72%;
+    color: #ffffff;
+    font-size: 14px;
+}
 </style>

+ 15 - 1
src/views/report/SilkRoadDetail/index.vue

@@ -1,6 +1,9 @@
 <template>
   <div class="SilkRoadDetail">
-    <van-image v-if="width" :width="width" :height="height" @load="load" :src="isOnlyDay" />
+    <div class="topImg" v-if="width">
+        <van-image :width="width" :height="height" @load="load" :src="isOnlyDay" />
+        <span class="days">{{ times.join(" 到 ") }}</span>
+    </div>
 
     <van-cell-group inset v-for="pitem in centerList" :key="pitem.platform">
       <template #title> {{ pitem.platform }} </template>
@@ -164,4 +167,15 @@ export default {
   font-size: 20px;
   color: #000;
 }
+
+.SilkRoadDetail .topImg{
+    position: relative;
+}
+.SilkRoadDetail .days{
+    position: absolute;
+    left: 5%;
+    top: 72%;
+    color: #ffffff;
+    font-size: 14px;
+}
 </style>