diff --git a/packages/uni-cli-shared/src/utils.ts b/packages/uni-cli-shared/src/utils.ts index dfc7b333ff259bcb593644a3f63db5be395d6f6a..c19b0fa49108829557eaeb12abaae90e3d1742b9 100644 --- a/packages/uni-cli-shared/src/utils.ts +++ b/packages/uni-cli-shared/src/utils.ts @@ -255,8 +255,11 @@ function createIdent() { } export function createShadowImageUrl(cdn: number, type: string = 'grey') { - const ident = createIdent() - const identStr = ident ? `${ident}/` : '' + let identStr = '' + if (process.env.UNI_PLATFORM !== 'h5' && process.env.UNI_PLATFORM !== 'web') { + const ident = createIdent() + identStr = ident ? `${ident}/` : '' + } return `https://cdn${ (cdn || 0) + (process.env.UNI_APP_X === 'true' ? 1000 : 0) || '' }.dcloud.net.cn/${identStr}img/shadow-${type}.png`