hookehuyr

fix web端判断封面图片高度

......@@ -10,8 +10,9 @@
<van-image
v-if="PHeader.type === '单张图'"
width="100%"
height="200"
:height="PHeaderHeight"
:src="PHeader.cover"
fit="cover"
/>
<template v-if="PHeader.type === '轮播图'">
<van-swipe class="my-swipe" lazy-render indicator-color="white">
......@@ -50,7 +51,16 @@ import { useRoute } from "vue-router";
import { queryFormAPI } from "@/api/form.js";
import { addFormDataAPI } from "@/api/data.js";
import { showSuccessToast, showFailToast } from "vant";
import { wxInfo } from "@/utils/tools";
// web端判断封面图片高度
const is_pc = computed(() => wxInfo().isPC);
const PHeaderHeight = computed(() => {
if (is_pc.value) {
return "35vh";
} else {
return "20vh";
}
});
// TAG: 自定义主题颜色
const themeVars = {
buttonPrimaryBackground: "#c2915f",
......