imageBase.js 622 Bytes
/**
 * @file 图片路径工具 — CDN(IMG_URL)与本地 components/images/ 分离;仅拼 URL,不 setData。
 */
import { ImgUrl } from '../config.js'

/** CDN 资源前缀,末尾带 `/` */
export const IMG_URL = `${ImgUrl}/`

/**
 * components/images/ 下本地静态图(打进小程序包体,非 CDN)
 * @param {string} name 文件名
 * @returns {string} 如 /components/images/close.png
 */
export const componentsImageUrl = name => `/components/images/${name}`

/** 全局关闭图标 — 本地包内;CDN images/close.png 未上传 */
export const CLOSE_ICON_URL = componentsImageUrl('close.png')