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 return sceneMap[scene] || scene
} }
export const getThumbUrl = (url) => { export const getThumbUrl = (url, w = 200, h = 200) => {
return `${url}?imageView2/1/w/340/h/600/q/80` 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"> <el-table-column align="center" label="图片" width="200">
<template #default="{ row }"> <template #default="{ row }">
<div v-if="row.images && row.images.length" class="image-grid"> <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> </div>
<span v-else>--</span> <span v-else>--</span>
</template> </template>
@@ -41,7 +47,7 @@
<el-table-column align="left" label="用户信息" show-overflow-tooltip> <el-table-column align="left" label="用户信息" show-overflow-tooltip>
<template #default="{ row }"> <template #default="{ row }">
<div v-if="row.fromUser && row.fromUser.id" class="author-cell"> <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 class="author-meta">
<div> <div>
<strong>id</strong> <strong>id</strong>
@@ -96,6 +102,7 @@
<script> <script>
import { getUserFeedbackList } from '@/api/spring/user' import { getUserFeedbackList } from '@/api/spring/user'
import { formatTime } from '@/utils' import { formatTime } from '@/utils'
import { getThumbUrl } from '@/utils/blessing'
export default { export default {
name: 'UserFeedback', name: 'UserFeedback',
@@ -118,6 +125,7 @@
}, },
methods: { methods: {
formatTime, formatTime,
getThumbUrl,
handleSizeChange(val) { handleSizeChange(val) {
this.queryForm.pageSize = val this.queryForm.pageSize = val
this.fetchData() this.fetchData()

View File

@@ -29,7 +29,12 @@
<el-table-column align="center" label="保存内容" width="100"> <el-table-column align="center" label="保存内容" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tooltip class="item" :content="scope.row.id" effect="dark" placement="top"> <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> </el-tooltip>
</template> </template>
</el-table-column> </el-table-column>
@@ -69,7 +74,7 @@
<el-table-column align="left" label="作者信息" show-overflow-tooltip> <el-table-column align="left" label="作者信息" show-overflow-tooltip>
<template #default="{ row }"> <template #default="{ row }">
<div class="author-cell"> <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 class="author-meta">
<div> <div>
<strong>id</strong> <strong>id</strong>
@@ -110,7 +115,7 @@
<script> <script>
import { getSaveList } from '@/api/spring/user' import { getSaveList } from '@/api/spring/user'
import { formatTime } from '@/utils' import { formatTime } from '@/utils'
import { getSceneName } from '@/utils/blessing' import { getSceneName, getThumbUrl } from '@/utils/blessing'
export default { export default {
name: 'SaveRecord', name: 'SaveRecord',
@@ -142,6 +147,7 @@
methods: { methods: {
formatTime, formatTime,
getSceneName, getSceneName,
getThumbUrl,
setSelectRows(val) { setSelectRows(val) {
this.selectRows = val this.selectRows = val
}, },

View File

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

View File

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