Files
t-admin/unpackage/dist/dev/mp-weixin/uni_modules/uni-media-library/common/crop.js
T
2025-06-13 21:16:12 +08:00

15 lines
473 B
JavaScript

"use strict";
function generateCoverURL(url, cropRule) {
if (!url || !cropRule)
return url;
const parsedUrl = new URL(url);
if (parsedUrl.pathname.endsWith(".webp")) {
return url;
}
const isQuery = parsedUrl.search.length > 0;
const separator = isQuery ? "&" : "?";
return url + separator + cropRule;
}
exports.generateCoverURL = generateCoverURL;
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/uni_modules/uni-media-library/common/crop.js.map