|
@@ -0,0 +1,205 @@
|
|
|
+<template>
|
|
|
+ <div class="common-draw-list-view">
|
|
|
+ <div
|
|
|
+ v-if="route.query.idx === '5'"
|
|
|
+ class="no-content"
|
|
|
+ >
|
|
|
+ <img
|
|
|
+ class="no-content"
|
|
|
+ src="@/assets/images/please-wait.png"
|
|
|
+ alt=""
|
|
|
+ draggable="false"
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ <ul
|
|
|
+ v-if="route.query.idx !== '5'"
|
|
|
+ class="common-draw-list"
|
|
|
+ >
|
|
|
+ <li
|
|
|
+ v-for="(drawName, idx) in drawList"
|
|
|
+ :key="idx"
|
|
|
+ >
|
|
|
+ <img
|
|
|
+ v-viewer
|
|
|
+ class=""
|
|
|
+ :src="`${imgPrefix}/${drawName}`"
|
|
|
+ alt=""
|
|
|
+ draggable="false"
|
|
|
+ >
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ <ul
|
|
|
+ v-if="route.query.idx !== '5'"
|
|
|
+ class="group-list"
|
|
|
+ >
|
|
|
+ <li
|
|
|
+ v-for="(groupName, idx) in Object.keys(groupList)"
|
|
|
+ :key="idx"
|
|
|
+ :class="{
|
|
|
+ active: activeGroupIdx === idx
|
|
|
+ }"
|
|
|
+ @click="activeGroupIdx = idx"
|
|
|
+ >
|
|
|
+ {{ groupName }}
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ <button
|
|
|
+ v-if="route.query.idx === '3'"
|
|
|
+ class="game-entry"
|
|
|
+ @click="router.push({
|
|
|
+ name: 'StartView',
|
|
|
+ })"
|
|
|
+ />
|
|
|
+ <button
|
|
|
+ class="return"
|
|
|
+ @click="router.push({
|
|
|
+ name: 'EntryList',
|
|
|
+ })"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script setup>
|
|
|
+import { ref, computed, } from "vue"
|
|
|
+import { useRoute, useRouter } from "vue-router"
|
|
|
+import { hasShownForword } from "@/store/index.js"
|
|
|
+import { drawTree } from "@/assets/draw-tree.js"
|
|
|
+
|
|
|
+const {
|
|
|
+ windowSizeInCssForRef,
|
|
|
+ windowSizeWhenDesignForRef,
|
|
|
+} = useSizeAdapt(724, 375)
|
|
|
+
|
|
|
+const route = useRoute()
|
|
|
+const router = useRouter()
|
|
|
+
|
|
|
+const activeGroupIdx = ref(0)
|
|
|
+
|
|
|
+const groupL1Name = Object.keys(drawTree)[Number(route.query.idx) - 1]
|
|
|
+const groupList = Object.values(drawTree)[Number(route.query.idx) - 1]
|
|
|
+const groupName = computed(() => {
|
|
|
+ return Object.keys(groupList)[activeGroupIdx.value]
|
|
|
+})
|
|
|
+const drawList = computed(() => {
|
|
|
+ return Object.keys(groupList[Object.keys(groupList)[activeGroupIdx.value]])
|
|
|
+})
|
|
|
+const imgPrefix = computed(() => {
|
|
|
+ return `https://4dkk-culture.oss-cn-shenzhen.aliyuncs.com/LiangZhu/draws/${encodeURIComponent(groupL1Name)}/${encodeURIComponent(groupName.value)}`
|
|
|
+})
|
|
|
+</script>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+<style lang="less" scoped>
|
|
|
+.common-draw-list-view{
|
|
|
+ position: relative;
|
|
|
+ height: 100%;
|
|
|
+ padding-top: calc(28 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ padding-bottom: calc(11 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ background-image: url(@/assets/images/foreword-bg.jpg);
|
|
|
+ background-size: cover;
|
|
|
+ background-repeat: no-repeat;
|
|
|
+ background-position: center center;
|
|
|
+ >div.no-content{
|
|
|
+ position: absolute;
|
|
|
+ left: 0;
|
|
|
+ top: 0;
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ >img.no-content{
|
|
|
+ height: calc(242 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ >ul.common-draw-list{
|
|
|
+ width: 100%;
|
|
|
+ padding-left: calc(19 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ padding-right: calc(4 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ padding-bottom: calc(5 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ overflow: auto;
|
|
|
+ &::-webkit-scrollbar { height: 0; };
|
|
|
+ >li{
|
|
|
+ flex: 0 0 auto;
|
|
|
+ width: calc(272 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ height: calc(272 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ margin-right: calc(15 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ background-size: cover;
|
|
|
+ background-repeat: no-repeat;
|
|
|
+ background-position: center center;
|
|
|
+ border-radius: calc(10 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ border: calc(4 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef')) solid #FFFFFF;
|
|
|
+ box-shadow: 0px calc(4 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef')) calc(4 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef')) 0px rgba(0,0,0,0.1);
|
|
|
+ >img{
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ object-fit: cover;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ >button.game-entry{
|
|
|
+ position: absolute;
|
|
|
+ bottom: 0;
|
|
|
+ right: calc(70 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ width: 194px;
|
|
|
+ height: 86px;
|
|
|
+ background-image: url(@/assets/images/game-entry.png);
|
|
|
+ background-size: cover;
|
|
|
+ background-repeat: no-repeat;
|
|
|
+ background-position: center center;
|
|
|
+ }
|
|
|
+ >button.return{
|
|
|
+ position: absolute;
|
|
|
+ bottom: calc(16 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ right: calc(20 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ width: calc(40 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ height: calc(40 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ background-image: url(@/assets/images/icon_back@2x.png);
|
|
|
+ background-size: contain;
|
|
|
+ background-repeat: no-repeat;
|
|
|
+ background-position: center center;
|
|
|
+ }
|
|
|
+ >ul.group-list{
|
|
|
+ width: 100%;
|
|
|
+ padding-left: calc(19 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ padding-right: calc(60 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ padding-bottom: calc(5 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ overflow: auto;
|
|
|
+ &::-webkit-scrollbar { height: 0; };
|
|
|
+ >li{
|
|
|
+ flex: 0 0 auto;
|
|
|
+ display: flex;
|
|
|
+ height: calc(40 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ margin-right: calc(10 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ font-size: 16px;
|
|
|
+ font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
|
|
+ font-weight: 400;
|
|
|
+ color: #484238;
|
|
|
+ line-height: 19px;
|
|
|
+ padding-right: calc(15 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ padding-left: calc(15 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ background-color: #fff;
|
|
|
+ border-radius: calc(5 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+ >li.active{
|
|
|
+ background-color: rgba(239, 196, 27, 1);
|
|
|
+ font-weight: bold;
|
|
|
+ color: #FFFFFF;
|
|
|
+ border: calc(3 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef')) solid #FFFFFF;
|
|
|
+ box-shadow: 0px calc(4 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef')) calc(4 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef')) 0px rgba(0,0,0,0.25);
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|