lvhao 14 小時之前
父節點
當前提交
844cdaf819
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      core/CoreApp/controllers/Goodimglibrary.php

+ 3 - 3
core/CoreApp/controllers/Goodimglibrary.php

@@ -96,9 +96,9 @@ class Goodimglibrary extends Start_Controller {
             foreach($imgs as $k => $v){
                 $type = $this->_checkVideo($v);
                 if($type == "video"){
-                    $str.= '<video controls="true" width="100" src="'.$this->show_url.$v.'" alt="video image" style="margin-right:3px;"></video>';
+                    $str.= '<video controls="true" width="100" src="'.$this->show_url.rawurlencode($v).'" alt="video image" style="margin-right:3px;"></video>';
                 }else{
-                    $str .= '<img width="100px" src="'.$this->show_url.$v.'" alt="image" style="margin-right:3px;">';
+                    $str .= '<img width="100px" src="'.$this->show_url.rawurlencode($v).'" alt="image" style="margin-right:3px;">';
                 }
             }
            
@@ -144,7 +144,7 @@ class Goodimglibrary extends Start_Controller {
                 $imgs = json_decode($images[0]['source_cont'],true);
                 $final_imgs = [];
                 foreach($imgs as $k => $v){
-                    $final_imgs[$k]['url'] = $this->show_url.$v;
+                    $final_imgs[$k]['url'] = $this->show_url.rawurlencode($v);
                     $final_imgs[$k]['type'] = $this->_checkVideo($v);
                 }
                 $goods['images'] = $final_imgs;