diff --git a/public/static/video/2.mp4 b/public/static/video/2.mp4 index a757ad2..5245b4e 100644 Binary files a/public/static/video/2.mp4 and b/public/static/video/2.mp4 differ diff --git a/public/static/video/display.mp4 b/public/static/video/display.mp4 index 3716b1a..589f1ab 100644 Binary files a/public/static/video/display.mp4 and b/public/static/video/display.mp4 differ diff --git a/src/components/swiper/index.vue b/src/components/swiper/index.vue index 09190a3..96e5baf 100644 --- a/src/components/swiper/index.vue +++ b/src/components/swiper/index.vue @@ -31,6 +31,7 @@ let autoPlayTimer = null const itemWidth = computed(() => $fontSize(props.sourceWidth)) const itemHeight = computed(() => $fontSize(props.sourceHeight)) const itemGap = computed(() => $fontSize(props.sourceGap)) + const itemTotalWidth = computed(() => itemWidth.value + itemGap.value) const viewPortWidth = computed(() => props.pageSize * itemWidth.value + (props.pageSize - 1) * itemGap.value + 'px') const trackWidth = computed(() => props.data.length * itemTotalWidth.value - itemGap.value + 'px') diff --git a/src/utils/rem.js b/src/utils/rem.js index dd074aa..8d54d31 100644 --- a/src/utils/rem.js +++ b/src/utils/rem.js @@ -11,16 +11,12 @@ function setRem() { // 当前页面宽度相对于设计稿宽度的缩放比例 const scale = document.documentElement.clientWidth / designWidth // 设置页面根节点字体大小(最高放大比例为maxScale) - document.documentElement.style.fontSize = - baseSize * Math.min(scale, maxScale) + 'px' + document.documentElement.style.fontSize = baseSize * Math.min(scale, maxScale) + 'px' } // 根据设计稿尺寸计算实际尺寸 export function fontSize(res) { - const clientWidth = - window.innerWidth || - document.documentElement.clientWidth || - document.body.clientWidth + const clientWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth if (!clientWidth) return res const scale = clientWidth / designWidth return res * Math.min(scale, maxScale) diff --git a/src/views/about/index.vue b/src/views/about/index.vue index 25ee8cf..50cfd3a 100644 --- a/src/views/about/index.vue +++ b/src/views/about/index.vue @@ -29,37 +29,19 @@ const imgList = [ id: 2, width: 210, height: 300, - list: [ - 'main/5.png', - 'main/6.png', - 'main/7.png', - 'main/8.png', - 'main/9.png', - ], + list: ['main/5.png', 'main/6.png', 'main/7.png', 'main/8.png', 'main/9.png'], }, { id: 3, width: 210, height: 300, - list: [ - 'main/10.png', - 'main/11.png', - 'main/12.png', - 'main/13.png', - 'main/14.png', - ], + list: ['main/10.png', 'main/11.png', 'main/12.png', 'main/13.png', 'main/14.png'], }, { id: 4, width: 210, height: 300, - list: [ - 'main/15.png', - 'main/16.png', - 'main/17.png', - 'main/18.png', - 'main/19.png', - ], + list: ['main/15.png', 'main/16.png', 'main/17.png', 'main/18.png', 'main/19.png'], }, { id: 5, @@ -135,9 +117,13 @@ onMounted(() => {}) .my-card { width: 100%; height: 100%; + img { + width: 40%; + height: auto; + } .label { text-align: left; - width: 532px; + width: 40%; padding-right: 25px; font-family: 'PingFang SC'; font-weight: 400; diff --git a/src/views/news/detail.vue b/src/views/news/detail.vue index e7a1e72..bf9cd11 100644 --- a/src/views/news/detail.vue +++ b/src/views/news/detail.vue @@ -8,21 +8,29 @@ import {ElMessage} from 'element-plus' const route = useRoute() const detail = route.query const showLoad = ref(true) + const newsTitle = ref('') +const newsTime = ref('') const newsSubTitle = ref('') const newsCoverImg = ref('') -const newsContent = ref('') +const newsContent = ref(null) + +const router = useRouter() + +onMounted(() => { + getDetail() +}) const getDetail = () => { - showLoad.value = true let query = { slug: detail.slug, } getNewsDetail(query) .then((res) => { if (res.code === 0) { - let {content, cover_image, snapshot, title} = res.data + let {content, cover_image, snapshot, datetime, title} = res.data newsTitle.value = title + newsTime.value = datetime newsSubTitle.value = snapshot newsCoverImg.value = cover_image newsContent.value = content @@ -37,11 +45,6 @@ const getDetail = () => { }) } -const router = useRouter() -onMounted(() => { - getDetail() -}) - const toBack = () => { router.back() } @@ -53,63 +56,52 @@ const toBack = () => {

{{ newsTitle }}

-

- {{ newsSubTitle }} +

+ {{ newsTime }}

-
- -
-
- {{ newsContent }} +
+
-
暂无内容
+
暂无内容
返回
diff --git a/src/views/news/index.vue b/src/views/news/index.vue index 8345668..0391fe0 100644 --- a/src/views/news/index.vue +++ b/src/views/news/index.vue @@ -1,16 +1,23 @@ @@ -93,24 +102,27 @@ onBeforeRouteLeave((to) => { > @@ -177,5 +189,10 @@ onBeforeRouteLeave((to) => { color: #999999; } } + + .no-content { + margin-top: 40px; + font-size: 24px; + } } diff --git a/src/views/product/detail.vue b/src/views/product/detail.vue index 6f722c2..25eee33 100644 --- a/src/views/product/detail.vue +++ b/src/views/product/detail.vue @@ -46,7 +46,7 @@ const toBack = () => {