From a4466960bfd628036aa2b6f9aa706f75215482bc Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 21 五月 2024 10:10:39 +0800
Subject: [PATCH] 2024-05-21

---
 src/views/printTemplate/index.jsx |   13 ++++++++++++-
 src/views/menudesign/index.jsx    |   13 ++++++++++++-
 src/utils/utils.js                |   18 ------------------
 3 files changed, 24 insertions(+), 20 deletions(-)

diff --git a/src/utils/utils.js b/src/utils/utils.js
index 9d92c76..be865dc 100644
--- a/src/utils/utils.js
+++ b/src/utils/utils.js
@@ -854,24 +854,6 @@
   }
 
   /**
-   * @description 鑾峰彇浜戠鍥剧墖鐪熷疄璺緞
-   * @return {String}    url 鍥剧墖璺緞
-   */
-  static getcloudurl (url) {
-    if (!url) return ''
-    
-    let baseurl = ''
-    
-    if (window.GLOB.cloudServiceApi) {
-      baseurl = window.GLOB.cloudServiceApi.replace(/webapi(.*)$/, '')
-    } else {
-      baseurl = window.GLOB.baseurl
-    }
-
-    return url.match(/^http/) || url.match(/^\/\//) ? url : baseurl + url
-  }
-
-  /**
    * @description 鑾峰彇涓嬫媺鎼滅储鏌ヨ鏉′欢
    * @return {String} item   鎼滅储鏉′欢淇℃伅
    */
diff --git a/src/views/menudesign/index.jsx b/src/views/menudesign/index.jsx
index 400e163..ad11d1f 100644
--- a/src/views/menudesign/index.jsx
+++ b/src/views/menudesign/index.jsx
@@ -888,10 +888,21 @@
   
             Api.fileuploadbase64(param).then(result => {
               if (result.status) {
+                let url = result.Images
+                let baseurl = ''
+    
+                if (window.GLOB.cloudServiceApi) {
+                  baseurl = window.GLOB.cloudServiceApi.replace(/webapi(.*)$/, '')
+                } else {
+                  baseurl = window.GLOB.baseurl
+                }
+
+                url = url.match(/^http/) || url.match(/^\/\//) ? url : baseurl + url
+
                 Api.getCloudConfig({
                   func: 's_PrintTemplateMSub',
                   ID: config.uuid,
-                  Images: Utils.getcloudurl(result.Images),
+                  Images: url,
                   Remark: '',
                   temp_type: 'billprint',
                 }).then(response => {
diff --git a/src/views/printTemplate/index.jsx b/src/views/printTemplate/index.jsx
index dcb5d22..8f72e0c 100644
--- a/src/views/printTemplate/index.jsx
+++ b/src/views/printTemplate/index.jsx
@@ -831,7 +831,18 @@
         
         Api.fileuploadbase64(param).then(result => { // 鍥剧墖涓婁紶锛屽苟鑾峰彇鍥剧墖璺緞
           if (result.status) {
-            resolve(Utils.getcloudurl(result.Images))
+            let url = result.Images
+            let baseurl = ''
+
+            if (window.GLOB.cloudServiceApi) {
+              baseurl = window.GLOB.cloudServiceApi.replace(/webapi(.*)$/, '')
+            } else {
+              baseurl = window.GLOB.baseurl
+            }
+
+            url = url.match(/^http/) || url.match(/^\/\//) ? url : baseurl + url
+
+            resolve(url)
           } else {
             notification.warning({
               top: 92,

--
Gitblit v1.8.0