|
|
@ -168,3 +168,74 @@ export const totalPageAni = async (activeIndex, previousIndex) => { |
|
|
|
animateCSS('#contact_hand', aniName) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
export const addAnchor = activeIndex => { |
|
|
|
if (activeIndex == 0) { |
|
|
|
var url = location.pathname + '#home' |
|
|
|
history.pushState({ url: url, title: document.title }, document.title, url) |
|
|
|
} |
|
|
|
if (activeIndex == 1) { |
|
|
|
var url = location.pathname + '#service' |
|
|
|
history.pushState({ url: url, title: document.title }, document.title, url) |
|
|
|
} |
|
|
|
if (activeIndex == 2) { |
|
|
|
var url = location.pathname + '#cooperation' |
|
|
|
history.pushState({ url: url, title: document.title }, document.title, url) |
|
|
|
} |
|
|
|
if (activeIndex == 3) { |
|
|
|
var url = location.pathname + '#caselist' |
|
|
|
history.pushState({ url: url, title: document.title }, document.title, url) |
|
|
|
} |
|
|
|
if (activeIndex == 4) { |
|
|
|
var url = location.pathname + '#casedetail' |
|
|
|
history.pushState({ url: url, title: document.title }, document.title, url) |
|
|
|
} |
|
|
|
if (activeIndex == 5) { |
|
|
|
var url = location.pathname + '#hardware' |
|
|
|
history.pushState({ url: url, title: document.title }, document.title, url) |
|
|
|
} |
|
|
|
if (activeIndex == 6) { |
|
|
|
var url = location.pathname + '#harddetail' |
|
|
|
history.pushState({ url: url, title: document.title }, document.title, url) |
|
|
|
} |
|
|
|
if (activeIndex == 7) { |
|
|
|
var url = location.pathname + '#experience' |
|
|
|
history.pushState({ url: url, title: document.title }, document.title, url) |
|
|
|
} |
|
|
|
if (activeIndex == 8) { |
|
|
|
var url = location.pathname + '#hardwareshow' |
|
|
|
history.pushState({ url: url, title: document.title }, document.title, url) |
|
|
|
} |
|
|
|
if (activeIndex == 9) { |
|
|
|
var url = location.pathname + '#webofthing' |
|
|
|
history.pushState({ url: url, title: document.title }, document.title, url) |
|
|
|
} |
|
|
|
if (activeIndex == 10) { |
|
|
|
var url = location.pathname + '#control' |
|
|
|
history.pushState({ url: url, title: document.title }, document.title, url) |
|
|
|
} |
|
|
|
if (activeIndex == 11) { |
|
|
|
var url = location.pathname + '#drive' |
|
|
|
history.pushState({ url: url, title: document.title }, document.title, url) |
|
|
|
} |
|
|
|
if (activeIndex == 12) { |
|
|
|
var url = location.pathname + '#readwidely' |
|
|
|
history.pushState({ url: url, title: document.title }, document.title, url) |
|
|
|
} |
|
|
|
if (activeIndex == 13) { |
|
|
|
var url = location.pathname + '#culture' |
|
|
|
history.pushState({ url: url, title: document.title }, document.title, url) |
|
|
|
} |
|
|
|
if (activeIndex == 14) { |
|
|
|
var url = location.pathname + '#recruit' |
|
|
|
history.pushState({ url: url, title: document.title }, document.title, url) |
|
|
|
} |
|
|
|
if (activeIndex == 15) { |
|
|
|
var url = location.pathname + '#video' |
|
|
|
history.pushState({ url: url, title: document.title }, document.title, url) |
|
|
|
} |
|
|
|
if (activeIndex == 16) { |
|
|
|
var url = location.pathname + '#contact' |
|
|
|
history.pushState({ url: url, title: document.title }, document.title, url) |
|
|
|
} |
|
|
|
} |