diff --git a/src/main.js b/src/main.js index ed7966fa26f05e4cc61c21f4d8a602e98a55f236..d3eee7f71a3a8c9828e43f451c6f1d6c61a09b37 100755 --- a/src/main.js +++ b/src/main.js @@ -59,7 +59,7 @@ Vue.prototype.global = { Vue.prototype.isDarkModel = false; /** * @description: 更改暗黑模式 - * @param {bool} 是否启动暗黑模式 + * @param {bool} 是否启动暗黑模式 * @return {null} */ Vue.prototype.changeDarkModel = function (enabled) { @@ -95,7 +95,10 @@ Vue.prototype.getStaticUrl = function (url) { if (!url) { url = ""; } - url = this.http2https(url.toString()); + const isHttps = 'https:' == document.location.protocol ? true : false; + if (isHttps) { + url = this.http2https(url.toString()); + } if (url.indexOf('http://') == 0 || url.indexOf("https://") == 0) { return url; } else { @@ -204,4 +207,4 @@ Vue.use(vuePhotoPreview, {}); new Vue({ el: '#app', render: c => c(App), -}); \ No newline at end of file +});