瀏覽代碼

修改https问题

zengyicheng 3 年之前
父節點
當前提交
38d644693e
共有 1 個文件被更改,包括 7 次插入1 次删除
  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;