Browse Source

修改https问题

zengyicheng 2 years ago
parent
commit
38d644693e
1 changed files with 7 additions and 1 deletions
  1. 7 1
      src/components/study.vue

+ 7 - 1
src/components/study.vue

@@ -400,7 +400,7 @@
                           <a
                             style="text-decoration: none; color: #000"
                             target="_Blank"
-                            :href="'https://' + lines.url"
+                            @click="doUrl(lines.url)"
                             >{{ lines.url }}</a
                           >
                         </div>
@@ -3003,6 +3003,12 @@ export default {
       //   this.answerDialogVisible = true;
       // }
     },
+    doUrl(url) {
+      if (url.indexOf("https://") == -1 && url.indexOf("http://") == -1) {
+        url = "https://" + url;
+      }
+      window.open(url);
+    },
     addTools(t, i, index) {
       var a = 0;
       // this.taskCount = index;