diff --git a/components-diy/diy-video.vue b/components-diy/diy-video.vue
index 46743c7..ecb8f61 100644
--- a/components-diy/diy-video.vue
+++ b/components-diy/diy-video.vue
@@ -1,8 +1,32 @@
-
+
+
+
+
+
+
+
+
+
@@ -38,6 +62,17 @@ export default {
}
},
methods: {
+ // 获取视频URL,根据格式决定是否使用$util.img()处理
+ getVideoUrl() {
+ if (!this.value || !this.value.videoUrl) return '';
+ const videoUrl = this.value.videoUrl;
+ // 如果是完整的http/https链接,直接使用
+ if (videoUrl.indexOf('http://') === 0 || videoUrl.indexOf('https://') === 0) {
+ return videoUrl;
+ }
+ // 否则使用$util.img()处理
+ return this.$util.img(videoUrl);
+ },
async handlerClick(videoUrl) {
await this.__$emitEvent({
eventName: 'video-tap', data: videoUrl, promiseCallback: (event, handler, awaitedResult) => {
@@ -52,20 +87,47 @@ export default {
\ No newline at end of file