瀏覽代碼

bug 修复

lilei 3 年之前
父節點
當前提交
30acaa39d8
共有 1 個文件被更改,包括 12 次插入2 次删除
  1. 12 2
      src/libs/JGPrint.js

+ 12 - 2
src/libs/JGPrint.js

@@ -13,7 +13,12 @@ export const JGPrintTag = function (html, width, height, data) {
       okType: 'danger',
       cancelText: '暂不打印',
       onOk () {
-        window.open('http://www.lodop.net/demolist/CLodop_Setup_for_Win32NT.zip')
+        var agent = navigator.userAgent.toLowerCase();
+        if (agent.indexOf("win32") >= 0 || agent.indexOf("wow32") >= 0) {
+            window.open('http://www.lodop.net/demolist/CLodop_Setup_for_Win32NT.zip')
+        }else if (agent.indexOf("win64") >= 0 || agent.indexOf("wow64") >= 0) {
+            window.open('http://www.lodop.net/download/CLodop_Setup_for_Win64NT_4.155EN.zip')
+        }
       }
     })
     return
@@ -228,7 +233,12 @@ export const jGPrint = function (data, type, printerType) {
         okType: 'danger',
         cancelText: '暂不打印',
         onOk () {
-          window.open('http://www.lodop.net/demolist/CLodop_Setup_for_Win32NT.zip')
+          var agent = navigator.userAgent.toLowerCase();
+          if (agent.indexOf("win32") >= 0 || agent.indexOf("wow32") >= 0) {
+              window.open('http://www.lodop.net/demolist/CLodop_Setup_for_Win32NT.zip')
+          }else if (agent.indexOf("win64") >= 0 || agent.indexOf("wow64") >= 0) {
+              window.open('http://www.lodop.net/download/CLodop_Setup_for_Win64NT_4.155EN.zip')
+          }
         }
       })
       return