feat(bdleader政策页): 同时展示bd政策图,更新图源
This commit is contained in:
parent
baeac68495
commit
f70ebbb616
Binary file not shown.
|
Before Width: | Height: | Size: 1.9 MiB After Width: | Height: | Size: 1.9 MiB |
@ -2,27 +2,46 @@
|
|||||||
<div class="policy-container">
|
<div class="policy-container">
|
||||||
<!-- 顶部导航 -->
|
<!-- 顶部导航 -->
|
||||||
<MobileHeader :title="title" />
|
<MobileHeader :title="title" />
|
||||||
<img :src="imgUrl" alt="Policy Image" class="policy-image" />
|
<img
|
||||||
|
v-if="from === 'BDLead'"
|
||||||
|
:src="bdLeaderImgUrl"
|
||||||
|
alt="bdleader Policy Image"
|
||||||
|
class="policy-image"
|
||||||
|
/>
|
||||||
|
<img :src="bdImgUrl" alt="bd Policy Image" class="policy-image" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { computed, ref } from 'vue'
|
import { computed, onMounted, ref } from 'vue'
|
||||||
import MobileHeader from '@/components/MobileHeader.vue'
|
import MobileHeader from '@/components/MobileHeader.vue'
|
||||||
import { useRoute } from 'vue-router'
|
import { useRoute } from 'vue-router'
|
||||||
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const from = route.query.from || 'BDLead'
|
const from = ref('')
|
||||||
const title = ref('')
|
|
||||||
|
|
||||||
const imgUrl = computed(() => {
|
const title = ref('')
|
||||||
if (from === 'BD') {
|
const bdImgUrl = ref('') //bd政策图
|
||||||
|
const bdLeaderImgUrl = ref('') //bdleader政策图
|
||||||
|
|
||||||
|
const updateImages = () => {
|
||||||
|
from.value = route.query.from || 'BDLead'
|
||||||
|
|
||||||
|
if (from.value === 'BD') {
|
||||||
title.value = 'BD Policy'
|
title.value = 'BD Policy'
|
||||||
return new URL('/src/assets/images/BDPolicy/BDPolicy.png', import.meta.url).href
|
bdImgUrl.value = new URL('/src/assets/images/BDPolicy/BDPolicy.png', import.meta.url).href
|
||||||
} else if (from === 'BDLead') {
|
} else if (from.value === 'BDLead') {
|
||||||
title.value = 'BD Leader Policy'
|
title.value = 'BD Leader Policy'
|
||||||
return new URL('/src/assets/images/BDPolicy/BDLeaderPolicy.png', import.meta.url).href
|
bdImgUrl.value = new URL('/src/assets/images/BDPolicy/BDPolicy.png', import.meta.url).href
|
||||||
|
bdLeaderImgUrl.value = new URL(
|
||||||
|
'/src/assets/images/BDPolicy/BDLeaderPolicy.png',
|
||||||
|
import.meta.url
|
||||||
|
).href
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
updateImages()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user