|
|
@ -47,20 +47,6 @@ window.audioStart = () => { |
|
|
addMy(); //添加我气泡
|
|
|
addMy(); //添加我气泡
|
|
|
setScrollPosition(); |
|
|
setScrollPosition(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// addBackItemText("思考中...","ing",false)
|
|
|
|
|
|
// setScrollPosition();
|
|
|
|
|
|
// let res = {
|
|
|
|
|
|
// code:200,
|
|
|
|
|
|
// data: {
|
|
|
|
|
|
// "type": "video",
|
|
|
|
|
|
// "value": {
|
|
|
|
|
|
// "text":"德基美术馆",
|
|
|
|
|
|
// "content":[{"logo":"/assets/act.png","video":"/assets/1.mp4"},{"logo":"/assets/act1.png","img":"/assets/video.png"}]
|
|
|
|
|
|
// }
|
|
|
|
|
|
// }
|
|
|
|
|
|
// }
|
|
|
|
|
|
// callBack(res);
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
function delMy(){ |
|
|
function delMy(){ |
|
|
@ -83,6 +69,8 @@ function callBack(str){ |
|
|
addredHot(); |
|
|
addredHot(); |
|
|
} |
|
|
} |
|
|
switch(obj.data.type){ |
|
|
switch(obj.data.type){ |
|
|
|
|
|
case undefined: |
|
|
|
|
|
break; |
|
|
case "shopList" : |
|
|
case "shopList" : |
|
|
if(typeof obj.data.value.length == "number"){ |
|
|
if(typeof obj.data.value.length == "number"){ |
|
|
obj.data.value.forEach((item, index)=>{ |
|
|
obj.data.value.forEach((item, index)=>{ |
|
|
@ -169,6 +157,7 @@ function callBack(str){ |
|
|
window.clickCoupon = function(event){ |
|
|
window.clickCoupon = function(event){ |
|
|
console.log(event.target.dataset.pop); |
|
|
console.log(event.target.dataset.pop); |
|
|
window.isplayHello = false; //停止播放招呼语音
|
|
|
window.isplayHello = false; //停止播放招呼语音
|
|
|
|
|
|
window.stopTTS(); |
|
|
let mark = document.getElementById("mark"); |
|
|
let mark = document.getElementById("mark"); |
|
|
mark.style.display = "flex"; |
|
|
mark.style.display = "flex"; |
|
|
let video = document.createElement("img"); |
|
|
let video = document.createElement("img"); |
|
|
@ -180,11 +169,13 @@ window.clickCoupon = function(event){ |
|
|
video.remove(); |
|
|
video.remove(); |
|
|
mark.style.display = "none"; |
|
|
mark.style.display = "none"; |
|
|
window.isplayHello = true; |
|
|
window.isplayHello = true; |
|
|
|
|
|
window.hello(); |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
window.clickVideo = function(event){ |
|
|
window.clickVideo = function(event){ |
|
|
console.log(event.target.dataset.video); |
|
|
console.log(event.target.dataset.video); |
|
|
window.isplayHello = false; //停止播放招呼语音
|
|
|
window.isplayHello = false; //停止播放招呼语音
|
|
|
|
|
|
window.stopTTS(); |
|
|
let mark = document.getElementById("mark"); |
|
|
let mark = document.getElementById("mark"); |
|
|
mark.style.display = "flex"; |
|
|
mark.style.display = "flex"; |
|
|
let video = document.createElement("video"); |
|
|
let video = document.createElement("video"); |
|
|
@ -197,6 +188,7 @@ window.clickVideo = function(event){ |
|
|
video.remove(); |
|
|
video.remove(); |
|
|
mark.style.display = "none"; |
|
|
mark.style.display = "none"; |
|
|
window.isplayHello = true; |
|
|
window.isplayHello = true; |
|
|
|
|
|
window.hello(); |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -209,7 +201,7 @@ let getAiData = async (msg) => { |
|
|
user: 'djdemo' |
|
|
user: 'djdemo' |
|
|
},{ |
|
|
},{ |
|
|
headers: { |
|
|
headers: { |
|
|
'Authorization': 'Bearer app-DjzwAeiecJhqdavo6Xev0fUr' |
|
|
|
|
|
|
|
|
'Authorization': 'Bearer app-Fzon9DlAGNVwJSSrjF1gCiw4' |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
console.log(response) |
|
|
console.log(response) |
|
|
@ -253,6 +245,7 @@ window.playOver=()=>{ |
|
|
document.getElementById("hVideo").style.display = "none"; |
|
|
document.getElementById("hVideo").style.display = "none"; |
|
|
document.getElementById("aVideo").style.display = "none"; |
|
|
document.getElementById("aVideo").style.display = "none"; |
|
|
window.hello(); |
|
|
window.hello(); |
|
|
|
|
|
window.isplayHello=true; |
|
|
} |
|
|
} |
|
|
window.timer=-1; |
|
|
window.timer=-1; |
|
|
window.isplayHello=true; |
|
|
window.isplayHello=true; |
|
|
@ -263,8 +256,6 @@ window.hello=()=>{ |
|
|
if(window.isplayHello){ |
|
|
if(window.isplayHello){ |
|
|
window.isHello=true; |
|
|
window.isHello=true; |
|
|
window.startTTS("您好呀,我是德基广场数字客服小德,请问有什么需要帮助的吗?"); |
|
|
window.startTTS("您好呀,我是德基广场数字客服小德,请问有什么需要帮助的吗?"); |
|
|
}else{ |
|
|
|
|
|
window.hello(); |
|
|
|
|
|
} |
|
|
} |
|
|
},60000); |
|
|
},60000); |
|
|
} |
|
|
} |
|
|
|