浏览代码

不调主题色

liudan 3 周之前
父节点
当前提交
2c514b8a29
共有 1 个文件被更改,包括 8 次插入8 次删除
  1. 8 8
      src/pages/home/Index.jsx

+ 8 - 8
src/pages/home/Index.jsx

@@ -342,18 +342,18 @@ class Home extends React.Component {
   // 改变颜色
   changeSwitch = () => {
     let { colorName } = this.state;
-    if (!colorName) {
-      colorName = 'white-bg';
-    } else if (colorName == 'white-bg') {
-      colorName = 'dark-bg';
-    } else {
-      colorName = '';
-    }
+    // if (!colorName) {
+    //   colorName = 'white-bg';
+    // } else if (colorName == 'white-bg') {
+    //   colorName = 'dark-bg';
+    // } else {
+    //   colorName = '';
+    // }
     this.setState({
       // colorName,
       isGm: !this.state.isGm,
     });
-    localStorage.setItem('ZZJ-color', colorName);
+    // localStorage.setItem('ZZJ-color', colorName);
   };
   openLogin = (cache) => {
     if (!cache) {