|
|
@ -22,7 +22,7 @@ window.onload = () => { |
|
|
window.setInterval(initDate,60000); |
|
|
window.setInterval(initDate,60000); |
|
|
setScrollPosition(); //自动滚动到底部
|
|
|
setScrollPosition(); //自动滚动到底部
|
|
|
document.addEventListener("click",()=>{ |
|
|
document.addEventListener("click",()=>{ |
|
|
window.playOver(); |
|
|
|
|
|
|
|
|
window.hello(); |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -61,6 +61,8 @@ function delMy(){ |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
window.content = [{"logo":"./assets/con1.png","img":"./assets/conDail.png"},{"logo":"./assets/con2.png","img":"./assets/conDail.png"},{"logo":"./assets/con3.png","img":"./assets/conDail.png"},{"logo":"./assets/con4.png","img":"./assets/conDail.png"},{"logo":"./assets/con5.png","img":"./assets/conDail.png"}] |
|
|
|
|
|
|
|
|
//接收模型回复处理内容
|
|
|
//接收模型回复处理内容
|
|
|
function callBack(str){ |
|
|
function callBack(str){ |
|
|
document.getElementById("ing").remove(); |
|
|
document.getElementById("ing").remove(); |
|
|
@ -133,11 +135,11 @@ function callBack(str){ |
|
|
} |
|
|
} |
|
|
break; |
|
|
break; |
|
|
case "coupon" : //优惠券
|
|
|
case "coupon" : //优惠券
|
|
|
obj.data.value.text && addBackItemText(obj.data.value.text); |
|
|
|
|
|
if(obj.data.value.content && obj.data.value.content.length>0){ |
|
|
|
|
|
|
|
|
if(obj.data.value.text){ |
|
|
|
|
|
addBackItemText(obj.data.value.text); |
|
|
let div = addWrapper(); |
|
|
let div = addWrapper(); |
|
|
obj.data.value.content.forEach((item)=>{ |
|
|
|
|
|
addClickItemImg(div, item.logo, item.img, 165, 120, window.clickCoupon); |
|
|
|
|
|
|
|
|
window.content.forEach((item)=>{ |
|
|
|
|
|
addClickItemImg(div, item.logo, item.img, 165, 212, window.clickCoupon); |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
break; |
|
|
break; |
|
|
@ -164,7 +166,7 @@ window.clickCoupon = function(event){ |
|
|
mark.style.display = "flex"; |
|
|
mark.style.display = "flex"; |
|
|
let video = document.createElement("img"); |
|
|
let video = document.createElement("img"); |
|
|
video.src = event.target.dataset.pop; |
|
|
video.src = event.target.dataset.pop; |
|
|
video.style.width = "100%"; |
|
|
|
|
|
|
|
|
video.style.width = "700px"; |
|
|
video.style.margin="auto"; |
|
|
video.style.margin="auto"; |
|
|
mark.appendChild(video); |
|
|
mark.appendChild(video); |
|
|
mark.addEventListener("click", ()=>{ |
|
|
mark.addEventListener("click", ()=>{ |
|
|
@ -243,9 +245,7 @@ window.audioStop = () => { |
|
|
} |
|
|
} |
|
|
//语音播放完成
|
|
|
//语音播放完成
|
|
|
window.playOver=()=>{ |
|
|
window.playOver=()=>{ |
|
|
document.getElementById("bgVideo").style.display = ""; |
|
|
|
|
|
document.getElementById("hVideo").style.display = "none"; |
|
|
|
|
|
document.getElementById("aVideo").style.display = "none"; |
|
|
|
|
|
|
|
|
window.changeBg(); |
|
|
window.hello(); |
|
|
window.hello(); |
|
|
window.isplayHello=true; |
|
|
window.isplayHello=true; |
|
|
} |
|
|
} |
|
|
@ -267,3 +267,8 @@ window.changeVideo=()=>{ |
|
|
document.getElementById("hVideo").style.display = window.isHello ? "" : "none"; |
|
|
document.getElementById("hVideo").style.display = window.isHello ? "" : "none"; |
|
|
document.getElementById("aVideo").style.display = !window.isHello ? "" : "none"; |
|
|
document.getElementById("aVideo").style.display = !window.isHello ? "" : "none"; |
|
|
} |
|
|
} |
|
|
|
|
|
window.changeBg=()=>{ |
|
|
|
|
|
document.getElementById("bgVideo").style.display = ""; |
|
|
|
|
|
document.getElementById("hVideo").style.display = "none"; |
|
|
|
|
|
document.getElementById("aVideo").style.display = "none"; |
|
|
|
|
|
} |