lrf402788946 4 years ago
parent
commit
092ca6ffcb
1 changed files with 8 additions and 1 deletions
  1. 8 1
      src/views/user/trainVidoe/detail.vue

+ 8 - 1
src/views/user/trainVidoe/detail.vue

@@ -14,6 +14,7 @@
           <p>
             主讲教师:<span>{{ trainVidoeInfo.teacher }}</span>
           </p>
+          <el-link :underline="false" @click="toDownload">点击下载</el-link>
         </el-col>
       </el-col>
     </el-row>
@@ -32,7 +33,13 @@ export default {
     return {};
   },
   created() {},
-  methods: {},
+  methods: {
+    toDownload() {
+      let duplicate = _.cloneDeep(this.trainVidoeInfo);
+      const { url } = duplicate;
+      if (url) window.open(url);
+    },
+  },
 
   computed: {
     ...mapState(['user']),