Quellcode durchsuchen

dnf盒子浮层广告改动

Eechon vor 6 Jahren
Ursprung
Commit
dbba067f8b

Datei-Diff unterdrückt, da er zu groß ist
+ 1062 - 23
2017专区/DNF盒子/package-lock.json


+ 13 - 0
2017专区/DNF盒子/src/index.html

@@ -7,6 +7,9 @@
     <meta name="format-detection" content="telephone=no" />
     <base target="_blank" />
     <title>DNF盒子首页 || 多玩盒子</title>
+
+
+    <script src="http://assets.dwstatic.com/common/js/jquery.js"></script>
 </head>
 
 <body>
@@ -361,6 +364,16 @@
             </section>
         </div>
     </div>
+
+    <!-- 广告弹窗 -->
+    <div class="mod-da-full" style="display: none;">
+        <!-- <script src="http://gt.duowan.com/api/g?loc=dnfhezifuceng"></script> -->
+        <a adid="${fodders[0].adId}" rsid="${resourceCode}" href="${fodders[0].adLink}" target="_blank" style="display:inline-block;position:relative;">
+            <img src="http://fed.webdev.ouj.com/400x300" width="400px" height="300px" style="vertical-align:top;" />
+            <img style="position:absolute;bottom:2px;left: 2px;width: 28px;height: 14px" src="http://assets.dwstatic.com/common/img/ad_tips_1608.png" />
+        </a>
+        <div class="blank10"></div>
+    </div>
 </body>
 
 </html>

+ 24 - 2
2017专区/DNF盒子/src/js/index.js

@@ -2,11 +2,13 @@ import '../sass/page/index.scss'
 
 import $ from 'jquery'
 import Swiper from 'swiper'
+import Cookies from 'js-cookie' 
 
 class pageIndex {
     constructor() {
         this.initSwiper()
             .initSystem()
+            .initAd()
     }
 
     initSwiper() {
@@ -55,10 +57,30 @@ class pageIndex {
         })
 
         return this
+
+
+    }
+
+    initAd() {
+        console.log(Cookies)
+        var isInitFullDa = Cookies.get('isInitFullDa');
+        var hasDa = $(".mod-da-full img").length;
+        if (isInitFullDa != 1 && hasDa > 0) {
+            $(".page-index").append("<div class='fullDa-wrap'><div class='fullDa-mask'></div><div class='fullDa-inner'><em></em></div></div>")
+            $(".fullDa-inner").append($(".mod-da-full").html())
+
+            $(".page-index").on("click", ".fullDa-wrap em", function () {
+                $(".fullDa-wrap").remove();
+            })
+
+            Cookies.set('isInitFullDa', '1', {
+                expires: 1,
+                path: '/'
+            })
+        }
     }
 }
 
 $(() => {
     new pageIndex
-})
-
+})

+ 48 - 1
2017专区/DNF盒子/src/sass/global.scss

@@ -39,4 +39,51 @@ a {
         width: 100%;
         height: 100%;
     }
-}
+}
+
+/* S 浮层广告 */
+.fullDa-wrap {
+    position: absolute;
+    left: 0;
+    top: 0;
+    width: 100%;
+    height: 100%;
+    z-index: 99997
+}
+
+.fullDa-wrap .fullDa-mask {
+    position: absolute;
+    left: 0;
+    top: 0;
+    z-index: 99997;
+    width: 100%;
+    height: 100%;
+    background: url(http://lolbox.duowan.com/staticPub/v3.1/images/sprite/img/da-mask_23d8d30.png)
+}
+
+.fullDa-wrap .fullDa-inner {
+    position: absolute;
+    left: 50%;
+    top: 50%;
+    width: 400px;
+    height: 300px;
+    margin-left: -200px;
+    margin-top: -150px;
+    z-index: 99998
+}
+
+.fullDa-wrap .fullDa-inner em {
+    position: absolute;
+    right: 0;
+    top: 0;
+    width: 24px;
+    height: 24px;
+    background: url(http://lolbox.duowan.com/staticPub/v3.1/images/sprite/img/da-full-close_2209bac.png) no-repeat;
+    z-index: 99999;
+    cursor: pointer
+}
+
+.fullDa-wrap .fullDa-inner em:hover {
+    opacity: .85
+}
+/* E 浮层广告 */

+ 48 - 1
2017专区/DNF盒子/src/sass/page/index.scss

@@ -275,4 +275,51 @@ $notify-fc:#9f8878;
 
 .u-hide {
     display: none;
-}
+}
+
+/* S 浮层广告 */
+.fullDa-wrap {
+    position: absolute;
+    left: 0;
+    top: 0;
+    width: 100%;
+    height: 100%;
+    z-index: 99997
+}
+
+.fullDa-wrap .fullDa-mask {
+    position: absolute;
+    left: 0;
+    top: 0;
+    z-index: 99997;
+    width: 100%;
+    height: 100%;
+    background: url(http://lolbox.duowan.com/staticPub/v3.1/images/sprite/img/da-mask_23d8d30.png)
+}
+
+.fullDa-wrap .fullDa-inner {
+    position: absolute;
+    left: 50%;
+    top: 50%;
+    width: 400px;
+    height: 300px;
+    margin-left: -200px;
+    margin-top: -150px;
+    z-index: 99998
+}
+
+.fullDa-wrap .fullDa-inner em {
+    position: absolute;
+    right: 0;
+    top: 0;
+    width: 24px;
+    height: 24px;
+    background: url(http://lolbox.duowan.com/staticPub/v3.1/images/sprite/img/da-full-close_2209bac.png) no-repeat;
+    z-index: 99999;
+    cursor: pointer
+}
+
+.fullDa-wrap .fullDa-inner em:hover {
+    opacity: .85
+}
+/* E 浮层广告 */

Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden.