最终上线

This commit is contained in:
zhcnyuyang 2025-05-11 15:32:06 +08:00
parent 1701c403f5
commit d06bf47f45

View File

@ -1,10 +1,10 @@
<script setup> <!--<script setup>-->
import { useBootstrapBreakpoint } from './useBreakpoint.js'; <!--import { useBootstrapBreakpoint } from './useBreakpoint.js';-->
const { breakpoint } = useBootstrapBreakpoint(); <!--const { breakpoint } = useBootstrapBreakpoint();-->
</script> <!--</script>-->
<template> <template>
<div id="passageroot" class="pageroot"> <div id="passageroot" class="pageroot" v-if="psginfo">
<div id="passagebanner" class="pagebanner"> <div id="passagebanner" class="pagebanner">
<img :src="`http://cms.yangprivate.site${psginfo.headimage.formats.large.url}`" <img :src="`http://cms.yangprivate.site${psginfo.headimage.formats.large.url}`"
alt="" id="bannerimg"/> alt="" id="bannerimg"/>
@ -19,14 +19,23 @@ const { breakpoint } = useBootstrapBreakpoint();
margin-top: margin-top:
auto;bottom: 0; auto;bottom: 0;
color: darkgray"> color: darkgray">
<div v-if="breakpoint==='xs'||breakpoint==='sm'" id="wepbar"> <!-- <div v-if="breakpoint==='xs'||breakpoint==='sm'" id="wepbar">-->
<!-- <span class="engtitle">-->
</div> <!-- <strong>{{this.psginfo.brandname_en}}</strong>-->
<div v-else id="pcbar"> <!-- </span>-->
<!-- <span class="engproject">-->
<!-- {{this.psginfo.projectname_en}}-->
<!-- </span>-->
<!-- <span style="width: 100%"></span>-->
<!-- <span class="code">-->
<!-- {{this.psginfo.projectcode}}-->
<!-- </span>-->
<!-- </div>-->
<br/>
<div id="pcbar">
<span class="engtitle"> <span class="engtitle">
<strong>{{this.psginfo.brandname_en}}</strong> <strong>{{this.psginfo.brandname_en}}</strong>
</span> </span>
&nbsp;
<span class="engproject"> <span class="engproject">
{{this.psginfo.projectname_en}} {{this.psginfo.projectname_en}}
</span> </span>
@ -88,13 +97,8 @@ export default {
this.error = "返回的 JSON 对象中不存在 'data' 数组"; this.error = "返回的 JSON 对象中不存在 'data' 数组";
}else{ }else{
this.psginfo=this.psginfos[0]; this.psginfo=this.psginfos[0];
let bannerpath=this.cmsroot+this.psginfo.headimage.formats.large.url; let newtitle=this.psginfo.brandname_cn+this.psginfo.projectname_cn+'-开动文化科技(北京)有限公司';
// let bannerpath=this.psginfo.headimage.formats.large.url; document.title=newtitle;
if(bannerpath!=null)
{
console.log('bannerpath:', bannerpath);
document.getElementById('passagebanner').style.backgroundImage = "url('" + bannerpath + "')";
}
} }
} else { } else {
this.error = "返回的 JSON 对象中不存在 'data' 数组"; this.error = "返回的 JSON 对象中不存在 'data' 数组";
@ -123,15 +127,8 @@ export default {
this.fetchpsginfos(); this.fetchpsginfos();
}, },
mounted() { mounted() {
let bannerpath=this.cmsroot+this.psginfo.headimage.formats.large.url; // let newtitle=this.psginfo.brandname_cn+this.psginfo.projectname_cn+'-';
// let bannerpath=this.psginfo.headimage.formats.large.url; // document.title=newtitle;
if(bannerpath!=null)
{
console.log('bannerpath:', bannerpath);
document.getElementById('passagebanner').style.backgroundImage = "url('" + bannerpath + "')";
}
let newtitle=this.psginfo.brandname_cn+this.psginfo.projectname_cn+'-开动文化科技(北京)有限公司';
document.title=newtitle;
} }
} }
</script> </script>
@ -148,16 +145,28 @@ export default {
} }
#wepbar{ #wepbar{
display: flex;
flex-direction: column;
} }
#pcbar{ #pcbar{
@include media-breakpoint-between(xs, md) {
display: flex; display: flex;
flex-direction: row; flex-direction: column;
span{ span{
overflow-wrap: break-word; overflow-wrap: break-word;
color: rgba(255, 255, 255, 1); font-size: 16px;
font-family: DINPro-Light;
font-weight: 300;
text-align: left;
white-space: nowrap;
line-height: 20px;
}
}
@include media-breakpoint-up(md) {
display: flex;
flex-direction: column;
span {
overflow-wrap: break-word;
font-size: 36px; font-size: 36px;
font-family: DINPro-Light; font-family: DINPro-Light;
font-weight: 300; font-weight: 300;
@ -165,6 +174,7 @@ export default {
white-space: nowrap; white-space: nowrap;
line-height: 40px; line-height: 40px;
} }
}
} }
#currentbanner{ #currentbanner{