<script setup>
import { ref,onMounted } from 'vue';
import { useRoute } from 'vue-router';
import { showImagePreview } from 'vant';
import axios from 'axios';
const info = ref({
  title: "",
  image: "",
  artist: "",
  size: "",
  year: "",
  type: "",
  material: "",
  appreciation: ""
});
const route = useRoute();
onMounted(() => {             
    if(route.query.info){
        axios({
        method: 'post',
        url: `${import.meta.env.VITE_ERP_API_BASE_URL}exhibition/get-info-byUuid`,
        data: { 
            uuid: decodeURIComponent(route.query.info)
        }
    }).then(res => {
        if(res.data.code === 0){
            info.value = res.data.data;
        }
    });
    }
});
const goLink=()=>{
    if(info.value.arType === 1){
        window.location.href='https://webar.szjixun.cn/tracker1/'
    }else if(info.value.arType === 2){
        window.location.href='https://webar.szjixun.cn/tracker2/'
    }else if(info.value.arType === 3){
        window.location.href='https://webar.szjixun.cn/tracker3/'
    }else if(info.value.arType === 4){
        window.location.href='https://webar.szjixun.cn/tracker4/'
    }
}
</script>
<template>
    <div class="w-100vw h-100vh flex flex-col overflow-hidden font-[FZZhongYaSong] ">
    
        <div
                class="grow-1 wrap1  flex flex-col items-center pt-97px pb-31px px-26px">
                <!-- 其他内容 -->
                <div class="text-29px text-#010101 font-400 mb-23px">《{{ info.title }}》</div>
                <div class="bg-[rgba(0,0,0,0.1)] w-255px h-346px mb-15px" @click="showImagePreview([info.image])">
                    <img :src="info.image" class="object-contain w-full h-full" alt="">
                </div>
                <div class="font-400 text-22px mb-34px">{{ info.artist }}</div>
                <div class="text-12px mb-56px w-255px">
                    <div class="flex mb-9px ">
                        <div class="font-300 flex items-center">
                            <img class="w-12px h-13px" src="@/assets/images/image20@2x.png" alt="">
                            <span>【尺寸】</span>
                        </div>
                        <div>{{ info.size }}</div>
                    </div>
                    <div class="flex mb-9px ">
                        <div class="font-300 flex items-center">
                            <img class="w-12px h-13px" src="@/assets/images/image20@2x.png" alt="">
                            <span>【年份】</span>
                        </div>
                        <div>{{ info.year }}</div>
                    </div>
                    <div class="flex mb-9px ">
                        <div class="font-300 flex items-center">
                            <img class="w-12px h-13px" src="@/assets/images/image20@2x.png" alt="">
                            <span>【类型】</span>
                        </div>
                        <div>{{ info.type }}</div>
                    </div>
                    <div class="flex mb-5px ">
                        <div class="font-300 flex items-center">
                            <img class="w-12px h-13px" src="@/assets/images/image20@2x.png" alt="">
                            <span>【材质】</span>
                        </div>
                        <div>{{ info.material }}</div>
                    </div>
                    <div class="flex mb-38px ">
                        <div class="font-300 flex pt-4px">
                            <img class="w-12px h-13px" src="@/assets/images/image20@2x.png" alt="">
                            <span class="whitespace-nowrap">【笔墨技法】</span>
                        </div>
                        <div class="leading-22px">{{ info.penTechniques }}</div>
                    </div>
                    <div class="flex mb-38px ">
                        <div class="font-300 flex pt-4px">
                            <img class="w-12px h-13px" src="@/assets/images/image20@2x.png" alt="">
                            <span class="whitespace-nowrap">【绘画思想】</span>
                        </div>
                        <div class="leading-22px">{{ info.artIdea }}</div>
                    </div>
                    <div class="flex mb-38px ">
                        <div class="font-300 flex pt-4px">
                            <img class="w-12px h-13px" src="@/assets/images/image20@2x.png" alt="">
                            <span class="whitespace-nowrap">【表达思想】</span>
                        </div>
                        <div class="leading-22px">{{ info.expressIdea }}</div>
                    </div>
                    <div class="flex mb-38px ">
                        <div class="font-300 flex pt-4px">
                            <img class="w-12px h-13px" src="@/assets/images/image20@2x.png" alt="">
                            <span class="whitespace-nowrap">【画作赏析】</span>
                        </div>
                        <div class="leading-22px">{{ info.appreciation }}</div>
                    </div>
                </div>
                <div class="flex justify-around w-full">
            <img class="w-68px h-44px" src="@/assets/images/df29@2x.png" alt="">
            <img class="w-101px h-44px" src="@/assets/images/zzdf30@2x.png" alt="">
            <img class="w-50px h-34px" src="@/assets/images/tc31@2x.png" alt="">
        </div>
            </div>
            <!-- <div class="bg-[url('@/assets/images/BG@2x.png')] w-63px h-42px fixed bg-cover right--1 top-45vh flex items-center pl-9px" @click="goLink">
                <img class="w-15px h-15px mr-6px" src="@/assets/images/sca@2x.png" alt="">
                <div class="text-#fff text-9px">
                    <div>扫一扫</div>
                    <div class="text-center">画作</div>
                </div>
            </div> -->
      
    </div>
</template>
<style scoped>
.wrap1 {
    background-image: url('../../assets/images/20250407155229.png');
    height: 100%;
    background-size: 100% auto;
    background-position: top;
    background-repeat: no-repeat;
    overflow-y: auto;
}
</style>