|
|
@ -12,7 +12,8 @@ |
|
|
|
</el-tooltip> |
|
|
|
</el-tooltip> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="relative min-h-[calc(100vh-64px)] pt-5 pl-5 bg-[url('@/assets/images/level/4.png')] bg-[length:100%_100%] bg-no-repeat"> |
|
|
|
<div class="relative h-[calc(100vh-64px)] pt-5 pl-5 bg-[url('@/assets/images/level/4.png')] bg-[length:100%_100%] bg-no-repeat bg-fixed overflow-auto" |
|
|
|
|
|
|
|
id="wrap"> |
|
|
|
<div class="relative"> |
|
|
|
<div class="relative"> |
|
|
|
<div class="w-[354px] h-[68px] bg-[url('@/assets/images/level/5.png')] bg-[length:100%_100%] bg-no-repeat"></div> |
|
|
|
<div class="w-[354px] h-[68px] bg-[url('@/assets/images/level/5.png')] bg-[length:100%_100%] bg-no-repeat"></div> |
|
|
|
<div class="absolute top-5 left-40 flex items-center cursor-pointer" |
|
|
|
<div class="absolute top-5 left-40 flex items-center cursor-pointer" |
|
|
@ -49,12 +50,15 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div class="arrow top-0 left-[50%] translate-x-[-50%] w-[64px] h-[64px] bg-[url('@/assets/images/level/arrow-up.png')]"></div> |
|
|
|
<div class="arrow top-[68px] left-[50%] translate-x-[-50%] w-[64px] h-[64px] bg-[url('@/assets/images/level/arrow-up.png')]" |
|
|
|
<div class="arrow right-0 top-[50%] translate-y-[-50%] w-[64px] h-[64px] bg-[url('@/assets/images/level/arrow-right.png')]"></div> |
|
|
|
@click="move('up')"></div> |
|
|
|
|
|
|
|
<div class="arrow right-0 top-[50%] translate-y-[-50%] w-[64px] h-[64px] bg-[url('@/assets/images/level/arrow-right.png')]" |
|
|
|
|
|
|
|
@click="move('right')"></div> |
|
|
|
<div class="arrow bottom-0 left-[50%] translate-x-[-50%] w-[64px] h-[64px] bg-[url('@/assets/images/level/arrow-down.png')]" |
|
|
|
<div class="arrow bottom-0 left-[50%] translate-x-[-50%] w-[64px] h-[64px] bg-[url('@/assets/images/level/arrow-down.png')]" |
|
|
|
@click="move"></div> |
|
|
|
@click="move('down')"></div> |
|
|
|
<div class="arrow left-0 top-[50%] translate-y-[-50%] w-[64px] h-[64px] bg-[url('@/assets/images/level/arrow-left.png')]"></div> |
|
|
|
<div class="arrow left-0 top-[50%] translate-y-[-50%] w-[64px] h-[64px] bg-[url('@/assets/images/level/arrow-left.png')]" |
|
|
|
<div class="absolute bottom-2 right-1 w-[262px] h-[74px] bg-[url('@/assets/images/level/submit.png')] bg-[length:100%_100%] bg-no-repeat cursor-pointer hover:bg-[url('@/assets/images/level/submit-hover.png')]" |
|
|
|
@click="move('left')"></div> |
|
|
|
|
|
|
|
<div class="fixed bottom-2 right-1 w-[262px] h-[74px] bg-[url('@/assets/images/level/submit.png')] bg-[length:100%_100%] bg-no-repeat cursor-pointer hover:bg-[url('@/assets/images/level/submit-hover.png')]" |
|
|
|
@click="toRole"></div> |
|
|
|
@click="toRole"></div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<Panel /> |
|
|
|
<Panel /> |
|
|
@ -77,6 +81,7 @@ const collected = ref<boolean>(false); |
|
|
|
const curLevel = ref<number | string>(''); |
|
|
|
const curLevel = ref<number | string>(''); |
|
|
|
const levels = ref<Record<string, any>[]>([]); |
|
|
|
const levels = ref<Record<string, any>[]>([]); |
|
|
|
const projectId = Cookies.get('sand-projectId') ?? route.query.projectId; |
|
|
|
const projectId = Cookies.get('sand-projectId') ?? route.query.projectId; |
|
|
|
|
|
|
|
const step = 150; |
|
|
|
// 关卡列表 |
|
|
|
// 关卡列表 |
|
|
|
const getLevel = async (only: any = '') => { |
|
|
|
const getLevel = async (only: any = '') => { |
|
|
|
if (only) collected.value = !collected.value; |
|
|
|
if (only) collected.value = !collected.value; |
|
|
@ -113,8 +118,14 @@ const toRole = () => { |
|
|
|
ElMessage.error('请选择关卡!'); |
|
|
|
ElMessage.error('请选择关卡!'); |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
const move = () => { |
|
|
|
const move = (dir: string) => { |
|
|
|
window.scrollTo(0, 100); |
|
|
|
const el = document.querySelector('#wrap'); |
|
|
|
|
|
|
|
const param = { |
|
|
|
|
|
|
|
behavior: 'smooth', |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
if (dir === 'left' || dir === 'right') param.left = el.scrollLeft + (dir === 'left' ? -150 : 150); |
|
|
|
|
|
|
|
if (dir === 'up' || dir === 'down') param.top = el.scrollTop + (dir === 'up' ? -150 : 150); |
|
|
|
|
|
|
|
el.scrollTo(param); |
|
|
|
}; |
|
|
|
}; |
|
|
|
onMounted(() => { |
|
|
|
onMounted(() => { |
|
|
|
getLevel(); |
|
|
|
getLevel(); |
|
|
@ -122,11 +133,18 @@ onMounted(() => { |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped> |
|
|
|
<style lang="scss" scoped> |
|
|
|
|
|
|
|
@mixin verticalLine { |
|
|
|
|
|
|
|
@apply left-[108px] h-[98px] bg-[url('@/assets/images/level/line3.png')]; |
|
|
|
|
|
|
|
} |
|
|
|
.item { |
|
|
|
.item { |
|
|
|
--w: 330px; |
|
|
|
--w: 330px; |
|
|
|
--line2: 160px; |
|
|
|
--line2: 160px; |
|
|
|
--line3: 360px; |
|
|
|
--line3: 360px; |
|
|
|
--line4: 520px; |
|
|
|
--line4: 520px; |
|
|
|
|
|
|
|
--line5: 680px; |
|
|
|
|
|
|
|
--line6: 840px; |
|
|
|
|
|
|
|
--line7: 1000px; |
|
|
|
|
|
|
|
--line8: 1160px; |
|
|
|
@apply absolute w-[218px] h-[120px] text-white bg-[url('@/assets/images/level/8.png')] bg-[length:100%_100%] bg-no-repeat cursor-pointer; |
|
|
|
@apply absolute w-[218px] h-[120px] text-white bg-[url('@/assets/images/level/8.png')] bg-[length:100%_100%] bg-no-repeat cursor-pointer; |
|
|
|
&:before, |
|
|
|
&:before, |
|
|
|
&:after { |
|
|
|
&:after { |
|
|
@ -192,9 +210,22 @@ onMounted(() => { |
|
|
|
} |
|
|
|
} |
|
|
|
&:nth-child(10) { |
|
|
|
&:nth-child(10) { |
|
|
|
@apply top-[var(--line2)] left-[1500px]; |
|
|
|
@apply top-[var(--line2)] left-[1500px]; |
|
|
|
|
|
|
|
&:before { |
|
|
|
|
|
|
|
display: none; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
&:after { |
|
|
|
|
|
|
|
@include verticalLine; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
&:nth-child(11) { |
|
|
|
&:nth-child(11) { |
|
|
|
@apply top-[var(--line3)] left-[1500px]; |
|
|
|
@apply top-[var(--line3)] left-[1500px]; |
|
|
|
|
|
|
|
&:before { |
|
|
|
|
|
|
|
@apply left-[40px] bg-[url('@/assets/images/level/line2.png')]; |
|
|
|
|
|
|
|
transform: rotateX(180deg); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
&:after { |
|
|
|
|
|
|
|
display: none; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
&:nth-child(12) { |
|
|
|
&:nth-child(12) { |
|
|
|
@apply top-[var(--line4)] left-[calc(var(--w)*4)]; |
|
|
|
@apply top-[var(--line4)] left-[calc(var(--w)*4)]; |
|
|
@ -222,6 +253,9 @@ onMounted(() => { |
|
|
|
} |
|
|
|
} |
|
|
|
&:nth-child(20) { |
|
|
|
&:nth-child(20) { |
|
|
|
@apply top-[var(--line4)]; |
|
|
|
@apply top-[var(--line4)]; |
|
|
|
|
|
|
|
&:after { |
|
|
|
|
|
|
|
@include verticalLine; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
&:nth-child(odd) { |
|
|
|
&:nth-child(odd) { |
|
|
@ -242,15 +276,47 @@ onMounted(() => { |
|
|
|
@apply bg-[url('@/assets/images/level/line2.png')]; |
|
|
|
@apply bg-[url('@/assets/images/level/line2.png')]; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
&:nth-child(10) { |
|
|
|
&:nth-child(21) { |
|
|
|
|
|
|
|
@apply top-[var(--line5)]; |
|
|
|
|
|
|
|
&:before { |
|
|
|
|
|
|
|
display: none; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
&:nth-child(22) { |
|
|
|
|
|
|
|
@apply top-[var(--line6)] left-[160px]; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
&:nth-child(23) { |
|
|
|
|
|
|
|
@apply top-[var(--line5)] left-[var(--w)]; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
&:nth-child(24) { |
|
|
|
|
|
|
|
@apply top-[var(--line6)] left-[510px]; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
&:nth-child(25) { |
|
|
|
|
|
|
|
@apply top-[var(--line5)] left-[calc(var(--w)*2)]; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
&:nth-child(26) { |
|
|
|
|
|
|
|
@apply top-[var(--line6)] left-[820px]; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
&:nth-child(27) { |
|
|
|
|
|
|
|
@apply top-[var(--line5)] left-[calc(var(--w)*3)]; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
&:nth-child(28) { |
|
|
|
|
|
|
|
@apply top-[var(--line6)] left-[1170px]; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
&:nth-child(29) { |
|
|
|
|
|
|
|
@apply top-[var(--line5)] left-[calc(var(--w)*4)]; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
&:nth-child(30) { |
|
|
|
|
|
|
|
@apply top-[var(--line6)] left-[1500px]; |
|
|
|
&:before { |
|
|
|
&:before { |
|
|
|
display: none; |
|
|
|
display: none; |
|
|
|
} |
|
|
|
} |
|
|
|
&:after { |
|
|
|
&:after { |
|
|
|
@apply left-[108px] h-[98px] bg-[url('@/assets/images/level/line3.png')]; |
|
|
|
@include verticalLine; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
&:nth-child(11) { |
|
|
|
&:nth-child(31) { |
|
|
|
|
|
|
|
@apply top-[var(--line7)] left-[1500px]; |
|
|
|
&:before { |
|
|
|
&:before { |
|
|
|
@apply left-[40px] bg-[url('@/assets/images/level/line2.png')]; |
|
|
|
@apply left-[40px] bg-[url('@/assets/images/level/line2.png')]; |
|
|
|
transform: rotateX(180deg); |
|
|
|
transform: rotateX(180deg); |
|
|
@ -259,9 +325,44 @@ onMounted(() => { |
|
|
|
display: none; |
|
|
|
display: none; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
&:nth-child(32) { |
|
|
|
|
|
|
|
@apply top-[var(--line8)] left-[calc(var(--w)*4)]; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
&:nth-child(33) { |
|
|
|
|
|
|
|
@apply top-[var(--line7)] left-[1170px]; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
&:nth-child(34) { |
|
|
|
|
|
|
|
@apply top-[var(--line8)] left-[calc(var(--w)*3)]; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
&:nth-child(35) { |
|
|
|
|
|
|
|
@apply top-[var(--line7)] left-[820px]; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
&:nth-child(36) { |
|
|
|
|
|
|
|
@apply top-[var(--line8)] left-[calc(var(--w)*2)]; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
&:nth-child(37) { |
|
|
|
|
|
|
|
@apply top-[var(--line7)] left-[510px]; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
&:nth-child(38) { |
|
|
|
|
|
|
|
@apply top-[var(--line8)] left-[var(--w)]; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
&:nth-child(39) { |
|
|
|
|
|
|
|
@apply top-[var(--line7)] left-[160px]; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
&:nth-child(40) { |
|
|
|
|
|
|
|
@apply top-[var(--line8)]; |
|
|
|
|
|
|
|
&:after { |
|
|
|
|
|
|
|
@include verticalLine; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
&:last-child { |
|
|
|
|
|
|
|
&:before { |
|
|
|
|
|
|
|
display: none; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
.arrow { |
|
|
|
.arrow { |
|
|
|
@apply absolute bg-[length:100%_100%] bg-no-repeat animate-bounce cursor-pointer; |
|
|
|
@apply fixed bg-[length:100%_100%] bg-no-repeat animate-bounce cursor-pointer; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@keyframes bounce { |
|
|
|
@keyframes bounce { |
|
|
|