Commit 85e644a6 by liangjianmin

安卓

parent 968b30c4
...@@ -244,7 +244,6 @@ export default { ...@@ -244,7 +244,6 @@ export default {
} else { } else {
data.push('T 5 0 10 120 箱号:' + this.printLabelData[this.print_number].label_sort + '/' + this.printLabelData[this.print_number].label_num + '\r\n'); data.push('T 5 0 10 120 箱号:' + this.printLabelData[this.print_number].label_sort + '/' + this.printLabelData[this.print_number].label_num + '\r\n');
} }
data.push('SETMAG 0 0\r\n');
data.push('T 8 0 10 180 时间:' + this.printLabelData[this.print_number].create_time_cn + '\r\n'); data.push('T 8 0 10 180 时间:' + this.printLabelData[this.print_number].create_time_cn + '\r\n');
data.push('T 8 0 10 220 仓库代码:' + this.printLabelData[this.print_number].warehouse_code + '\r\n'); data.push('T 8 0 10 220 仓库代码:' + this.printLabelData[this.print_number].warehouse_code + '\r\n');
data.push('T 8 0 10 260 流水号:' + this.printLabelData[this.print_number].wstyptll_id_sn + '\r\n'); data.push('T 8 0 10 260 流水号:' + this.printLabelData[this.print_number].wstyptll_id_sn + '\r\n');
...@@ -273,10 +272,10 @@ export default { ...@@ -273,10 +272,10 @@ export default {
* 分批传输数据 * 分批传输数据
*/ */
cutCommand: function(data) { cutCommand: function(data) {
var packageLength = 15; //安卓不超过20个字节传输 var packageLength = 10; //安卓不超过20个字节传输
var sendData64 = []; var sendData64 = [];
if (this.platform == 'ios') { if (this.platform == 'ios') {
packageLength = 40; packageLength = 30;
} }
console.log('package长度:' + packageLength); console.log('package长度:' + packageLength);
for (let i = 0; i < Math.ceil(data.length / packageLength); i++) { for (let i = 0; i < Math.ceil(data.length / packageLength); i++) {
......
...@@ -215,7 +215,6 @@ export default { ...@@ -215,7 +215,6 @@ export default {
} else { } else {
data.push('T 5 0 10 120 箱号:' + this.printLabelData[this.print_number].label_sort + '/' + this.printLabelData[this.print_number].label_num + '\r\n'); data.push('T 5 0 10 120 箱号:' + this.printLabelData[this.print_number].label_sort + '/' + this.printLabelData[this.print_number].label_num + '\r\n');
} }
data.push('SETMAG 0 0\r\n');
data.push('T 8 0 10 180 时间:' + this.printLabelData[this.print_number].create_time_cn + '\r\n'); data.push('T 8 0 10 180 时间:' + this.printLabelData[this.print_number].create_time_cn + '\r\n');
data.push('T 8 0 10 220 仓库代码:' + this.printLabelData[this.print_number].warehouse_code + '\r\n'); data.push('T 8 0 10 220 仓库代码:' + this.printLabelData[this.print_number].warehouse_code + '\r\n');
data.push('T 8 0 10 260 流水号:' + this.printLabelData[this.print_number].wstyptll_id_sn + '\r\n'); data.push('T 8 0 10 260 流水号:' + this.printLabelData[this.print_number].wstyptll_id_sn + '\r\n');
...@@ -244,10 +243,10 @@ export default { ...@@ -244,10 +243,10 @@ export default {
* 分批传输数据 * 分批传输数据
*/ */
cutCommand: function(data) { cutCommand: function(data) {
var packageLength = 15; //安卓不超过20个字节传输 var packageLength = 10; //安卓不超过20个字节传输
var sendData64 = []; var sendData64 = [];
if (this.platform == 'ios') { if (this.platform == 'ios') {
packageLength = 40; packageLength = 30;
} }
console.log('package长度:' + packageLength); console.log('package长度:' + packageLength);
for (let i = 0; i < Math.ceil(data.length / packageLength); i++) { for (let i = 0; i < Math.ceil(data.length / packageLength); i++) {
......
//const API_BASE = 'https://api.ichunt.com'; const API_BASE = 'https://api.ichunt.com';
const API_BASE = 'http://api.liexin.com'; //const API_BASE = 'http://api.liexin.com';
const API = { const API = {
/** /**
* 上传数据 * 上传数据
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment