Skip to content

Commit da69aca

Browse files
committed
fix: 开发文档适配的机型优化
解决方案:NA 影响范围:all 关联工单:NA 更新版本:NA
1 parent 1afa3c0 commit da69aca

7 files changed

Lines changed: 23 additions & 101 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ await PrinterImin.printText('Hello World');
7575

7676
### Tablet Terminal Series
7777
- M2 Max, D1, D1 Pro
78-
- Falcon 1, Swan 2, Falcon 2, Falcon 2 Pro, Falcon 1 Pro, Swan 2 Pro
78+
- Falcon 1, Swan 2, Falcon 2, Falcon 2 Pro, Falcon 1 Pro, Swan 2 Pro, Heron 1, Heron 1 mini
7979

8080
### Desktop POS Equipment
8181
- D4, Swan 2, Falcon 2

docs/README.md

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,7 @@
66

77
### 支持的设备系列
88

9-
**手持金融系列**
10-
- M2-202、M2-203、M2 Pro
11-
- Swift 1、Swift 2、Swift 2 Pro、Swift 2 Ultra、Swift 1 Pro
12-
13-
**平板终端系列**
14-
- M2 Max、D1、D1 Pro
15-
- Falcon 1、Swan 2、Falcon 2、Falcon 2 Pro、Falcon 1 Pro、Swan 2 Pro
16-
17-
**桌面收银设备**
18-
- D4、Swan 2、Falcon 2
19-
20-
### 打印机规格
21-
22-
iMin产品配备两种内置打印机:
23-
- **80mm纸宽**:带切刀,兼容58mm(如Falcon 1、Falcon 2、Falcon 2 Pro、Falcon 1 Pro、Swan 2 Pro)
24-
- **58mm纸宽**:无切刀(如D1、D1 Pro、M2 Max、Swift系列)
9+
- iMin 自研打印设备
2510

2611
## 快速导航
2712

docs/developer-guide.md

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,7 @@
66

77
### 支持的设备
88

9-
**手持金融系列**
10-
- M2-202、M2-203、M2 Pro
11-
- Swift 1、Swift 2、Swift 2 Pro、Swift 2 Ultra、Swift 1 Pro
12-
13-
**平板终端系列**
14-
- M2 Max、D1、D1 Pro
15-
- Falcon 1、Swan 2、Falcon 2、Falcon 2 Pro、Falcon 1 Pro、Swan 2 Pro
16-
17-
**桌面收银设备**
18-
- D4、Swan 2、Falcon 2
19-
20-
### 打印机规格
21-
22-
iMin产品配备两种内置打印机:
23-
- **80mm纸宽**:带切刀,兼容58mm(如Falcon 1、Falcon 2、Falcon 2 Pro、Falcon 1 Pro、Swan 2 Pro)
24-
- **58mm纸宽**:无切刀(如D1、D1 Pro、M2 Max、Swift系列)
9+
- iMin 自研打印设备
2510

2611
## 架构设计
2712

docs/en/README.md

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,7 @@
66

77
### Supported Device Series
88

9-
**Handheld Finance Series**
10-
- M2-202, M2-203, M2 Pro
11-
- Swift 1, Swift 2, Swift 2 Pro, Swift 2 Ultra, Swift 1 Pro
12-
13-
**Tablet Terminal Series**
14-
- M2 Max, D1, D1 Pro
15-
- Falcon 1, Swan 2, Falcon 2, Falcon 2 Pro, Falcon 1 Pro, Swan 2 Pro
16-
17-
**Desktop POS Equipment**
18-
- D4, Swan 2, Falcon 2
19-
20-
### Printer Specifications
21-
22-
iMin products come with two types of built-in printers:
23-
- **80mm paper width**: With cutter, compatible with 58mm (e.g., Falcon 1, Falcon 2, Falcon 2 Pro, Falcon 1 Pro, Swan 2 Pro)
24-
- **58mm paper width**: Without cutter (e.g., D1, D1 Pro, M2 Max, Swift series)
9+
- iMin Self-developed Printing Devices
2510

2611
## Quick Navigation
2712

docs/en/developer-guide.md

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,7 @@
66

77
### Supported Devices
88

9-
**Handheld Finance Series**
10-
- M2-202, M2-203, M2 Pro
11-
- Swift 1, Swift 2, Swift 2 Pro, Swift 2 Ultra, Swift 1 Pro
12-
13-
**Tablet Terminal Series**
14-
- M2 Max, D1, D1 Pro
15-
- Falcon 1, Swan 2, Falcon 2, Falcon 2 Pro, Falcon 1 Pro, Swan 2 Pro
16-
17-
**Desktop POS Equipment**
18-
- D4, Swan 2, Falcon 2
19-
20-
### Printer Specifications
21-
22-
iMin products come with two types of built-in printers:
23-
- **80mm paper width**: With cutter, compatible with 58mm (e.g., Falcon 1, Falcon 2, Falcon 2 Pro, Falcon 1 Pro, Swan 2 Pro)
24-
- **58mm paper width**: Without cutter (e.g., D1, D1 Pro, M2 Max, Swift series)
9+
- iMin Self-developed Printing Devices
2510

2611
## Architecture Design
2712

docs/en/faq.md

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -80,16 +80,7 @@ const checkDevice = async () => {
8080

8181
**A**: Supported devices include:
8282

83-
**Handheld Finance Series**:
84-
- M2-202, M2-203, M2 Pro
85-
- Swift 1, Swift 2, Swift 2 Pro, Swift 2 Ultra, Swift 1 Pro
86-
87-
**Tablet Terminal Series**:
88-
- M2 Max, D1, D1 Pro
89-
- Falcon 1, Swan 2, Falcon 2, Falcon 2 Pro, Falcon 1 Pro, Swan 2 Pro
90-
91-
**Desktop POS Equipment**:
92-
- D4, Swan 2, Falcon 2
83+
- iMin Self-developed Printing Devices
9384

9485
## Printing Function Issues
9586

@@ -174,7 +165,7 @@ try {
174165
} catch (error) {
175166
console.log('Device does not support paper cutting');
176167
// Only devices with cutter support this function
177-
// e.g., Falcon 1, Falcon 2, Falcon 2 Pro, Falcon 1 Pro, Swan 2 Pro (80mm version)
168+
// e.g., Falcon 1, Falcon 2, Falcon 2 Pro, Falcon 1 Pro, Swan 2 Pro, Heron 1, Heron 1 mini (80mm version)
178169
}
179170
```
180171

docs/faq.md

Lines changed: 16 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -80,16 +80,7 @@ const checkDevice = async () => {
8080

8181
**A**: 支持的设备包括:
8282

83-
**手持金融系列**:
84-
- M2-202, M2-203, M2 Pro
85-
- Swift 1, Swift 2, Swift 2 Pro, Swift 2 Ultra, Swift 1 Pro
86-
87-
**平板终端系列**:
88-
- M2 Max, D1, D1 Pro
89-
- Falcon 1, Swan 2, Falcon 2, Falcon 2 Pro, Falcon 1 Pro, Swan 2 Pro
90-
91-
**桌面收银设备**:
92-
- D4, Swan 2, Falcon 2
83+
- iMin 自研打印设备
9384

9485
## 打印功能问题
9586

@@ -160,7 +151,7 @@ const checkDevice = async () => {
160151

161152
3. **设置合适的纠错级别**:
162153
- `levelL`: 约7%的纠错能力
163-
- `levelM`: 约15%的纠错能力
154+
- `levelM`: 约15%的纠错能力
164155
- `levelQ`: 约25%的纠错能力
165156
- `levelH`: 约30%的纠错能力
166157

@@ -174,7 +165,7 @@ try {
174165
} catch (error) {
175166
console.log('设备不支持切纸功能');
176167
// 只有带切刀的设备才支持此功能
177-
// 如: Falcon 1, Falcon 2, Falcon 2 Pro, Falcon 1 Pro, Swan 2 Pro (80mm版本)
168+
// 如: Falcon 1, Falcon 2, Falcon 2 Pro, Falcon 1 Pro, Swan 2 Pro, Heron 1, Heron 1 mini (80mm版本)
178169
}
179170
```
180171

@@ -187,11 +178,11 @@ try {
187178
1. **使用缓冲区**:
188179
```typescript
189180
await PrinterImin.enterPrinterBuffer(true);
190-
181+
191182
// 批量添加打印内容
192183
await PrinterImin.printText('内容1');
193184
await PrinterImin.printText('内容2');
194-
185+
195186
// 一次性打印
196187
await PrinterImin.commitPrinterBuffer();
197188
await PrinterImin.exitPrinterBuffer(false);
@@ -207,7 +198,7 @@ try {
207198
// 避免频繁切换设置
208199
await PrinterImin.setTextSize(24);
209200
await PrinterImin.setAlignment(IminPrintAlign.center);
210-
201+
211202
// 批量打印相同格式的内容
212203
await PrinterImin.printText('内容1');
213204
await PrinterImin.printText('内容2');
@@ -221,7 +212,7 @@ try {
221212
```typescript
222213
useEffect(() => {
223214
const unsubscribe = PrinterImin.receiveBroadcastStream.listen(callback);
224-
215+
225216
return () => {
226217
unsubscribe(); // 重要:组件卸载时取消监听
227218
};
@@ -244,13 +235,13 @@ try {
244235
```typescript
245236
class PrintQueue {
246237
private isProcessing = false;
247-
238+
248239
async addTask(task: () => Promise<void>) {
249240
if (this.isProcessing) {
250241
console.log('打印队列忙碌,请稍后');
251242
return;
252243
}
253-
244+
254245
this.isProcessing = true;
255246
try {
256247
await task();
@@ -408,16 +399,16 @@ await PrinterImin.sendRAWData([0x1B, 0x40]);
408399
if (status.code !== 0) {
409400
throw new Error(`打印机错误: ${status.message}`);
410401
}
411-
402+
412403
await PrinterImin.printText(content);
413-
404+
414405
} catch (error) {
415406
// 记录错误日志
416407
console.error('打印失败:', error);
417-
408+
418409
// 用户友好的错误提示
419410
Alert.alert('打印失败', '请检查打印机状态后重试');
420-
411+
421412
// 可选:发送错误报告到服务器
422413
// reportError(error);
423414
}
@@ -428,7 +419,7 @@ await PrinterImin.sendRAWData([0x1B, 0x40]);
428419
```typescript
429420
const monitoredPrint = async (content: string) => {
430421
const startTime = Date.now();
431-
422+
432423
try {
433424
await PrinterImin.printText(content);
434425
const duration = Date.now() - startTime;
@@ -466,7 +457,7 @@ class PrinterQueue {
466457
reject(error);
467458
}
468459
});
469-
460+
470461
this.process();
471462
});
472463
}
@@ -517,4 +508,4 @@ const printReceipt = async () => {
517508
- React Native版本
518509
- SDK版本
519510
- 完整的错误日志
520-
- 复现步骤
511+
- 复现步骤

0 commit comments

Comments
 (0)