From e64547f205942c8947feab1cd42f198f02199360 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 16 九月 2022 10:24:30 +0800
Subject: [PATCH] 2022-09-16

---
 src/menu/stylecontroller/index.jsx |    4 ++--
 src/utils/utils-custom.js          |   11 ++++++-----
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/src/menu/stylecontroller/index.jsx b/src/menu/stylecontroller/index.jsx
index 8d96cee..02ffba0 100644
--- a/src/menu/stylecontroller/index.jsx
+++ b/src/menu/stylecontroller/index.jsx
@@ -298,7 +298,7 @@
    * @description 淇敼鑳屾櫙浣嶇疆
    */
   changeBackgroundPositon= (val) => {
-    this.updateStyle({backgroundPositon: val})
+    this.updateStyle({backgroundPosition: val})
   }
 
   /**
@@ -659,7 +659,7 @@
                     label="浣嶇疆"
                     labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 20 }} }
                   >
-                    <Select defaultValue={card.backgroundPositon || 'center'} onChange={this.changeBackgroundPositon}>
+                    <Select defaultValue={card.backgroundPosition || 'center'} onChange={this.changeBackgroundPositon}>
                       <Option value="center">center</Option>
                       <Option value="top">top</Option>
                       <Option value="bottom">bottom</Option>
diff --git a/src/utils/utils-custom.js b/src/utils/utils-custom.js
index 630ecc0..eca6187 100644
--- a/src/utils/utils-custom.js
+++ b/src/utils/utils-custom.js
@@ -954,9 +954,11 @@
  */
 export function resetStyle (style) {
   if (!style) return {}
-  if (sessionStorage.getItem('appType') === 'mob') {
-    let _style = JSON.stringify(style)
 
+  let _style = JSON.stringify(style)
+  _style = _style.replace(/@mywebsite@\//ig, window.GLOB.baseurl)
+
+  if (sessionStorage.getItem('appType') === 'mob') {
     // scaleview
     _style = _style.replace(/\d+vw/ig, (word) => {
       return parseFloat(word) * (window.GLOB.winWidth || 420) / 100 + 'px'
@@ -965,8 +967,7 @@
       return parseFloat(word) * (window.GLOB.winHeight || 738) / 100 + 'px'
       // return parseFloat(word) * 615 / 100 + 'px'
     })
-
-    return JSON.parse(_style)
   }
-  return JSON.parse(JSON.stringify(style))
+  
+  return JSON.parse(_style)
 }
\ No newline at end of file

--
Gitblit v1.8.0