wesmiler hace 6 años
padre
commit
a2ab101778
Se han modificado 2 ficheros con 14 adiciones y 0 borrados
  1. 14 0
      vendor/thinkcmf/cmf-app/src/weixin/model/Devices.php
  2. 0 0
      测试.txt

+ 14 - 0
vendor/thinkcmf/cmf-app/src/weixin/model/Devices.php

@@ -130,6 +130,19 @@ class Devices extends Model
             return ['code' => 'error', 'message' => lang(3012)];
         }
 
+
+        // 页码范围
+        $pageRange = [];
+        $pageStart = isset($file['page_start'])? intval($file['page_start']) : 1;
+        $pageStart = $pageStart? $pageStart : 1;
+        $pageEnd = isset($file['page_end'])? intval($file['page_end']) : 1;
+        $pageEnd = $pageEnd? $pageEnd : 1;
+        for($i=$pageStart; $i<=$pageEnd; $i++){
+            $pageRange[] = $i;
+        }
+
+        $pageRange = $pageRange? implode(',', $pageRange) : 'all';
+
         // 单双面
         $pageType = isset($file['page_type'])? intval($file['page_type']) : 0;
         $pageType = $pageType == 2? 'Horizontal' : 'Simplex';
@@ -170,6 +183,7 @@ class Devices extends Model
             "trueColor" => $printType,//是否彩色打印,取值:True或False
             "Duplex" => $pageType,// 参数,取值有:Simplex-单面,Vertical-双面长装订,Horizontal-双面短装订
             "Copies" => $nums,//打印份数,取值:1~100
+            "printRange" => $pageRange,//打印页码范围:1,2,3,4,5,6
             "Landscape" => "False",//打印内容是否旋转90度,取值:True或False
             "Scaling" => "True",//打印内容是否自适应纸张大小,取值:True或False
             "tasktype" => "now",//打印任务类型,可选定是立即打印还是定时打印,取值:now或plan

+ 0 - 0
测试.txt