diff --git a/index.html b/index.html
index 91083dc..b87fea8 100644
--- a/index.html
+++ b/index.html
@@ -2,7 +2,7 @@
-
+
Wails App
diff --git a/main.js b/main.js
index 84b4def..48228eb 100644
--- a/main.js
+++ b/main.js
@@ -22,7 +22,7 @@ window.onload = () => {
window.setInterval(initDate,60000);
setScrollPosition(); //自动滚动到底部
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){
document.getElementById("ing").remove();
@@ -133,11 +135,11 @@ function callBack(str){
}
break;
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();
- 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;
@@ -164,7 +166,7 @@ window.clickCoupon = function(event){
mark.style.display = "flex";
let video = document.createElement("img");
video.src = event.target.dataset.pop;
- video.style.width = "100%";
+ video.style.width = "700px";
video.style.margin="auto";
mark.appendChild(video);
mark.addEventListener("click", ()=>{
@@ -243,9 +245,7 @@ window.audioStop = () => {
}
//语音播放完成
window.playOver=()=>{
- document.getElementById("bgVideo").style.display = "";
- document.getElementById("hVideo").style.display = "none";
- document.getElementById("aVideo").style.display = "none";
+ window.changeBg();
window.hello();
window.isplayHello=true;
}
@@ -267,3 +267,8 @@ window.changeVideo=()=>{
document.getElementById("hVideo").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";
+}
\ No newline at end of file
diff --git a/public/assets/con1.png b/public/assets/con1.png
new file mode 100644
index 0000000..8b1ad84
Binary files /dev/null and b/public/assets/con1.png differ
diff --git a/public/assets/con2.png b/public/assets/con2.png
new file mode 100644
index 0000000..d60e5fc
Binary files /dev/null and b/public/assets/con2.png differ
diff --git a/public/assets/con3.png b/public/assets/con3.png
new file mode 100644
index 0000000..326c357
Binary files /dev/null and b/public/assets/con3.png differ
diff --git a/public/assets/con4.png b/public/assets/con4.png
new file mode 100644
index 0000000..027915f
Binary files /dev/null and b/public/assets/con4.png differ
diff --git a/public/assets/con5.png b/public/assets/con5.png
new file mode 100644
index 0000000..b2d7e89
Binary files /dev/null and b/public/assets/con5.png differ
diff --git a/public/assets/conDail.png b/public/assets/conDail.png
new file mode 100644
index 0000000..ac974e6
Binary files /dev/null and b/public/assets/conDail.png differ
diff --git a/public/tts/index.js b/public/tts/index.js
index d77882a..5bad454 100644
--- a/public/tts/index.js
+++ b/public/tts/index.js
@@ -102,6 +102,7 @@ window.stopTTS = function(){
ttsWS?.close();
audioPlayer.reset();
audioPlayer.stop();
+ window.changeBg();
}
window.startTTS = function(str) {
diff --git a/public/vite.svg b/public/vite.svg
new file mode 100644
index 0000000..e7b8dfb
--- /dev/null
+++ b/public/vite.svg
@@ -0,0 +1 @@
+
\ No newline at end of file