dever 6 年之前
父节点
当前提交
9bcb55efec
共有 1 个文件被更改,包括 10 次插入0 次删除
  1. 10 0
      main/src/View.php

+ 10 - 0
main/src/View.php

@@ -15,6 +15,16 @@ class View extends Core
         $version['source_type'] = $source_type;
         $version['source_type'] = $source_type;
         $this->data['version'] = Dever::db('main/version')->getOne($version);
         $this->data['version'] = Dever::db('main/version')->getOne($version);
 
 
+        if ($this->data['version']) {
+            if (isset($this->data['version']['link'])) {
+                $this->data['version']['link'] = str_replace('http://', 'https://', $this->data['version']['link']);
+            }
+
+            if (isset($this->data['version']['file'])) {
+                $this->data['version']['file'] = str_replace('http://', 'https://', $this->data['version']['file']);
+            }
+        }
+
         return $this->data;
         return $this->data;
     }
     }
     # 获取评论列表
     # 获取评论列表