tplus-components-touch 3.27.27 → 3.27.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/billSearch/index.js +163 -20
- package/dist/components/billSearch/index.js.map +1 -1
- package/dist/components/billSearch/index.less +6 -3
- package/dist/components/cloudPrint/api.js +85 -43
- package/dist/components/cloudPrint/api.js.map +1 -1
- package/dist/components/cloudPrint/printDispatch.js +211 -108
- package/dist/components/cloudPrint/printDispatch.js.map +1 -1
- package/dist/components/deliverySearch/index.js +1 -1
- package/dist/components/deliverySearch/index.js.map +1 -1
- package/dist/components/hotKey/localConfig.js +133 -14
- package/dist/components/hotKey/localConfig.js.map +1 -1
- package/dist/components/inventorySearch/tab.js +77 -67
- package/dist/components/inventorySearch/tab.js.map +1 -1
- package/dist/components/keyboard/numberButton_input.js +4 -2
- package/dist/components/keyboard/numberButton_input.js.map +1 -1
- package/dist/components/keyboard/onlyLetterButton2.less +35 -40
- package/dist/components/loading/loadingContent.js +1 -1
- package/dist/components/loading/loadingContent.js.map +1 -1
- package/dist/components/loading/style.less +7 -7
- package/dist/components/progressState/EmptyAndErrorView.js +4 -3
- package/dist/components/progressState/EmptyAndErrorView.js.map +1 -1
- package/dist/components/progressState/ProgressState.js +2 -1
- package/dist/components/progressState/ProgressState.js.map +1 -1
- package/dist/components/settlement/moreCzkTable/index.js +156 -0
- package/dist/components/settlement/moreCzkTable/index.js.map +1 -0
- package/dist/components/settlement/moreCzkTable/style.less +7 -0
- package/dist/components/settlement/settlement.js +765 -500
- package/dist/components/settlement/settlement.js.map +1 -1
- package/dist/components/settlement/settlement.less +77 -7
- package/dist/components/settlement/settlementStore.js +555 -317
- package/dist/components/settlement/settlementStore.js.map +1 -1
- package/dist/components/ticon/iconfont/demo_index.html +26 -3
- package/dist/components/ticon/iconfont/iconfont.css +7 -3
- package/dist/components/ticon/iconfont/iconfont.js +6 -6
- package/dist/components/ticon/iconfont/iconfont.js.map +1 -1
- package/dist/components/ticon/iconfont/iconfont.json +7 -0
- package/dist/components/ticon/iconfont/iconfont.ttf +0 -0
- package/dist/components/ticon/iconfont/iconfont.woff +0 -0
- package/dist/components/ticon/iconfont/iconfont.woff2 +0 -0
- package/dist/components/touchScroll/index.js +6 -2
- package/dist/components/touchScroll/index.js.map +1 -1
- package/dist/components/touchTable/index.js +7 -5
- package/dist/components/touchTable/index.js.map +1 -1
- package/dist/components/touchTable/index.less +20 -13
- package/dist/index.js +14 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -4,6 +4,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
|
|
7
|
+
var _stringify = require('babel-runtime/core-js/json/stringify');
|
|
8
|
+
|
|
9
|
+
var _stringify2 = _interopRequireDefault(_stringify);
|
|
10
|
+
|
|
7
11
|
var _regenerator = require('babel-runtime/regenerator');
|
|
8
12
|
|
|
9
13
|
var _regenerator2 = _interopRequireDefault(_regenerator);
|
|
@@ -128,25 +132,30 @@ var API = function () {
|
|
|
128
132
|
return getPrintDataInfo;
|
|
129
133
|
}()
|
|
130
134
|
|
|
131
|
-
|
|
135
|
+
//获取当前门店硬件配置信息
|
|
132
136
|
|
|
133
137
|
}, {
|
|
134
|
-
key: '
|
|
138
|
+
key: 'GetPrintInfomation',
|
|
135
139
|
value: function () {
|
|
136
|
-
var _ref3 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(
|
|
137
|
-
var data;
|
|
140
|
+
var _ref3 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(dto) {
|
|
141
|
+
var param, data;
|
|
138
142
|
return _regenerator2.default.wrap(function _callee3$(_context3) {
|
|
139
143
|
while (1) {
|
|
140
144
|
switch (_context3.prev = _context3.next) {
|
|
141
145
|
case 0:
|
|
142
|
-
|
|
143
|
-
return (0, _tplusApi.tApi)({ id: Id }, 'Ufida.T.RE.Interface.IDailyDetail.FindById', false, false);
|
|
146
|
+
param = {};
|
|
144
147
|
|
|
145
|
-
|
|
148
|
+
param.Idstore = dto.Idstore;
|
|
149
|
+
param.POSCode = dto.POSCode;
|
|
150
|
+
|
|
151
|
+
_context3.next = 5;
|
|
152
|
+
return (0, _tplusApi.tApi)({ param: (0, _stringify2.default)(param) }, 'chanjet.RE.NewPos.GetPrintInfomation', false, false);
|
|
153
|
+
|
|
154
|
+
case 5:
|
|
146
155
|
data = _context3.sent;
|
|
147
156
|
return _context3.abrupt('return', data);
|
|
148
157
|
|
|
149
|
-
case
|
|
158
|
+
case 7:
|
|
150
159
|
case 'end':
|
|
151
160
|
return _context3.stop();
|
|
152
161
|
}
|
|
@@ -154,17 +163,17 @@ var API = function () {
|
|
|
154
163
|
}, _callee3, this);
|
|
155
164
|
}));
|
|
156
165
|
|
|
157
|
-
function
|
|
166
|
+
function GetPrintInfomation(_x3) {
|
|
158
167
|
return _ref3.apply(this, arguments);
|
|
159
168
|
}
|
|
160
169
|
|
|
161
|
-
return
|
|
170
|
+
return GetPrintInfomation;
|
|
162
171
|
}()
|
|
163
172
|
|
|
164
|
-
|
|
173
|
+
//获取日结打印数据
|
|
165
174
|
|
|
166
175
|
}, {
|
|
167
|
-
key: '
|
|
176
|
+
key: 'getDialyPrintDataInfo',
|
|
168
177
|
value: function () {
|
|
169
178
|
var _ref4 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4(Id) {
|
|
170
179
|
var data;
|
|
@@ -173,7 +182,7 @@ var API = function () {
|
|
|
173
182
|
switch (_context4.prev = _context4.next) {
|
|
174
183
|
case 0:
|
|
175
184
|
_context4.next = 2;
|
|
176
|
-
return (0, _tplusApi.tApi)({ id: Id }, 'Ufida.T.RE.
|
|
185
|
+
return (0, _tplusApi.tApi)({ id: Id }, 'Ufida.T.RE.Interface.IDailyDetail.FindById', false, false);
|
|
177
186
|
|
|
178
187
|
case 2:
|
|
179
188
|
data = _context4.sent;
|
|
@@ -187,17 +196,17 @@ var API = function () {
|
|
|
187
196
|
}, _callee4, this);
|
|
188
197
|
}));
|
|
189
198
|
|
|
190
|
-
function
|
|
199
|
+
function getDialyPrintDataInfo(_x4) {
|
|
191
200
|
return _ref4.apply(this, arguments);
|
|
192
201
|
}
|
|
193
202
|
|
|
194
|
-
return
|
|
203
|
+
return getDialyPrintDataInfo;
|
|
195
204
|
}()
|
|
196
205
|
|
|
197
|
-
|
|
206
|
+
//获取交班打印数据
|
|
198
207
|
|
|
199
208
|
}, {
|
|
200
|
-
key: '
|
|
209
|
+
key: 'getDutyPrintDataInfo',
|
|
201
210
|
value: function () {
|
|
202
211
|
var _ref5 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5(Id) {
|
|
203
212
|
var data;
|
|
@@ -206,7 +215,7 @@ var API = function () {
|
|
|
206
215
|
switch (_context5.prev = _context5.next) {
|
|
207
216
|
case 0:
|
|
208
217
|
_context5.next = 2;
|
|
209
|
-
return (0, _tplusApi.tApi)({ id: Id }, 'Ufida.T.
|
|
218
|
+
return (0, _tplusApi.tApi)({ id: Id }, 'Ufida.T.RE.IShiftVoucher.FindById', false, false);
|
|
210
219
|
|
|
211
220
|
case 2:
|
|
212
221
|
data = _context5.sent;
|
|
@@ -220,10 +229,43 @@ var API = function () {
|
|
|
220
229
|
}, _callee5, this);
|
|
221
230
|
}));
|
|
222
231
|
|
|
223
|
-
function
|
|
232
|
+
function getDutyPrintDataInfo(_x5) {
|
|
224
233
|
return _ref5.apply(this, arguments);
|
|
225
234
|
}
|
|
226
235
|
|
|
236
|
+
return getDutyPrintDataInfo;
|
|
237
|
+
}()
|
|
238
|
+
|
|
239
|
+
//获取储值打印数据
|
|
240
|
+
|
|
241
|
+
}, {
|
|
242
|
+
key: 'getStoragePrintDataInfo',
|
|
243
|
+
value: function () {
|
|
244
|
+
var _ref6 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6(Id) {
|
|
245
|
+
var data;
|
|
246
|
+
return _regenerator2.default.wrap(function _callee6$(_context6) {
|
|
247
|
+
while (1) {
|
|
248
|
+
switch (_context6.prev = _context6.next) {
|
|
249
|
+
case 0:
|
|
250
|
+
_context6.next = 2;
|
|
251
|
+
return (0, _tplusApi.tApi)({ id: Id }, 'Ufida.T.ME.Interface.IMemberStorage.FindById', false, false);
|
|
252
|
+
|
|
253
|
+
case 2:
|
|
254
|
+
data = _context6.sent;
|
|
255
|
+
return _context6.abrupt('return', data);
|
|
256
|
+
|
|
257
|
+
case 4:
|
|
258
|
+
case 'end':
|
|
259
|
+
return _context6.stop();
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}, _callee6, this);
|
|
263
|
+
}));
|
|
264
|
+
|
|
265
|
+
function getStoragePrintDataInfo(_x6) {
|
|
266
|
+
return _ref6.apply(this, arguments);
|
|
267
|
+
}
|
|
268
|
+
|
|
227
269
|
return getStoragePrintDataInfo;
|
|
228
270
|
}()
|
|
229
271
|
|
|
@@ -232,11 +274,11 @@ var API = function () {
|
|
|
232
274
|
}, {
|
|
233
275
|
key: 'openQueryPrinterStatus',
|
|
234
276
|
value: function () {
|
|
235
|
-
var
|
|
277
|
+
var _ref7 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(params) {
|
|
236
278
|
var ts, dt, options;
|
|
237
|
-
return _regenerator2.default.wrap(function
|
|
279
|
+
return _regenerator2.default.wrap(function _callee7$(_context7) {
|
|
238
280
|
while (1) {
|
|
239
|
-
switch (
|
|
281
|
+
switch (_context7.prev = _context7.next) {
|
|
240
282
|
case 0:
|
|
241
283
|
ts = Math.round(new Date().getTime() / 1000).toString();
|
|
242
284
|
dt = ['sig=' + this.shaEncrypt(FEI_E_YUN_USER + FEI_E_YUN_KEYS + ts), 'apiname=' + params.apiname, 'debug=0', 'stime=' + ts, 'sn=' + params.deviceCode, 'user=' + FEI_E_YUN_USER];
|
|
@@ -248,18 +290,18 @@ var API = function () {
|
|
|
248
290
|
data: dt,
|
|
249
291
|
url: HTTP_PROXY_URL + '?url=' + FEI_E_YUN_HOST
|
|
250
292
|
};
|
|
251
|
-
return
|
|
293
|
+
return _context7.abrupt('return', (0, _mutantsMicrofx.api)(options));
|
|
252
294
|
|
|
253
295
|
case 5:
|
|
254
296
|
case 'end':
|
|
255
|
-
return
|
|
297
|
+
return _context7.stop();
|
|
256
298
|
}
|
|
257
299
|
}
|
|
258
|
-
},
|
|
300
|
+
}, _callee7, this);
|
|
259
301
|
}));
|
|
260
302
|
|
|
261
|
-
function openQueryPrinterStatus(
|
|
262
|
-
return
|
|
303
|
+
function openQueryPrinterStatus(_x7) {
|
|
304
|
+
return _ref7.apply(this, arguments);
|
|
263
305
|
}
|
|
264
306
|
|
|
265
307
|
return openQueryPrinterStatus;
|
|
@@ -270,11 +312,11 @@ var API = function () {
|
|
|
270
312
|
}, {
|
|
271
313
|
key: 'openPrinterAddlist',
|
|
272
314
|
value: function () {
|
|
273
|
-
var
|
|
315
|
+
var _ref8 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8(params) {
|
|
274
316
|
var ts, dt, options;
|
|
275
|
-
return _regenerator2.default.wrap(function
|
|
317
|
+
return _regenerator2.default.wrap(function _callee8$(_context8) {
|
|
276
318
|
while (1) {
|
|
277
|
-
switch (
|
|
319
|
+
switch (_context8.prev = _context8.next) {
|
|
278
320
|
case 0:
|
|
279
321
|
ts = Math.round(new Date().getTime() / 1000).toString();
|
|
280
322
|
dt = ['printerContent=' + params.printerContent, 'user=' + FEI_E_YUN_USER, 'stime=' + ts, 'sig=' + this.shaEncrypt(FEI_E_YUN_USER + FEI_E_YUN_KEYS + ts), 'apiname=' + params.apiname, 'debug=0'];
|
|
@@ -286,18 +328,18 @@ var API = function () {
|
|
|
286
328
|
data: dt,
|
|
287
329
|
url: HTTP_PROXY_URL + '?url=' + FEI_E_YUN_HOST
|
|
288
330
|
};
|
|
289
|
-
return
|
|
331
|
+
return _context8.abrupt('return', (0, _mutantsMicrofx.api)(options));
|
|
290
332
|
|
|
291
333
|
case 5:
|
|
292
334
|
case 'end':
|
|
293
|
-
return
|
|
335
|
+
return _context8.stop();
|
|
294
336
|
}
|
|
295
337
|
}
|
|
296
|
-
},
|
|
338
|
+
}, _callee8, this);
|
|
297
339
|
}));
|
|
298
340
|
|
|
299
|
-
function openPrinterAddlist(
|
|
300
|
-
return
|
|
341
|
+
function openPrinterAddlist(_x8) {
|
|
342
|
+
return _ref8.apply(this, arguments);
|
|
301
343
|
}
|
|
302
344
|
|
|
303
345
|
return openPrinterAddlist;
|
|
@@ -308,11 +350,11 @@ var API = function () {
|
|
|
308
350
|
}, {
|
|
309
351
|
key: 'openPrintMsg',
|
|
310
352
|
value: function () {
|
|
311
|
-
var
|
|
353
|
+
var _ref9 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9(params) {
|
|
312
354
|
var ts, dt, options;
|
|
313
|
-
return _regenerator2.default.wrap(function
|
|
355
|
+
return _regenerator2.default.wrap(function _callee9$(_context9) {
|
|
314
356
|
while (1) {
|
|
315
|
-
switch (
|
|
357
|
+
switch (_context9.prev = _context9.next) {
|
|
316
358
|
case 0:
|
|
317
359
|
ts = Math.round(new Date().getTime() / 1000).toString();
|
|
318
360
|
dt = ['content=' + params.content, 'printerContent=' + params.printerContent, 'user=' + FEI_E_YUN_USER, 'stime=' + ts, 'sig=' + this.shaEncrypt(FEI_E_YUN_USER + FEI_E_YUN_KEYS + ts), 'apiname=' + params.apiname, 'debug=0', 'sn=' + params.deviceCode, 'times=' + params.times //打印次数
|
|
@@ -325,18 +367,18 @@ var API = function () {
|
|
|
325
367
|
data: dt,
|
|
326
368
|
url: HTTP_PROXY_URL + '?url=' + FEI_E_YUN_HOST
|
|
327
369
|
};
|
|
328
|
-
return
|
|
370
|
+
return _context9.abrupt('return', (0, _mutantsMicrofx.api)(options));
|
|
329
371
|
|
|
330
372
|
case 5:
|
|
331
373
|
case 'end':
|
|
332
|
-
return
|
|
374
|
+
return _context9.stop();
|
|
333
375
|
}
|
|
334
376
|
}
|
|
335
|
-
},
|
|
377
|
+
}, _callee9, this);
|
|
336
378
|
}));
|
|
337
379
|
|
|
338
|
-
function openPrintMsg(
|
|
339
|
-
return
|
|
380
|
+
function openPrintMsg(_x9) {
|
|
381
|
+
return _ref9.apply(this, arguments);
|
|
340
382
|
}
|
|
341
383
|
|
|
342
384
|
return openPrintMsg;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["tplus-components-touch/components/cloudPrint/api.js"],"names":["HTTP_PROXY_URL","FEI_E_YUN_HOST","FEI_E_YUN_USER","FEI_E_YUN_KEYS","API","props","shaEncrypt","originalText","password","md5","crypto","createHash","update","data","digest","i","length","v","hv","toString","params","dataSource","BizCode","bizCode","Id","id","ts","Math","round","Date","getTime","dt","apiname","deviceCode","join","options","method","headers","url","printerContent","content","times"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["tplus-components-touch/components/cloudPrint/api.js"],"names":["HTTP_PROXY_URL","FEI_E_YUN_HOST","FEI_E_YUN_USER","FEI_E_YUN_KEYS","API","props","shaEncrypt","originalText","password","md5","crypto","createHash","update","data","digest","i","length","v","hv","toString","params","dataSource","BizCode","bizCode","Id","id","dto","param","Idstore","POSCode","ts","Math","round","Date","getTime","dt","apiname","deviceCode","join","options","method","headers","url","printerContent","content","times"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;;;;;AAEA,IAAMA,iBAAiB,4BAAvB;AACA,IAAMC,iBAAiB,iCAAvB;AACA,IAAMC,iBAAiB,mBAAvB;AACA,IAAMC,iBAAiB,kBAAvB;;IAEMC,G;AACF,iBAAYC,KAAZ,EAAmB;AAAA;;AAAA,aAGnBC,UAHmB,GAGN,UAACC,YAAD,EAAkB;AAC3B,gBAAIC,WAAW,EAAf;AACA,gBAAIC,MAAMC,iBAAOC,UAAP,CAAkB,MAAlB,CAAV;AACAF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AFG;AAGZ5B,0CAAMsB,EAHM;AAIZO,yCAAQ1C,cAAR,aAA8BC;AAJlB,iC;kEAMT,yBAAIsC,OAAJ,C;;;;;;;;;;;;;;;;;AAGX;;;;;mHACmBnB,M;;;;;;AACXU,kC,GAAKC,KAAKC,KAAL,CAAW,IAAIC,IAAJ,GAAWC,OAAX,KAAuB,IAAlC,EAAwCf,QAAxC,E;AACLgB,kC,GAAK,cACMf,OAAOwB,OADb,sBAEaxB,OAAOuB,cAFpB,YAGGzC,cAHH,aAII4B,EAJJ,WAKE,KAAKxB,UAAL,CAAgBJ,iBAAiBC,cAAjB,GAAkC2B,EAAlD,CALF,eAMMV,OAAOgB,OANb,qBAQChB,OAAOiB,UARR,aASIjB,OAAOyB,KATX,CASmB;AATnB,iC;;AAWTV,qCAAKA,GAAGG,IAAH,CAAQ,GAAR,CAAL;AACMC,uC,GAAU;AACZC,4CAAQ,MADI;AAEZC,6CAAS,EAAE,gBAAgB,mCAAlB,EAFG;AAGZ5B,0CAAMsB,EAHM;AAIZO,yCAAQ1C,cAAR,aAA8BC;AAJlB,iC;kEAMT,yBAAIsC,OAAJ,C;;;;;;;;;;;;;;;;;;;;kBAGA,IAAInC,GAAJ,E","file":"api.js","sourcesContent":["import { tApi } from 'tplus-api';\nimport { api } from 'mutants-microfx';\nimport crypto from 'crypto';\n\nconst HTTP_PROXY_URL = \"http://tfproxy.chanjet.com\";\nconst FEI_E_YUN_HOST = \"http://api.feieyun.cn/Api/Open/\";\nconst FEI_E_YUN_USER = \"tplus@chanjet.com\";\nconst FEI_E_YUN_KEYS = \"nyktjQ9nVyY6BfIs\";\n\nclass API {\n constructor(props) { }\n\n //飞蛾参数加密\n shaEncrypt = (originalText) => {\n let password = \"\";\n let md5 = crypto.createHash('sha1');\n md5.update(originalText);\n let data = md5.digest();\n for (let i = 0; i < data.length; i++) {\n\n let v = data[i] & 0xFF;\n let hv = v.toString(16);\n if (hv.length < 2) {\n password = password + 0;\n }\n password = password + hv;\n }\n return password;\n }\n\n //获取枚举列表信息\n async getDataSource(params) {\n const { dataSource } = params;\n const data = await tApi({ BizCode: params.bizCode }, dataSource, false, false);\n return data;\n }\n\n //获取打印数据\n async getPrintDataInfo(Id) {\n const data = await tApi({ id:Id }, 'chanjet.RE.INewRetail.FindById', false, false);\n return data;\n }\n\n //获取当前门店硬件配置信息\n async GetPrintInfomation(dto) {\n let param={};\n param.Idstore=dto.Idstore;\n param.POSCode=dto.POSCode;\n \n const data = await tApi({ param: JSON.stringify(param) }, 'chanjet.RE.NewPos.GetPrintInfomation', false, false);\n return data;\n }\n\n //获取日结打印数据\n async getDialyPrintDataInfo(Id) {\n const data = await tApi({ id:Id }, 'Ufida.T.RE.Interface.IDailyDetail.FindById', false, false);\n return data;\n }\n\n //获取交班打印数据\n async getDutyPrintDataInfo(Id) {\n const data = await tApi({ id:Id }, 'Ufida.T.RE.IShiftVoucher.FindById', false, false);\n return data;\n } \n\n //获取储值打印数据\n async getStoragePrintDataInfo(Id) {\n const data = await tApi({ id:Id }, 'Ufida.T.ME.Interface.IMemberStorage.FindById', false, false);\n return data;\n }\n\n // 小票打印-获取状态信息。类似{\"msg\":\"ok\",\"ret\":0,\"data\":\"\\u79bb\\u7ebf\\u3002\",\"serverExecutedTime\":5}\n async openQueryPrinterStatus(params) {\n let ts = Math.round(new Date().getTime() / 1000).toString();\n let dt = [\n `sig=${this.shaEncrypt(FEI_E_YUN_USER + FEI_E_YUN_KEYS + ts)}`,\n `apiname=${params.apiname}`,\n `debug=0`,\n `stime=${ts}`,\n `sn=${params.deviceCode}`,\n `user=${FEI_E_YUN_USER}`\n ]\n dt = dt.join('&');\n const options = {\n method: 'POST',\n headers: { 'Content-Type': 'application/x-www-form-urlencoded' },\n data: dt,\n url: `${HTTP_PROXY_URL}?url=${FEI_E_YUN_HOST}`,\n };\n return api(options);\n }\n\n // 小票打印-云打印\n async openPrinterAddlist(params) {\n let ts = Math.round(new Date().getTime() / 1000).toString();\n let dt = [\n `printerContent=${params.printerContent}`,\n `user=${FEI_E_YUN_USER}`,\n `stime=${ts}`,\n `sig=${this.shaEncrypt(FEI_E_YUN_USER + FEI_E_YUN_KEYS + ts)}`,\n `apiname=${params.apiname}`,\n `debug=0`\n ]\n dt = dt.join('&');\n const options = {\n method: 'POST',\n headers: { 'Content-Type': 'application/x-www-form-urlencoded' },\n data: dt,\n url: `${HTTP_PROXY_URL}?url=${FEI_E_YUN_HOST}`,\n };\n return api(options);\n }\n\n // 小票打印-发出打印指令\n async openPrintMsg(params) {\n let ts = Math.round(new Date().getTime() / 1000).toString();\n let dt = [\n `content=${params.content}`,\n `printerContent=${params.printerContent}`,\n `user=${FEI_E_YUN_USER}`,\n `stime=${ts}`,\n `sig=${this.shaEncrypt(FEI_E_YUN_USER + FEI_E_YUN_KEYS + ts)}`,\n `apiname=${params.apiname}`,\n `debug=0`,\n `sn=${params.deviceCode}`,\n `times=${params.times}` //打印次数\n ]\n dt = dt.join('&');\n const options = {\n method: 'POST',\n headers: { 'Content-Type': 'application/x-www-form-urlencoded' },\n data: dt,\n url: `${HTTP_PROXY_URL}?url=${FEI_E_YUN_HOST}`,\n };\n return api(options);\n }\n}\nexport default new API;\n"]}
|