|
@@ -12,10 +12,11 @@
|
|
|
<li
|
|
|
v-for="item in otherRelicList"
|
|
|
:key="item.id"
|
|
|
+ @click="activeOtherRelicData = item, isShowOtherRelicDetail = true"
|
|
|
>
|
|
|
<img
|
|
|
class=""
|
|
|
- :src="item.thumb"
|
|
|
+ :src="`${$env.VUE_APP_DEPLOY_ORIGIN}${item.thumb}`"
|
|
|
alt=""
|
|
|
draggable="false"
|
|
|
>
|
|
@@ -104,7 +105,12 @@
|
|
|
</div>
|
|
|
<div class="splitter" />
|
|
|
<div class="text">
|
|
|
- {{ hotRelicList[activeHotRelicIdx].desc }}
|
|
|
+ <p
|
|
|
+ v-for="(item, idx) in hotRelicList[activeHotRelicIdx].desc"
|
|
|
+ :key="idx"
|
|
|
+ >
|
|
|
+ {{ item }}
|
|
|
+ </p>
|
|
|
</div>
|
|
|
<img
|
|
|
class=""
|
|
@@ -148,9 +154,7 @@
|
|
|
</button>
|
|
|
<button
|
|
|
class="search"
|
|
|
- @click="$router.push({
|
|
|
- name: 'RelicSearch'
|
|
|
- })"
|
|
|
+ @click="isShowRelicSearch = true"
|
|
|
>
|
|
|
搜索
|
|
|
<img
|
|
@@ -169,24 +173,40 @@
|
|
|
>
|
|
|
<button class="arrow-down" />
|
|
|
|
|
|
- <router-view />
|
|
|
+ <OtherRelicDetail
|
|
|
+ v-if="isShowOtherRelicDetail"
|
|
|
+ :data="activeOtherRelicData"
|
|
|
+ @close="isShowOtherRelicDetail = false, activeOtherRelicData = {}"
|
|
|
+ />
|
|
|
+
|
|
|
+ <RelicSearch
|
|
|
+ v-if="isShowRelicSearch"
|
|
|
+ @close="onSearchViewClose"
|
|
|
+ />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-import { ref, computed, watch, onMounted, watchEffect } from "vue"
|
|
|
+import { ref, computed, watch, onMounted, watchEffect, inject } from "vue"
|
|
|
import { useRoute, useRouter } from "vue-router"
|
|
|
import { useStore } from "vuex"
|
|
|
import { useElementSize } from '@vueuse/core'
|
|
|
+import OtherRelicDetail from '@/components/OtherRelicDetail.vue'
|
|
|
+import RelicSearch from '@/components/RelicSearch.vue'
|
|
|
|
|
|
const route = useRoute()
|
|
|
const router = useRouter()
|
|
|
const store = useStore()
|
|
|
|
|
|
+const $env = inject('$env')
|
|
|
+
|
|
|
const otherRelicList = ref([])
|
|
|
api.getRelicList().then((res) => {
|
|
|
otherRelicList.value = res
|
|
|
})
|
|
|
+const isShowOtherRelicDetail = ref(false)
|
|
|
+const activeOtherRelicData = ref({})
|
|
|
+
|
|
|
|
|
|
const centerRef = ref(null)
|
|
|
const { width: centerWidth, height: centerHeight } = useElementSize(centerRef)
|
|
@@ -617,6 +637,15 @@ function onClickArea(idx) {
|
|
|
activeAreaIdx.value = idx
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+const isShowRelicSearch = ref(false)
|
|
|
+function onSearchViewClose(relicData) {
|
|
|
+ isShowRelicSearch.value = false
|
|
|
+ if (relicData) {
|
|
|
+ activeOtherRelicData.value = relicData
|
|
|
+ isShowOtherRelicDetail.value = true
|
|
|
+ }
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<style lang="less" scoped>
|
|
@@ -634,7 +663,7 @@ function onClickArea(idx) {
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
padding-top: 5vh;
|
|
|
- padding-bottom: 18vh;
|
|
|
+ padding-bottom: 11vh;
|
|
|
position: relative;
|
|
|
z-index: 1;
|
|
|
>.title{
|
|
@@ -722,13 +751,13 @@ function onClickArea(idx) {
|
|
|
background-repeat: no-repeat;
|
|
|
background-position: center center;
|
|
|
position: relative;
|
|
|
- cursor: pointer;
|
|
|
>img.pos-in-map{
|
|
|
position: absolute;
|
|
|
transform: translate(-50%, -50%);
|
|
|
width: calc(15 / 734 * 100%);
|
|
|
height: calc(22 / 734 * 100%);
|
|
|
transform-origin: center bottom;
|
|
|
+ cursor: pointer;
|
|
|
&.active{
|
|
|
transform: translate(-50%, -50%) scale(1.5);
|
|
|
z-index: 1;
|
|
@@ -740,6 +769,7 @@ function onClickArea(idx) {
|
|
|
height: 100%;
|
|
|
opacity: 0.3;
|
|
|
transform: translate(-50%, -50%);
|
|
|
+ cursor: pointer;
|
|
|
}
|
|
|
>img.colorful{
|
|
|
position: absolute;
|