feat:更新查看原图图片格式

This commit is contained in:
2026-04-06 17:40:11 +08:00
parent 420f250bac
commit 7eeac7c465
6 changed files with 13 additions and 12 deletions

View File

@@ -57,7 +57,7 @@ import { useAwardStore } from '@/store/award.ts'
import { defineProps, PropType } from 'vue'
import { commonElMessageBox } from 'vue3-common/utils/elUtil'
import { useRouter } from 'vue-router'
import { ThumbImageQuery } from '@/utils'
import { RawImageQuery, ThumbImageQuery } from '@/utils'
import { showImagePreview } from 'vant'
import { IAward } from '@/types/award.ts'
@@ -72,7 +72,8 @@ const props = defineProps({
})
const viewImageClick = () => {
showImagePreview({ images: props.item?.imageList, closeable: true })
const imageList = props.item.imageList.map((item) => `${item}${RawImageQuery}`)
showImagePreview({ images: imageList, closeable: true })
}
const editClick = async () => {

View File

@@ -65,7 +65,7 @@ import { useRouter } from 'vue-router'
import { formatDate } from 'vue3-common/utils/dateUtil'
import { commonElMessageBox } from 'vue3-common/utils/elUtil'
import { showImagePreview } from 'vant'
import { ThumbImageQuery } from '@/utils'
import { RawImageQuery, ThumbImageQuery } from '@/utils'
const router = useRouter()
const foodStore = useFoodStore()
@@ -87,7 +87,7 @@ onMounted(() => {
})
const viewImageClick = () => {
const imageList = props.foodItem?.recordList.map((item) => `${item.imageUrl}`)
const imageList = props.foodItem?.recordList.map((item) => `${item.imageUrl}${RawImageQuery}`)
showImagePreview({ images: imageList, closeable: true })
}

View File

@@ -73,7 +73,7 @@ import { formatDate } from 'vue3-common/utils/dateUtil'
import { useJournalStore } from '@/store/journal.ts'
import { useAppStore } from '@/store/app.ts'
import { useRouter } from 'vue-router'
import { AListUrl, ThumbImageQuery } from '@/utils'
import { AListUrl, RawImageQuery, ThumbImageQuery } from '@/utils'
import { showImagePreview } from 'vant'
const props = defineProps({
@@ -107,7 +107,7 @@ const showToggle = computed(() => overflowLines.value > 0)
const toggleExpand = () => expanded.value = !expanded.value
const viewImageClick = () => {
showImagePreview({ images: [props.item?.imageUrl], closeable: true })
showImagePreview({ images: [props.item?.imageUrl + RawImageQuery], closeable: true })
}
const editClick = async () => {

View File

@@ -24,7 +24,7 @@ export const AListPath = import.meta.env.VITE_API_ALIST_PATH
export const ThumbImageQuery = '?q=70'
export const RawImageQuery = '?w=2560&h=1440&q=90'
export const RawImageQuery = '?w=2560&h=1440&q=70'
/**
* 获取assets静态资源

View File

@@ -26,8 +26,8 @@ const appStore = useAppStore()
const dailyInfo = reactive({
calendarDate: '',
menstruateDateList: [],
sexDateList: [],
menstruateDateList: [] as string[],
sexDateList: [] as string[],
attrs: [] as any[]
})
@@ -105,7 +105,7 @@ const calculatePeriodDay = (date: string, cycleLength = 28, duration = 5) => {
const fertileStart = ovulationDate.subtract(5, 'day') // 易孕期为排卵日前5天
const fertileEnd = ovulationDate.add(4, 'day') // 易孕期为排卵日后4天
const allDates = getAllDatesInMonth(date)
const allDates = getAllDatesInMonth(date) as string[]
for (const dateStr of allDates) {
const currentDate = dayjs(dateStr)

View File

@@ -4,8 +4,8 @@ import path from 'path'
import { createSvgIconsPlugin } from 'vite-plugin-svg-icons'
import { viteMockServe } from 'vite-plugin-mock'
// const API_HOST = '14.103.235.151'
const API_HOST = '127.0.0.1'
const API_HOST = '192.168.1.7'
// const API_HOST = '127.0.0.1'
// https://vitejs.dev/config/
export default defineConfig({