<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                1、下載他的基類、并添加上命名空間、改一下類名和文件名 ![](https://img.kancloud.cn/7f/b3/7fb3b8d0f36a992a6e4794c1ec342cc9_567x487.png) 下面封裝的方法有打印小票、添加打印機、刪除打印機 ``` <?php namespace feieyun; class HttpClient { // Request vars var $host; var $port; var $path; var $method; var $postdata = ''; var $cookies = array(); var $referer; var $accept = 'text/xml,application/xml,application/xhtml+xml,text/html,text/plain,image/png,image/jpeg,image/gif,*/*'; var $accept_encoding = 'gzip'; var $accept_language = 'en-us'; var $user_agent = 'Incutio HttpClient v0.9'; var $timeout = 20; var $use_gzip = true; var $persist_cookies = true; var $persist_referers = true; var $debug = false; var $handle_redirects = true; var $max_redirects = 5; var $headers_only = false; var $username; var $password; var $status; var $headers = array(); var $content = ''; var $errormsg; var $redirect_count = 0; var $cookie_host = ''; function __construct($host, $port=80) { $this->host = $host; $this->port = $port; } function get($path, $data = false) { $this->path = $path; $this->method = 'GET'; if ($data) { $this->path .= '?'.$this->buildQueryString($data); } return $this->doRequest(); } function post($path, $data) { $this->path = $path; $this->method = 'POST'; $this->postdata = $this->buildQueryString($data); return $this->doRequest(); } function buildQueryString($data) { $querystring = ''; if (is_array($data)) { foreach ($data as $key => $val) { if (is_array($val)) { foreach ($val as $val2) { $querystring .= urlencode($key).'='.urlencode($val2).'&'; } } else { $querystring .= urlencode($key).'='.urlencode($val).'&'; } } $querystring = substr($querystring, 0, -1); // Eliminate unnecessary & } else { $querystring = $data; } return $querystring; } function doRequest() { if (!$fp = @fsockopen($this->host, $this->port, $errno, $errstr, $this->timeout)) { switch($errno) { case -3: $this->errormsg = 'Socket creation failed (-3)'; case -4: $this->errormsg = 'DNS lookup failure (-4)'; case -5: $this->errormsg = 'Connection refused or timed out (-5)'; default: $this->errormsg = 'Connection failed ('.$errno.')'; $this->errormsg .= ' '.$errstr; $this->debug($this->errormsg); } return false; } socket_set_timeout($fp, $this->timeout); $request = $this->buildRequest(); $this->debug('Request', $request); fwrite($fp, $request); $this->headers = array(); $this->content = ''; $this->errormsg = ''; $inHeaders = true; $atStart = true; while (!feof($fp)) { $line = fgets($fp, 4096); if ($atStart) { $atStart = false; if (!preg_match('/HTTP\/(\\d\\.\\d)\\s*(\\d+)\\s*(.*)/', $line, $m)) { $this->errormsg = "Status code line invalid: ".htmlentities($line); $this->debug($this->errormsg); return false; } $http_version = $m[1]; $this->status = $m[2]; $status_string = $m[3]; $this->debug(trim($line)); continue; } if ($inHeaders) { if (trim($line) == '') { $inHeaders = false; $this->debug('Received Headers', $this->headers); if ($this->headers_only) { break; } continue; } if (!preg_match('/([^:]+):\\s*(.*)/', $line, $m)) { continue; } $key = strtolower(trim($m[1])); $val = trim($m[2]); if (isset($this->headers[$key])) { if (is_array($this->headers[$key])) { $this->headers[$key][] = $val; } else { $this->headers[$key] = array($this->headers[$key], $val); } } else { $this->headers[$key] = $val; } continue; } $this->content .= $line; } fclose($fp); if (isset($this->headers['content-encoding']) && $this->headers['content-encoding'] == 'gzip') { $this->debug('Content is gzip encoded, unzipping it'); $this->content = substr($this->content, 10); $this->content = gzinflate($this->content); } if ($this->persist_cookies && isset($this->headers['set-cookie']) && $this->host == $this->cookie_host) { $cookies = $this->headers['set-cookie']; if (!is_array($cookies)) { $cookies = array($cookies); } foreach ($cookies as $cookie) { if (preg_match('/([^=]+)=([^;]+);/', $cookie, $m)) { $this->cookies[$m[1]] = $m[2]; } } $this->cookie_host = $this->host; } if ($this->persist_referers) { $this->debug('Persisting referer: '.$this->getRequestURL()); $this->referer = $this->getRequestURL(); } if ($this->handle_redirects) { if (++$this->redirect_count >= $this->max_redirects) { $this->errormsg = 'Number of redirects exceeded maximum ('.$this->max_redirects.')'; $this->debug($this->errormsg); $this->redirect_count = 0; return false; } $location = isset($this->headers['location']) ? $this->headers['location'] : ''; $uri = isset($this->headers['uri']) ? $this->headers['uri'] : ''; if ($location || $uri) { $url = parse_url($location.$uri); return $this->get($url['path']); } } return true; } function buildRequest() { $headers = array(); $headers[] = "{$this->method} {$this->path} HTTP/1.0"; $headers[] = "Host: {$this->host}"; $headers[] = "User-Agent: {$this->user_agent}"; $headers[] = "Accept: {$this->accept}"; if ($this->use_gzip) { $headers[] = "Accept-encoding: {$this->accept_encoding}"; } $headers[] = "Accept-language: {$this->accept_language}"; if ($this->referer) { $headers[] = "Referer: {$this->referer}"; } if ($this->cookies) { $cookie = 'Cookie: '; foreach ($this->cookies as $key => $value) { $cookie .= "$key=$value; "; } $headers[] = $cookie; } if ($this->username && $this->password) { $headers[] = 'Authorization: BASIC '.base64_encode($this->username.':'.$this->password); } if ($this->postdata) { $headers[] = 'Content-Type: application/x-www-form-urlencoded'; $headers[] = 'Content-Length: '.strlen($this->postdata); } $request = implode("\r\n", $headers)."\r\n\r\n".$this->postdata; return $request; } function getStatus() { return $this->status; } function getContent() { return $this->content; } function getHeaders() { return $this->headers; } function getHeader($header) { $header = strtolower($header); if (isset($this->headers[$header])) { return $this->headers[$header]; } else { return false; } } function getError() { return $this->errormsg; } function getCookies() { return $this->cookies; } function getRequestURL() { $url = 'https://'.$this->host; if ($this->port != 80) { $url .= ':'.$this->port; } $url .= $this->path; return $url; } function setUserAgent($string) { $this->user_agent = $string; } function setAuthorization($username, $password) { $this->username = $username; $this->password = $password; } function setCookies($array) { $this->cookies = $array; } function useGzip($boolean) { $this->use_gzip = $boolean; } function setPersistCookies($boolean) { $this->persist_cookies = $boolean; } function setPersistReferers($boolean) { $this->persist_referers = $boolean; } function setHandleRedirects($boolean) { $this->handle_redirects = $boolean; } function setMaxRedirects($num) { $this->max_redirects = $num; } function setHeadersOnly($boolean) { $this->headers_only = $boolean; } function setDebug($boolean) { $this->debug = $boolean; } function quickGet($url) { $bits = parse_url($url); $host = $bits['host']; $port = isset($bits['port']) ? $bits['port'] : 80; $path = isset($bits['path']) ? $bits['path'] : '/'; if (isset($bits['query'])) { $path .= '?'.$bits['query']; } $client = new HttpClient($host, $port); if (!$client->get($path)) { return false; } else { return $client->getContent(); } } function quickPost($url, $data) { $bits = parse_url($url); $host = $bits['host']; $port = isset($bits['port']) ? $bits['port'] : 80; $path = isset($bits['path']) ? $bits['path'] : '/'; $client = new HttpClient($host, $port); if (!$client->post($path, $data)) { return false; } else { return $client->getContent(); } } function debug($msg, $object = false) { if ($this->debug) { print '<div style="border: 1px solid red; padding: 0.5em; margin: 0.5em;"><strong>HttpClient Debug:</strong> '.$msg; if ($object) { ob_start(); print_r($object); $content = htmlentities(ob_get_contents()); ob_end_clean(); print '<pre>'.$content.'</pre>'; } print '</div>'; } } } ?> ``` 2、建立一個接口使用類, ``` <?php namespace feieyun; use feieyun\HttpClient; class Feieyun { protected $USER='2547895205@qq.com';//*必填*:飛鵝云后臺注冊賬號 protected $UKEY='m4XcfzbLwRpZXL3Z';//*必填*: 飛鵝云后臺注冊賬號后生成的UKEY 【備注:這不是填打印機的KEY】 protected $SN; //*必填*:打印機編號,必須要在管理后臺里添加打印機或調用API接口添加之后,才能調用API //以下參數不需要修改 protected $IP='api.feieyun.cn';//接口IP或域名 protected $PORT=80;//接口IP端口 protected $PATH='/Api/Open/';//接口IP或域名 public function __construct($SN="",$USER = '',$UKEY='') { if(!empty($SN)){ $this->SN = $SN; } if(!empty($USER)){ $this->USER = $USER; } if(!empty($USER)){ $this->UKEY = $UKEY; } } public function batchDel($snlistData){ $snlist=""; $snlistDataCount=count($snlistData); $i=0; foreach ($snlistData as $key => $value) { $i++; if($i>=$snlistDataCount){ $snlist .= "{$value}"; }else{ $snlist .= "{$value}-"; } } // var_dump($printerContent);die; $this->printerDelList($snlist); } //添加打印機 /* 使用案例 $printerConten => 打印機編號sn(必填) # 打印機識別碼key(必填) # 備注名稱(選填) # 流量卡號碼(選填),多臺打印機請換行(\n)添加新打印機信息,每次最多100臺。 $printerData=[ ["Sn"=>"921555411","KEY"=>"amnkatm5","remark"=>"測試","carnum"=>""], // ["Sn"=>"921555412","KEY"=>"amnkatm2","remark"=>"測試2","carnum"=>""], ]; $Feieyun=new Feieyun(); $Feieyun->batchAdd($printerData); */ public function batchAdd($printerData){ $printerContent=""; $printerDataCount=count($printerData); $i=0; foreach ($printerData as $key => $value) { $i++; $SN=$value["Sn"]; $KEY=$value["KEY"]; $remark=$value["remark"]; $carnum=$value["carnum"]; if($i>=$printerDataCount){ $printerContent .= "{$SN}#{$KEY}#{$remark}#{$carnum}"; }else{ $printerContent .= "{$SN}#{$KEY}#{$remark}#{$carnum}\n"; } } // var_dump($printerContent);die; $this->printerAddlist($printerContent); } // $title,$goods,$note,$extension public function printReceipts($title,$goods,$note,$extension){ /* 使用案例 $Feieyun=new Feieyun("921555411"); $title="測試標題api".time(); $note="測試備注api".time(); $goods=[ ["name"=>"測試商品","price"=>"10.00","num"=>3], ["name"=>"測試商品品","price"=>"10.00","num"=>3], ["name"=>"測試商品3測試商品2測試商品2","price"=>"10.00","num"=>3], ]; $extension =[ ["name"=>"測試","value"=>"10.00" ], ["name"=>"測試商品1","value"=>"10.00" ], ["name"=>"時間","value"=>date("Y-m-d") ], ]; $Feieyun->printReceipts($title,$goods,$note,$extension); */ $content = '<CB>'.$title.'</CB><BR>'; $content .= '名稱      單價 數量 金額<BR>'; $content .= '--------------------------------<BR>'; $total_price=0; foreach ($goods as $key => $value) { $numprice=$value['price']*$value['num']; $total_price=$total_price+$numprice; if(mb_strlen($value['name'])>=8){ $name=mb_substr( $value['name'],0,6,"utf-8" ) ; $content .= $name."... {$value['price']} {$value['num']} {$numprice}<BR>"; }else{ $emptynum=8-mb_strlen($value['name']); $content .= $value['name'].str_repeat(' ',$emptynum)." {$value['price']} {$value['num']} {$numprice}<BR>"; } } $content .= "備注:{$note}<BR>"; $content .= '--------------------------------<BR>'; $content .= "合計:{$total_price}元<BR>"; foreach ($extension as $key => $value) { $content .= "{$value['name']}:{$value['value']}<BR>"; } // $content .= '<QR>http://www.feieyun.com</QR>';//把二維碼字符串用標簽套上即可自動生成二維碼 //提示: //SN => 打印機編號 //$content => 打印內容,不能超過5000字節 //$times => 打印次數,默認為1。 //打開注釋可測試 $this->printMsg($this->SN,$content,1);//該接口只能是小票機使用,如購買的是標簽機請使用下面方法3,調用打印 } /** * [批量添加打印機接口 Open_printerAddlist] * @param [string] $printerContent [打印機的sn#key] * @return [string] [接口返回值] */ public function printerAddlist($printerContent){ $time = time(); //請求時間 $msgInfo = array( 'user'=>$this->USER, 'stime'=>$time, 'sig'=>$this->signature($time), 'apiname'=>'Open_printerAddlist', 'printerContent'=>$printerContent ); $client = new HttpClient($this->IP,$this->PORT); if(!$client->post($this->PATH,$msgInfo)){ return 'error'; }else{ $result = $client->getContent(); return json_encode($result); } } /** * 打印訂單[接口 Open_printMsg] * @param [string] $sn [打印機編號sn] * @param [string] $content [打印內容] * @param [string] $times [打印聯數] * @return [string] [接口返回值] */ public function printMsg($sn,$content,$times){ $time = time(); //請求時間 $msgInfo = array( 'user'=>$this->USER, 'stime'=>$time, 'sig'=>$this->signature($time), 'apiname'=>'Open_printMsg', 'sn'=>$sn, 'content'=>$content, 'times'=>$times//打印次數 ); $client = new HttpClient($this->IP,$this->PORT); if(!$client->post($this->PATH,$msgInfo)){ return 'error'; }else{ //服務器返回的JSON字符串,建議要當做日志記錄起來 $result = $client->getContent(); return json_encode($result); } } /** * 標簽機打印訂單[接口 Open_printLabelMsg] * @param [string] $sn [打印機編號sn] * @param [string] $content [打印內容] * @param [string] $times [打印聯數] * @return [string] [接口返回值] */ public function printLabelMsg($sn,$content,$times){ $time = time(); //請求時間 $msgInfo = array( 'user'=>$this->USER, 'stime'=>$time, 'sig'=>$this->signature($time), 'apiname'=>'Open_printLabelMsg', 'sn'=>$sn, 'content'=>$content, 'times'=>$times//打印次數 ); $client = new HttpClient($this->IP,$this->PORT); if(!$client->post($this->PATH,$msgInfo)){ return 'error'; }else{ //服務器返回的JSON字符串,建議要當做日志記錄起來 $result = $client->getContent(); return json_encode($result); } } /** * 批量刪除[打印機 Open_printerDelList] * @param [string] $snlist [打印機編號,多臺打印機請用減號“-”連接起來] * @return [string] [接口返回值] */ public function printerDelList($snlist){ $time = time(); //請求時間 $msgInfo = array( 'user'=>$this->USER, 'stime'=>$time, 'sig'=>$this->signature($time), 'apiname'=>'Open_printerDelList', 'snlist'=>$snlist ); $client = new HttpClient($this->IP,$this->PORT); if(!$client->post($this->PATH,$msgInfo)){ return 'error'; }else{ $result = $client->getContent(); return json_encode($result); } } /** * 修改打印機信息[接口 Open_printerEdit] * @param [string] $sn [打印機編號] * @param [string] $name [打印機備注名稱] * @param [string] $phonenum [打印機流量卡號碼,可以不傳參,但是不能為空字符串] * @return [string] [接口返回值] */ public function printerEdit($sn,$name,$phonenum){ $time = time(); //請求時間 $msgInfo = array( 'user'=>$this->USER, 'stime'=>$time, 'sig'=>$this->signature($time), 'apiname'=>'Open_printerEdit', 'sn'=>$sn, 'name'=>$name, 'phonenum'=>$phonenum ); $client = new HttpClient($this->IP,$this->PORT); if(!$client->post($this->PATH,$msgInfo)){ return 'error'; }else{ $result = $client->getContent(); return json_encode($result); } } /** * 清空待打印訂單[接口 Open_delPrinterSqs] * @param [string] $sn [打印機編號] * @return [string] [接口返回值] */ public function delPrinterSqs($sn){ $time = time(); //請求時間 $msgInfo = array( 'user'=>$this->USER, 'stime'=>$time, 'sig'=>$this->signature($time), 'apiname'=>'Open_delPrinterSqs', 'sn'=>$sn ); $client = new HttpClient($this->IP,$this->PORT); if(!$client->post($this->PATH,$msgInfo)){ return 'error'; }else{ $result = $client->getContent(); return json_encode($result); } } /** * 查詢訂單是否打印成功[接口 Open_queryOrderState] * @param [string] $orderid [調用打印機接口成功后,服務器返回的JSON中的編號 例如:123456789_20190919163739_95385649] * @return [string] [接口返回值] */ public function queryOrderState($orderid){ $time = time(); //請求時間 $msgInfo = array( 'user'=>$this->USER, 'stime'=>$time, 'sig'=>$this->signature($time), 'apiname'=>'Open_queryOrderState', 'orderid'=>$orderid ); $client = new HttpClient($this->IP,$this->PORT); if(!$client->post($this->PATH,$msgInfo)){ return 'error'; }else{ $result = $client->getContent(); return json_encode($result); } } /** * [查詢指定打印機某天的訂單統計數接口 Open_queryOrderInfoByDate] * @param [string] $sn [打印機的編號] * @param [string] $date [查詢日期,格式YY-MM-DD,如:2019-09-20] * @return [string] [接口返回值] */ public function queryOrderInfoByDate($sn,$date){ $time = time(); //請求時間 $msgInfo = array( 'user'=>$this->USER, 'stime'=>$time, 'sig'=>$this->signature($time), 'apiname'=>'Open_queryOrderInfoByDate', 'sn'=>$sn, 'date'=>$date ); $client = new HttpClient($this->IP,$this->PORT); if(!$client->post($this->PATH,$msgInfo)){ return 'error'; }else{ $result = $client->getContent(); return json_encode($result); } } /** * 獲取某臺打印機狀態[接口 Open_queryPrinterStatus] * @param [string] $sn [打印機編號] * @return [string] [接口返回值] */ public function queryPrinterStatus($sn){ $time = time(); //請求時間 $msgInfo = array( 'user'=>$this->USER, 'stime'=>$time, 'sig'=>$this->signature($time), 'apiname'=>'Open_queryPrinterStatus', 'sn'=>$sn ); $client = new HttpClient($this->IP,$this->PORT); if(!$client->post($this->PATH,$msgInfo)){ return 'error'; }else{ $result = $client->getContent(); return json_encode($result); } } /** * [signature 生成簽名] * @param [string] $time [當前UNIX時間戳,10位,精確到秒] * @return [string] [接口返回值] */ public function signature($time){ return sha1($this->USER.$this->UKEY.$time);//公共參數,請求公鑰 } } //****************************************方法3 標簽機專用打印訂單接口**************************************************** //***接口返回值說明*** //正確例子:{"msg":"ok","ret":0,"data":"123456789_20160823165104_1853029628","serverExecutedTime":6} //錯誤例子:{"msg":"錯誤信息.","ret":非零錯誤碼,"data":null,"serverExecutedTime":5} //標簽說明: // $content = "<DIRECTION>1</DIRECTION>";//設定打印時出紙和打印字體的方向,n 0 或 1,每次設備重啟后都會初始化為 0 值設置,1:正向出紙,0:反向出紙, // $content .= "<TEXT x='9' y='10' font='12' w='1' h='2' r='0'>#001 五號桌 1/3</TEXT><TEXT x='80' y='80' font='12' w='2' h='2' r='0'>可樂雞翅</TEXT><TEXT x='9' y='180' font='12' w='1' h='1' r='0'>張三先生 13800138000</TEXT>";//40mm寬度標簽紙打印例子,打開注釋調用標簽打印接口打印 //提示: //SN => 打印機編號 //$content => 打印內容,不能超過5000字節 //$times => 打印次數,默認為1。 //打開注釋可測試 // printLabelMsg(SN,$content,1);//打開注釋調用標簽機打印接口進行打印,該接口只能是標簽機使用,其它型號打印機請勿使用該接口 //************************************方法5 修改打印機信息接口************************************************ //***接口返回值說明*** //成功:{"msg":"ok","ret":0,"data":true,"serverExecutedTime":5} //錯誤:{"msg":"參數錯誤 : 參數值不能傳空字符,\"\"、\"null\"、\"undefined\".","ret":-2,"data":null,"serverExecutedTime":1} //提示: //SN => 打印機編號 //$name => 打印機備注名稱 //$phonenum => 打印機流量卡號碼 //打開注釋可測試 //$name = "飛鵝云打印機"; //$phonenum = "01234567891011121314"; // printerEdit(SN,$name,$phonenum); //************************************方法6 清空待打印訂單接口************************************************ //***接口返回值說明*** //成功:{"msg":"ok","ret":0,"data":true,"serverExecutedTime":4} //錯誤:{"msg":"驗證失敗 : 打印機編號和用戶不匹配.","ret":1002,"data":null,"serverExecutedTime":3} //錯誤:{"msg":"參數錯誤 : 參數值不能傳空字符,\"\"、\"null\"、\"undefined\".","ret":-2,"data":null,"serverExecutedTime":2} //提示: //SN => 打印機編號 //打開注釋可測試 // delPrinterSqs(SN); //*********************************方法7 查詢訂單是否打印成功接口********************************************* //***接口返回值說明*** //正確例子: //已打印:{"msg":"ok","ret":0,"data":true,"serverExecutedTime":6} //未打印:{"msg":"ok","ret":0,"data":false,"serverExecutedTime":6} //提示: //$orderid => 訂單ID,由方法1接口Open_printMsg返回。 //打開注釋可測試 //$orderid = "123456789_20160823165104_1853029628";//訂單ID,從方法1返回值中獲取 //queryOrderState($orderid); //*****************************方法8 查詢指定打印機某天的訂單統計數接口***************************************** //***接口返回值說明*** //正確例子: //{"msg":"ok","ret":0,"data":{"print":6,"waiting":1},"serverExecutedTime":9} //錯誤:{"msg":"驗證失敗 : 打印機編號和用戶不匹配.","ret":1002,"data":null,"serverExecutedTime":3} //提示: //$date => 查詢日期,格式YY-MM-DD,如:2016-09-20 //打開注釋可測試 // $date = "2016-09-20"; // queryOrderInfoByDate(SN,$date); //***********************************方法9 獲取某臺打印機狀態接口*********************************************** //***接口返回值說明*** //正確例子: //{"msg":"ok","ret":0,"data":"離線","serverExecutedTime":9} //{"msg":"ok","ret":0,"data":"在線,工作狀態正常","serverExecutedTime":9} //{"msg":"ok","ret":0,"data":"在線,工作狀態不正常","serverExecutedTime":9} //提示: //SN => 填打印機編號 //打開注釋可測試 // queryPrinterStatus(SN); ?> ``` 3、使用 ``` use feieyun\Feieyun; /*打印*/ public function index() { $Feieyun=new Feieyun("921555411"); $title="測試標題api".time(); $note="測試備注api".time(); $goods=[ ["name"=>"測試商品","price"=>"10.00","num"=>3], ["name"=>"測試商品品","price"=>"10.00","num"=>3], ["name"=>"測試商品3測試商品2測試商品2","price"=>"10.00","num"=>3], ]; $extension =[ ["name"=>"測試","value"=>"10.00" ], ["name"=>"測試商品1","value"=>"10.00" ], ["name"=>"時間","value"=>date("Y-m-d") ], ]; $Feieyun->printReceipts($title,$goods,$note,$extension); } //*************************************批量添加打印機接口************************************************* //提示: //$printerConten => 打印機編號sn(必填) # 打印機識別碼key(必填) # 備注名稱(選填) # 流量卡號碼(選填), 每次最多100臺。 public function add() { $printerData=[ ["Sn"=>"921555411","KEY"=>"amnkatm5","remark"=>"測試","carnum"=>""], // ["Sn"=>"921555412","KEY"=>"amnkatm2","remark"=>"測試2","carnum"=>""], ]; $Feieyun=new Feieyun(); $Feieyun->batchAdd($printerData); } //************************************* 批量刪除打印機接口************************************************* //提示: //$printerConten => 打印機編號sn(必填) , 每次最多100臺 。 public function del() { $printerData=[ 921555411, ]; $Feieyun=new Feieyun(); $Feieyun->batchDel($printerData); } ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看