1002884655 4 vuotta sitten
vanhempi
commit
62178bce63

+ 1
- 1
src/components/index/Banner/index.vue Näytä tiedosto

@@ -2,7 +2,7 @@
2 2
   <div class="components Banner">
3 3
     <swiper :options="SwiperOptions" ref="MySwiper">
4 4
       <swiper-slide v-for="(item, index) in list" :key="index">
5
-        <div class="SwiperItem">
5
+        <div class="SwiperItem" @click="$emit('Click', item)">
6 6
           <img :src="item.image" class="centerLabel cover" alt="">
7 7
         </div>
8 8
       </swiper-slide>

+ 21
- 1
src/pages/index/ShouYe/index.vue Näytä tiedosto

@@ -3,6 +3,18 @@
3 3
     <MainPageContainer :ShowMainHeader="true" :ShowMainTabBar="true" MainHeaderTitle="首页" :MainTabBarActiveId="1">
4 4
       <div class="PageContainer">
5 5
 
6
+        <div class="Iframe flex-v" v-if="ShowIframe">
7
+          <div class="Top">
8
+            <a class="iconfont iconjiantouleft" @click="ShowIframe = false"></a>
9
+            <span>{{IframeTitle}}</span>
10
+          </div>
11
+          <div class="flex-item">
12
+            <div>
13
+              <iframe :src="IframeSrc" frameborder="0"></iframe>
14
+            </div>
15
+          </div>
16
+        </div>
17
+
6 18
         <!-- 背景 -->
7 19
         <div class="Bg"></div>
8 20
 
@@ -14,7 +26,7 @@
14 26
               <!-- banner -->
15 27
               <div class="Banner">
16 28
                 <div>
17
-                  <Banner :list="bannerList"></Banner>
29
+                  <Banner :list="bannerList" @Click="BannerClick"></Banner>
18 30
                 </div>
19 31
               </div>
20 32
 
@@ -73,6 +85,9 @@ export default {
73 85
   name: 'index',
74 86
   data () {
75 87
     return {
88
+      IframeSrc: null,
89
+      ShowIframe: false,
90
+      IframeTitle: '',
76 91
       ExitAppStatus: false,
77 92
       bannerList: [
78 93
         {
@@ -126,6 +141,11 @@ export default {
126 141
     ...mapIndexMutations([
127 142
       'EmptyBanner'
128 143
     ]),
144
+    BannerClick (e) {
145
+      this.IframeTitle = e.title || '活动'
146
+      this.IframeSrc = e.link || null
147
+      this.ShowIframe = true
148
+    },
129 149
     RouterBack () {
130 150
       if (this.ExitAppStatus) {
131 151
         window.js2native.closePage()

+ 52
- 0
src/pages/index/ShouYe/page.scss Näytä tiedosto

@@ -8,6 +8,58 @@
8 8
     height: 100%;
9 9
     position: relative;
10 10
     overflow: hidden;
11
+    > .Iframe {
12
+      width: 100%;
13
+      position: fixed;
14
+      top: 0;
15
+      left: 0;
16
+      bottom: 0;
17
+      z-index: 100;
18
+      background: #fff;
19
+      > .Top {
20
+        position: relative;
21
+        overflow: hidden;
22
+        background: #ff5100;
23
+        > span {
24
+          display: block;
25
+          font-size: 0.17rem;
26
+          text-align: center;
27
+          position: relative;
28
+          z-index: 1;
29
+          line-height: 0.4rem;
30
+          color: #fff;
31
+          height: 0.4rem;
32
+          white-space: nowrap;
33
+        }
34
+        > a {
35
+          display: inline-block;
36
+          position: absolute;
37
+          z-index: 2;
38
+          font-size: 0.2rem;
39
+          color: #fff;
40
+          line-height: 0.4rem;
41
+          left: 0.15rem;
42
+        }
43
+      }
44
+      > .flex-item {
45
+        position: relative;
46
+        overflow: hidden;
47
+        > div {
48
+          width: 100%;
49
+          position: absolute;
50
+          top: 0;
51
+          left: 0;
52
+          bottom: 0;
53
+          z-index: 100;
54
+          > iframe {
55
+            width: 100%;
56
+            height: 100%;
57
+            overflow-y: scroll;
58
+            -webkit-overflow-scrolling: touch;
59
+          }
60
+        }
61
+      }
62
+    }
11 63
     > .Bg {
12 64
       width: 200vw;
13 65
       height: 200vw;