瀏覽代碼

技术资料附件接口优化

曹鹤洋 1 年之前
父節點
當前提交
a48544b4d2
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1 2
      application/api/controller/WorkOrder.php

+ 1 - 2
application/api/controller/WorkOrder.php

@@ -1690,12 +1690,11 @@ class WorkOrder extends Api
     {
         $fileName = '黄金叶(软大金圆)(二维码版)';
     $filePath = 'uploads/黄金叶(软大金圆)(二维码版).xlsx'; // Excel文件路径
-    $fileContent = file_get_contents($filePath);
 
     $protocol = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? 'https' : 'http';
         $host = $_SERVER['HTTP_HOST'];
         $siteUrl = $protocol . '://' . $host .'/'.$filePath ;
-    $this->success('成功',['fileName'=>$fileName,'fileContent'=>$fileContent]);
+    $this->success('成功',['fileName'=>$fileName,'filePath'=>$siteUrl]);
     $excelData = []; // 存储 Excel 数据的数组
 
     $reader = IOFactory::createReader('Xlsx'); // 创建Excel读取器