feat: v3版疗休养优化4
This commit is contained in:
@@ -40,3 +40,14 @@ window.therapyPreview = function(value) {
|
||||
return /^(https?:|data:|blob:|\/)/.test(value) ? value :
|
||||
'/platform/inclusiveTherapyV3/common/preview?id=' + encodeURIComponent(value);
|
||||
};
|
||||
|
||||
if (window.vant) {
|
||||
window.preview = function(filename, id) {
|
||||
const address = therapyPreview(id);
|
||||
if (/\.(jpe?g|png|gif|bmp|webp|svg)$/i.test(filename || '')) {
|
||||
vant.ImagePreview([address]);
|
||||
} else {
|
||||
window.open(address);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user