|
@@ -2,11 +2,13 @@ import '../sass/page/index.scss'
|
|
|
|
|
|
import $ from 'jquery'
|
|
import $ from 'jquery'
|
|
import Swiper from 'swiper'
|
|
import Swiper from 'swiper'
|
|
|
|
+import Cookies from 'js-cookie'
|
|
|
|
|
|
class pageIndex {
|
|
class pageIndex {
|
|
constructor() {
|
|
constructor() {
|
|
this.initSwiper()
|
|
this.initSwiper()
|
|
.initSystem()
|
|
.initSystem()
|
|
|
|
+ .initAd()
|
|
}
|
|
}
|
|
|
|
|
|
initSwiper() {
|
|
initSwiper() {
|
|
@@ -55,10 +57,30 @@ class pageIndex {
|
|
})
|
|
})
|
|
|
|
|
|
return this
|
|
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
|
|
new pageIndex
|
|
-})
|
|
|
|
-
|
|
|
|
|
|
+})
|