wangfei 6 vuotta sitten
vanhempi
commit
5b739c0f46
2 muutettua tiedostoa jossa 29 lisäystä ja 1 poistoa
  1. 4
    0
      src/pages/index.vue
  2. 25
    1
      src/pages/page2.vue

+ 4
- 0
src/pages/index.vue Näytä tiedosto

@@ -233,6 +233,10 @@ export default {
233 233
           })
234 234
         }
235 235
         this.getPersonList()
236
+      }).catch(r => {
237
+        setTimeout(() => {
238
+          this.getPersonList()
239
+        }, 1000)
236 240
       })
237 241
     },
238 242
     FormatDate (timestamp, fmt) {

+ 25
- 1
src/pages/page2.vue Näytä tiedosto

@@ -3,7 +3,27 @@
3 3
     <img src="../assets/images/bg.jpg" class="centerLabel cover bg" alt>
4 4
     <div class="content flex-h">
5 5
       <div class="flex-item">
6
-        <div>
6
+        <div :hidden="!showSlide">
7
+          <!-- <swiper :options="swiperOption" ref="mySwiper">
8
+            <swiper-slide class="swiper-slide" v-for="(item, index) in 1" :key="index">
9
+              <img
10
+                class="centerLabel cover"
11
+                src="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1550835899076&di=3f786b46cffb6956608e66421b2ec859&imgtype=0&src=http%3A%2F%2Fimgsrc.baidu.com%2Fimgad%2Fpic%2Fitem%2Fe4dde71190ef76c66c3378239716fdfaae5167d1.jpg"
12
+                alt
13
+              >
14
+            </swiper-slide>
15
+          </swiper> -->
16
+          <img
17
+            v-if="showPage.showType === 'image'"
18
+            class="centerLabel cover"
19
+            :src="'api' + showPage.showContent"
20
+            alt
21
+          >
22
+          <video v-if="showPage.showType === 'video'" width="100%" height="100%" controls="controls" autoplay loop muted>
23
+            <source :src="'api' + showPage.showContent" type="video/mp4" />
24
+          </video>
25
+        </div>
26
+        <div :hidden="showSlide">
7 27
           <ul class="centerLabel userList">
8 28
             <li v-for="(item, index) in userList" :key="index" :class="{'active': item.show}">
9 29
               <span>{{item.firstName}}</span>
@@ -183,6 +203,10 @@ export default {
183 203
           })
184 204
         }
185 205
         this.getPersonList()
206
+      }).catch(r => {
207
+        setTimeout(() => {
208
+          this.getPersonList()
209
+        }, 1000)
186 210
       })
187 211
     },
188 212
     FormatDate (timestamp, fmt) {