/* Js for https://www.huitouke.cn/index.mhtml, Version=1707571907 */
v.theme = {"template":"mobile","theme":"default","device":"mobile"};;
// 会员版详情
function goMember() {
window.location.href = 'https://www.huitouke.cn/index.php?m=page&f=view&pageID=96'
}
// 零售版详情
function goRetail() {
window.location.href = 'https://www.huitouke.cn/index.php?m=page&f=view&pageID=97'
}
// 美业版详情
function goBeauty() {
window.location.href = 'https://www.huitouke.cn/index.php?m=page&f=view&pageID=98'
}
// 餐饮版详情
function goCatering() {
window.location.href = 'https://www.huitouke.cn/index.php?m=page&f=view&pageID=99'
}
function service(detail) {
let datetime = new Date()
let mon = datetime.getMonth() + 1
let day = datetime.getDate()
let hou = datetime.getHours()
let min = datetime.getMinutes()
//设置顾客资料
var customer = {
'名称': '回头客网站' + detail + mon + '-' + day + ' ' + hou + ':' + min,
'来源': '回头客网站',
};
//将 json 格式转为字符串
customer = JSON.stringify(customer);
//用 encodeURIComponent 进行编码
customer = encodeURIComponent(customer);
//生成最终的对话链接
var url = 'https://11416.ahc.ink/chat.html?customer=' + customer;
//设置 A 链接的 href
// document.getElementById("customer_service").href = url;
window.open(url)
}
;
let solve = document.getElementsByClassName('solve_nav')
solve[0].style.borderBottom = '2px solid #ff7700'
let answer = document.getElementsByClassName('solve_answer')
answer[0].style.display = 'flex'
let navBox = document.getElementsByClassName('mobile_solve_nav')[0]
let box = document.getElementsByClassName('mobile_solve_nav_box')[0]
let scrollInterval
function navHover(val) {
for (let i = 0; i <= 5; i++) {
solve[i].style.borderBottom = '2px solid #eeeeee'
answer[i].style.display = 'none'
}
if (val == 0 || val == 1) {
// box.scrollLeft = 0
clearInterval(scrollInterval)
intervaler(0)
} else if (val == 2) {
// box.scrollLeft = (box.scrollWidth / 6)
clearInterval(scrollInterval)
intervaler(box.scrollWidth / 6)
} else if (val == 3) {
// box.scrollLeft = (box.scrollWidth / 3)
clearInterval(scrollInterval)
intervaler(box.scrollWidth / 3)
} else if (val >= 4) {
// box.scrollLeft = (box.scrollWidth / 2)
clearInterval(scrollInterval)
intervaler(box.scrollWidth / 2)
}
console.log(box.scrollLeft)
solve[val].style.borderBottom = '2px solid #ff7700'
answer[val].style.display = 'flex'
}
function intervaler(val) {
scrollInterval = setInterval(() => {
if (box.scrollLeft > val) box.scrollLeft -= 1
if (box.scrollLeft < val) box.scrollLeft += 1
if (box.scrollLeft == val) clearInterval(scrollInterval)
}, 1)
}
;
let user = document.getElementsByClassName('store_user')[0]
let swhite = user.scrollWidth
let userInterval
function scrollRun(val) {
clearInterval(userInterval)
if (val <= 0) {
userInterval = setInterval(() => {
user.scrollLeft += 1
if (user.scrollLeft >= user.scrollWidth * 2 / 3) {
clearInterval(userInterval)
scrollRun(user.scrollLeft)
}
}, 30)
}
if (val >= user.scrollWidth * 2 / 3) {
userInterval = setInterval(() => {
user.scrollLeft -= 1
if (user.scrollLeft <= 0) {
clearInterval(userInterval)
scrollRun(0)
}
}, 30)
}
}
scrollRun(0)
;
//客服特效
let datetime = new Date()
let mon = datetime.getMonth() + 1
let day = datetime.getDate()
let hou = datetime.getHours()
let min = datetime.getMinutes()
//设置顾客资料
var customer = {
'名称': '回头客网站' + mon + '-' + day + ' ' + hou + ':' + min,
'来源': '回头客网站',
};
//将 json 格式转为字符串
customer = JSON.stringify(customer);
//用 encodeURIComponent 进行编码
customer = encodeURIComponent(customer);
//生成最终的对话链接
var url = 'https://11416.ahc.ink/chat.html?customer=' + customer;
function serviceCall() {
window.location.href = url
}
function serviceTel() {
window.location.href = 'tel:13341005066'
}
;
var logLink = "/log-record.mhtml";
var browserLanguage = navigator.language || navigator.userLanguage;
var resolution = screen.availWidth + ' X ' + screen.availHeight;
$.get(logLink, {browserLanguage:browserLanguage, resolution:resolution});