Forráskód Böngészése

组件样式修改

xujunjie 2 éve
szülő
commit
5f36b78f78

+ 22 - 22
src/components/DDComponents/DDCode/index.js

@@ -11,30 +11,30 @@ function DDCode(props) {
     currentUser: { DingUserId },
   } = props;
   const [loading, setLoading] = useState(false);
-  const [time, setTime] = useState(0);
+  // const [time, setTime] = useState(0);
 
-  const queryCode = async () => {
-    setLoading(true);
-    // TODO 查询接口获得code
+  // const queryCode = async () => {
+  //   setLoading(true);
+  //   // TODO 查询接口获得code
 
-    setLoading(false);
-    clearInterval(timer);
-    onChange({
-      code: '',
-    });
-    let second = 60 * 5;
-    if (second <= 0) return;
-    setTime(second);
+  //   setLoading(false);
+  //   clearInterval(timer);
+  //   onChange({
+  //     code: '',
+  //   });
+  //   let second = 60 * 5;
+  //   if (second <= 0) return;
+  //   setTime(second);
 
-    timer = setInterval(() => {
-      setTime(time => {
-        if (time > 0) {
-          return time--;
-        }
-        return time;
-      });
-    }, second * 1000);
-  };
+  //   timer = setInterval(() => {
+  //     setTime(time => {
+  //       if (time > 0) {
+  //         return time--;
+  //       }
+  //       return time;
+  //     });
+  //   }, second * 1000);
+  // };
   if (!DingUserId) return <div>未知用户,请联系管理员。</div>;
   return (
     <div>
@@ -47,7 +47,7 @@ function DDCode(props) {
       ) : (
         <Spin spinning={loading}>
           <QRCode size={128} value={`http://47.96.12.136:8896/#/bom/dd-login/${DingUserId}`} />
-          请使用钉钉扫码授权<a onClick={queryCode}>刷新</a>
+          请使用钉钉扫码授权
         </Spin>
       )}
     </div>

+ 2 - 1
src/components/DDComponents/index.js

@@ -97,7 +97,8 @@ export default function DDComponents(props) {
       break;
     case 'DDAttachment': //附件
       // component = <DDAttachment />
-      component = '附件控件未渲染!'
+      // component = '附件控件未渲染!'
+      console.info('附件控件未渲染!');
       break;
     case 'InnerContactField': //联系人控件
       component = <InnerContactField onChange={onChange}></InnerContactField>;

+ 1 - 1
src/pages/DDLogin/index.js

@@ -49,7 +49,7 @@ function DDLogin(props) {
         <>
           <CheckOutlined style={{ fontSize: 40, color: '#52c41a' }} />
           <div>授权成功</div>
-          <div>{info}</div>
+          {/* <div>{info}</div> */}
         </>
       ) : (
         <>