zjk
2026-06-17 5670cbd3f42e1ad135fe26ca031086007ad70d87
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<template>
    <view>
        <image v-if="mapImg" @tap.stop="viewImg" :src="mapImg" style="width: 100vw;" mode="widthFix" />
    </view>
</template>
 
<script setup lang="ts">
    import { ref } from 'vue'
    import { onLoad } from '@dcloudio/uni-app'
    import { getOtherConfig } from '@/pages/contact/service.js'
    import { formatImageUrl } from '@/utils/utils.js'
 
    const mapImg = ref('')
 
    const loadConfig = async () => {
        const res = await getOtherConfig()
        if (res && res.data && res.data.mapImg) {
            mapImg.value = formatImageUrl(res.data.mapImg)
        }
    }
 
    onLoad(() => {
        loadConfig()
    })
 
    const viewImg = () => {
        if (!mapImg.value) return
        uni.previewImage({
            urls: [mapImg.value]
        })
    }
</script>
 
<style>
 
</style>