From b23db4e1b9e8bc813b4b3b95d35552e5e2e980c6 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 01 二月 2021 18:51:00 +0800
Subject: [PATCH] 2021-02-01

---
 src/menu/components/share/usercomponent/index.jsx |   16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/src/menu/components/share/usercomponent/index.jsx b/src/menu/components/share/usercomponent/index.jsx
index cff1df6..946ae0f 100644
--- a/src/menu/components/share/usercomponent/index.jsx
+++ b/src/menu/components/share/usercomponent/index.jsx
@@ -6,6 +6,7 @@
 
 import Api from '@/api'
 import Utils from '@/utils/utils.js'
+import options from '@/store/options.js'
 import zhCN from '@/locales/zh-CN/model.js'
 import enUS from '@/locales/en-US/model.js'
 import UserForm from './settingform'
@@ -54,6 +55,8 @@
     _config.cols = config.cols || []
     _config.plot = config.plot || {}
     _config.html = config.html || ''
+    _config.css = config.css || ''
+    _config.js = config.js || ''
 
     _config.width = _config.wrap.width || _config.plot.width || config.width || 24
 
@@ -145,8 +148,17 @@
       setTimeout(() => {
         let template = this.getUserComponent()
         html2canvas(document.getElementById(config.uuid)).then(canvas => {
-          let img = canvas.toDataURL('image/png') // 鑾峰彇鐢熸垚鐨勫浘鐗�
-          Api.fileuploadbase64(img, 'cloud').then(result => {
+          let param = {
+            Base64Img: canvas.toDataURL('image/png') // 鑾峰彇鐢熸垚鐨勫浘鐗�
+          }
+
+          if (options.cloudServiceApi) {
+            param.rduri = options.cloudServiceApi
+            param.userid = sessionStorage.getItem('CloudUserID') || ''
+            param.LoginUID = sessionStorage.getItem('CloudLoginUID') || ''
+          }
+
+          Api.fileuploadbase64(param).then(result => {
             if (result.status) {
               Api.getSystemConfig({
                 func: 's_custom_components_adduptdel',

--
Gitblit v1.8.0