Browse Source

字体文件换下载服务器

TonyKang 5 years ago
parent
commit
41433bcb5d
1 changed files with 8 additions and 6 deletions
  1. 8 6
      app/public/report/js/rpt_main.js

+ 8 - 6
app/public/report/js/rpt_main.js

@@ -602,8 +602,10 @@ let rptControlObj = {
         //这里尝试下异步加载字体文件
         let me = rptControlObj;
         me.isLoading = true;
-        dynamicLoadJs('/public/jspdf/SmartSimsun-normal.js',"normal", me.getPdfFontCallbackLight);
-        dynamicLoadJs('/public/jspdf/SmartSimsun-bold.js',"bold", me.getPdfFontCallbackLight);
+        // dynamicLoadJs('/public/jspdf/SmartSimsun-normal.js', 'normal', me.getPdfFontCallbackLight);
+        // dynamicLoadJs('/public/jspdf/SmartSimsun-bold.js', 'bold', me.getPdfFontCallbackLight);
+        dynamicLoadJs('https://d2.smartcost.com.cn/cach/SmartSimsun-normal.js', 'normal', me.getPdfFontCallbackLight);
+        dynamicLoadJs('https://d2.smartcost.com.cn/cach/SmartSimsun-bold.js', 'bold', me.getPdfFontCallbackLight);
     },
     getPDFPre: function () {
         let me = rptControlObj;
@@ -616,10 +618,10 @@ let rptControlObj = {
                 me.getPDFEx();
             } else {
                 $.bootstrapLoading.start();
-                dynamicLoadJs('/public/jspdf/SmartSimsun-normal.js',"normal", me.getPdfFontCallback);
-                dynamicLoadJs('/public/jspdf/SmartSimsun-bold.js',"bold", me.getPdfFontCallback);
-                // dynamicLoadJs('http://d2.smartcost.com.cn/cach/SmartSimsun-normal.js', "normal", me.getPdfFontCallback('normal'));
-                // dynamicLoadJs('http://d2.smartcost.com.cn/cach/SmartSimsun-bold.js', "normal", me.getPdfFontCallback('bold'));
+                // dynamicLoadJs('/public/jspdf/SmartSimsun-normal.js',"normal", me.getPdfFontCallback);
+                // dynamicLoadJs('/public/jspdf/SmartSimsun-bold.js',"bold", me.getPdfFontCallback);
+                dynamicLoadJs('https://d2.smartcost.com.cn/cach/SmartSimsun-normal.js', 'normal', me.getPdfFontCallback);
+                dynamicLoadJs('https://d2.smartcost.com.cn/cach/SmartSimsun-bold.js', 'bold', me.getPdfFontCallback);
             }
         }
     },