Commit a5450c13150f2c6dbcc6536063ee2bc2b539cfd6

Authored by u123231312
1 parent f9e1cedc

no message

@@ -15,7 +15,10 @@ class Template extends Common{ @@ -15,7 +15,10 @@ class Template extends Common{
15 } 15 }
16 16
17 public function index(){ 17 public function index(){
18 - //$path = $this->publicpath.'images/'.input('folder').'/'; ///Applications/XAMPP/xamppfiles/htdocs/dashboard/images/ 18 + //$path = $this->publicpath.'images/'.input('folder').'/';
  19 + //
  20 + //测试环境 /Applications/XAMPP/xamppfiles/htdocs/dashboard/images/
  21 + //线上环境 /alidata/www/dc-api/public/tables/batchPicsyn/
19 22
20 $path = "/alidata/www/dc-api/public/tables/batchPicsyn/"; 23 $path = "/alidata/www/dc-api/public/tables/batchPicsyn/";
21 24
@@ -64,8 +67,9 @@ class Template extends Common{ @@ -64,8 +67,9 @@ class Template extends Common{
64 67
65 //新建zip压缩包 68 //新建zip压缩包
66 $obj = $zip->open($filename,\ZIPARCHIVE::OVERWRITE | \ZIPARCHIVE::CREATE); 69 $obj = $zip->open($filename,\ZIPARCHIVE::OVERWRITE | \ZIPARCHIVE::CREATE);
  70 + $newfile = trim(strrchr($file, '/'),'/');
67 //把图片一张一张加进去压缩 71 //把图片一张一张加进去压缩
68 - $zip->addFile($file); 72 + $zip->addFile($file,'/download/'.$newfile);
69 //打包zip 73 //打包zip
70 $rs = $zip->close(); 74 $rs = $zip->close();
71 }else{ 75 }else{
@@ -78,7 +82,8 @@ class Template extends Common{ @@ -78,7 +82,8 @@ class Template extends Common{
78 //把图片一张一张加进去压缩 82 //把图片一张一张加进去压缩
79 $files = glob($file.'/*'); 83 $files = glob($file.'/*');
80 foreach($files as $key=>$val){ 84 foreach($files as $key=>$val){
81 - $zip->addFile($val); 85 + $newfile = trim(strrchr($val, '/'),'/');
  86 + $zip->addFile($val,'/download/'.$newfile);
82 } 87 }
83 88
84 //打包zip 89 //打包zip
@@ -47,7 +47,7 @@ @@ -47,7 +47,7 @@
47 {if condition="!empty($vo['ico'])"} 47 {if condition="!empty($vo['ico'])"}
48 <img src="/static/home/images/ext/{$vo['ext']}.png"> 48 <img src="/static/home/images/ext/{$vo['ext']}.png">
49 {else /} 49 {else /}
50 - <img src="/static/home/images/{:input('folder')}{$vo.filename}" > 50 + <img src="https://xt04.colorcun.com/tables/batchPicsyn/{:input('folder')}{$vo.filename}" >
51 {/if} 51 {/if}
52 </a> 52 </a>
53 </span> 53 </span>