فهرست منبع

修复bug:没有考虑到g_Prefix为"/"或""的情况

任一存 2 سال پیش
والد
کامیت
fb72e32c9a
1فایلهای تغییر یافته به همراه4 افزوده شده و 4 حذف شده
  1. 4 4
      public/static/js/manage.js

+ 4 - 4
public/static/js/manage.js

@@ -573,8 +573,8 @@ Manage.prototype.weixinShare = function() {
 
 
 Manage.prototype.dealURL = function(src, type) {
-  //music: "///super.4dage.com/data/LYW/edit/20200928_151633415.mp3"
-  //"https://super.4dage.com/data/LYW/edit/20200928_165319399.jpg"]
+  //music: "///super.4dage.com/data/${scene-code}/edit/20200928_151633415.mp3"
+  //thumbnail: "https://super.4dage.com/data/${scene-code}/edit/20200928_165319399.jpg"]
 
 
   if (window.isLocal && settings.localPrefix != void 0) {//本地将线上的前缀替换
@@ -588,9 +588,9 @@ Manage.prototype.dealURL = function(src, type) {
     console.error("没有找到合适的本地链接")
     return src
   } else {
-    //add https://
+    console.log('src in dealURL: ', src)
     var prefix = g_Prefix.replace('https://', '').replace('http://', '')
-    if (!src.includes('http:/') && !src.includes('https:/') && src.includes(prefix)) {
+    if (!src.includes('http:/') && !src.includes('https:/') && (prefix !== '/') && (prefix !== '') && src.includes(prefix)) {
       src = 'https://' + src
     }
     return src