zhongshujie
2025-08-08 401ed176c9f1bdd97ccdf827d9454b11a3891f79
src/assets/js/middleGround/tool.js
@@ -1,5 +1,5 @@
import { requestCtx, appId } from '@/assets/js/config'
import bookCover from '@/assets/images/default/red-book.png'
// import bookCover from '@/assets/images/default/red-book.png'
import moment from 'moment'
// 处理列表查询结果
export function handleQueryResourceListData({
@@ -397,22 +397,22 @@
// 获取不受保护的图片
export function getPublicImage(md5, width, height, storeInfo) {
  let src = null
  if (md5) {
    src = requestCtx + `/file/GetPreViewImage?md5=${md5}`
  } else {
    if (storeInfo == 'jsek_bookFair') {
      // return defaultBookFair;
      return
    } else if (storeInfo == `defaultGoodsStore${appId}`) {
      return bookCover
    } else if (storeInfo == `defaultPublicStore${appId}`) {
      return bookCover
    } else {
      return ''
    }
  }
  if (width) src += `&width=${width}`
  if (height) src += `&height=${height}`
  return src
  // let src = null
  // if (md5) {
  //   src = requestCtx + `/file/GetPreViewImage?md5=${md5}`
  // } else {
  //   if (storeInfo == 'jsek_bookFair') {
  //     // return defaultBookFair;
  //     return
  //   } else if (storeInfo == `defaultGoodsStore${appId}`) {
  //     return bookCover
  //   } else if (storeInfo == `defaultPublicStore${appId}`) {
  //     return bookCover
  //   } else {
  //     return ''
  //   }
  // }
  // if (width) src += `&width=${width}`
  // if (height) src += `&height=${height}`
  // return src
}