fix: youhua

This commit is contained in:
zzc
2026-02-05 16:06:31 +08:00
parent 1867d5aa55
commit 61bf50afc7
5 changed files with 34 additions and 11 deletions

View File

@@ -20,6 +20,7 @@ export function getSceneName(scene) {
return sceneMap[scene] || scene
}
export const getThumbUrl = (url) => {
return `${url}?imageView2/1/w/340/h/600/q/80`
export const getThumbUrl = (url, w = 200, h = 200) => {
if (!url) return ''
return `${url}?imageView2/1/w/${w}/h/${h}/q/80`
}

View File

@@ -32,7 +32,13 @@
<el-table-column align="center" label="图片" width="200">
<template #default="{ row }">
<div v-if="row.images && row.images.length" class="image-grid">
<el-image v-for="(img, index) in row.images" :key="index" class="grid-image" :preview-src-list="row.images" :src="img" />
<el-image
v-for="(img, index) in row.images"
:key="index"
class="grid-image"
:preview-src-list="row.images"
:src="getThumbUrl(img)"
/>
</div>
<span v-else>--</span>
</template>
@@ -41,7 +47,7 @@
<el-table-column align="left" label="用户信息" show-overflow-tooltip>
<template #default="{ row }">
<div v-if="row.fromUser && row.fromUser.id" class="author-cell">
<img alt="avatar" class="author-avatar" :src="row.fromUser.avatar" />
<img alt="avatar" class="author-avatar" :src="getThumbUrl(row.fromUser.avatar)" />
<div class="author-meta">
<div>
<strong>id</strong>
@@ -96,6 +102,7 @@
<script>
import { getUserFeedbackList } from '@/api/spring/user'
import { formatTime } from '@/utils'
import { getThumbUrl } from '@/utils/blessing'
export default {
name: 'UserFeedback',
@@ -118,6 +125,7 @@
},
methods: {
formatTime,
getThumbUrl,
handleSizeChange(val) {
this.queryForm.pageSize = val
this.fetchData()

View File

@@ -29,7 +29,12 @@
<el-table-column align="center" label="保存内容" width="100">
<template slot-scope="scope">
<el-tooltip class="item" :content="scope.row.id" effect="dark" placement="top">
<el-image fit="cover" :preview-src-list="[scope.row.imageUrl]" :src="scope.row.imageUrl" style="width: 50px; height: 50px" />
<el-image
fit="cover"
:preview-src-list="[scope.row.imageUrl]"
:src="getThumbUrl(scope.row.imageUrl)"
style="width: 50px; height: 50px"
/>
</el-tooltip>
</template>
</el-table-column>
@@ -69,7 +74,7 @@
<el-table-column align="left" label="作者信息" show-overflow-tooltip>
<template #default="{ row }">
<div class="author-cell">
<img alt="avatar" class="author-avatar" :src="row?.fromUser?.avatar" />
<img alt="avatar" class="author-avatar" :src="getThumbUrl(row?.fromUser?.avatar)" />
<div class="author-meta">
<div>
<strong>id</strong>
@@ -110,7 +115,7 @@
<script>
import { getSaveList } from '@/api/spring/user'
import { formatTime } from '@/utils'
import { getSceneName } from '@/utils/blessing'
import { getSceneName, getThumbUrl } from '@/utils/blessing'
export default {
name: 'SaveRecord',
@@ -142,6 +147,7 @@
methods: {
formatTime,
getSceneName,
getThumbUrl,
setSelectRows(val) {
this.selectRows = val
},

View File

@@ -32,7 +32,7 @@
<el-image
fit="cover"
:preview-src-list="[scope.row?.detail?.imageUrl]"
:src="scope.row?.detail?.imageUrl"
:src="getThumbUrl(scope.row?.detail?.imageUrl)"
style="width: 50px; height: 50px"
/>
</el-tooltip>
@@ -74,7 +74,7 @@
<el-table-column align="left" label="作者信息" show-overflow-tooltip>
<template #default="{ row }">
<div class="author-cell">
<img alt="avatar" class="author-avatar" :src="row?.fromUser?.avatar" />
<img alt="avatar" class="author-avatar" :src="getThumbUrl(row?.fromUser?.avatar)" />
<div class="author-meta">
<div>
<strong>id</strong>
@@ -115,7 +115,7 @@
<script>
import { getShareList } from '@/api/spring/user'
import { formatTime } from '@/utils'
import { getSceneName } from '@/utils/blessing'
import { getSceneName, getThumbUrl } from '@/utils/blessing'
export default {
name: 'GenerateRecord',
@@ -147,6 +147,7 @@
methods: {
formatTime,
getSceneName,
getThumbUrl,
setSelectRows(val) {
this.selectRows = val
},

View File

@@ -31,7 +31,12 @@
<el-table-column align="center" label="壁纸" width="100">
<template slot-scope="scope">
<el-tooltip class="item" :content="scope.row.id" effect="dark" placement="top">
<el-image fit="cover" :preview-src-list="[scope.row.imageUrl]" :src="scope.row.imageUrl" style="width: 50px; height: 50px" />
<el-image
fit="cover"
:preview-src-list="[scope.row.imageUrl]"
:src="getThumbUrl(scope.row.imageUrl)"
style="width: 50px; height: 50px"
/>
</el-tooltip>
</template>
</el-table-column>
@@ -70,6 +75,7 @@
<script>
import { doDelete, getList, toggleEnable, doMoveUp, doMoveDown, doAdd } from '@/api/spring/wallpaper/system'
import { getAllList } from '@/api/spring/wallpaper/type'
import { getThumbUrl } from '@/utils/blessing'
import Edit from './components/AppManagementEdit'
import BatchImageAdd from '@/components/BatchImageAdd'
@@ -79,6 +85,7 @@
data() {
return {
doAdd,
getThumbUrl,
typeList: [],
typeFilters: [],
list: null,