Explorar o código

修改https问题

zengyicheng %!s(int64=2) %!d(string=hai) anos
pai
achega
38d644693e
Modificáronse 1 ficheiros con 7 adicións e 1 borrados
  1. 7 1
      src/components/study.vue

+ 7 - 1
src/components/study.vue

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