|
@@ -1276,11 +1276,11 @@ function openWebSocket() {
|
|
//无法使用wss,浏览器打开WebSocket时报错
|
|
//无法使用wss,浏览器打开WebSocket时报错
|
|
//ws对应http、wss对应https。
|
|
//ws对应http、wss对应https。
|
|
//kmall测试环境
|
|
//kmall测试环境
|
|
- // webSocket = new WebSocket("ws://183.62.225.124:8080/ws/server/"+storeId);
|
|
|
|
|
|
+ webSocket = new WebSocket("ws://183.62.225.124:8080/ws/server/"+storeId);
|
|
//kmall正式环境
|
|
//kmall正式环境
|
|
// webSocket = new WebSocket("ws://8.135.102.238:8080//ws/server/"+storeId);
|
|
// webSocket = new WebSocket("ws://8.135.102.238:8080//ws/server/"+storeId);
|
|
//kmall本地环境
|
|
//kmall本地环境
|
|
- webSocket = new WebSocket("ws://127.0.0.1:9090//ws/server/"+163);
|
|
|
|
|
|
+ // webSocket = new WebSocket("ws://127.0.0.1:9090//ws/server/"+163);
|
|
// webSocket = new WebSocket("wss://cb.k1net.cn/ws/server/"+storeId);
|
|
// webSocket = new WebSocket("wss://cb.k1net.cn/ws/server/"+storeId);
|
|
if (webSocket.readyState === webSocket.CONNECTING) {
|
|
if (webSocket.readyState === webSocket.CONNECTING) {
|
|
console.log('1.连接正在打开......');
|
|
console.log('1.连接正在打开......');
|
|
@@ -1519,6 +1519,22 @@ function getPrintContentOrder(ticket) {
|
|
content += "关注CW大药房客服号,获取更多优惠信息"
|
|
content += "关注CW大药房客服号,获取更多优惠信息"
|
|
content += "</div>";
|
|
content += "</div>";
|
|
content += "<div style=\"width: 100%;overflow:hidden;white-space: nowrap;\">--------------------------------------------------</div>";
|
|
content += "<div style=\"width: 100%;overflow:hidden;white-space: nowrap;\">--------------------------------------------------</div>";
|
|
|
|
+
|
|
|
|
+ // var strategies = {
|
|
|
|
+ // "best": function(data){
|
|
|
|
+ // return render_of_best(data);
|
|
|
|
+ // },
|
|
|
|
+ // "yto": function(data){
|
|
|
|
+ // return render_of_yto(data);
|
|
|
|
+ // }
|
|
|
|
+ // };
|
|
|
|
+ //
|
|
|
|
+ // var renderMailInfo = function(exprCode, data){
|
|
|
|
+ // return strategies[exprCode](data);
|
|
|
|
+ // };
|
|
|
|
+ //
|
|
|
|
+ // renderMailInfo('best', ticket);
|
|
|
|
+
|
|
// 面单打印
|
|
// 面单打印
|
|
content += `
|
|
content += `
|
|
<div style="width: 100%; height: 82px; border: 1px solid black;">
|
|
<div style="width: 100%; height: 82px; border: 1px solid black;">
|
|
@@ -1529,7 +1545,7 @@ function getPrintContentOrder(ticket) {
|
|
|
|
|
|
<!-- 面单条码 -->
|
|
<!-- 面单条码 -->
|
|
<div style="width: 100%;height: 98px; border-width: 0 1px 1px 1px; border-style: solid; border-color: black;">
|
|
<div style="width: 100%;height: 98px; border-width: 0 1px 1px 1px; border-style: solid; border-color: black;">
|
|
- <div style="width: 200px; height: 78px; overflow: hidden;">
|
|
|
|
|
|
+ <div style="width: 200px; height: 88px; overflow: hidden;">
|
|
<img src='data:image/png;base64,${ticket.ticketMailInfo.exprNoBase64Img}' style='max-width:199px;' />
|
|
<img src='data:image/png;base64,${ticket.ticketMailInfo.exprNoBase64Img}' style='max-width:199px;' />
|
|
</div>
|
|
</div>
|
|
|
|
|
|
@@ -1562,7 +1578,7 @@ function getPrintContentOrder(ticket) {
|
|
</div>
|
|
</div>
|
|
`;
|
|
`;
|
|
let box = "<div style='width: 100%; position: relative;'>";
|
|
let box = "<div style='width: 100%; position: relative;'>";
|
|
- for (var i = 0;i < ticket.goods.length; i++){
|
|
|
|
|
|
+ for (let i = 0;i < ticket.goods.length; i++){
|
|
let topBorder = 0, bottomBorder = 0;
|
|
let topBorder = 0, bottomBorder = 0;
|
|
// if (i === 0) {
|
|
// if (i === 0) {
|
|
// topBorder = "1px";
|
|
// topBorder = "1px";
|