Explorar o código

fix: 首页可视化链接及bug

wzyyy %!s(int64=3) %!d(string=hai) anos
pai
achega
c33f3e479e

BIN=BIN
public/images/view-logo.png


+ 5 - 1
src/pages/account/Center/index.tsx

@@ -70,7 +70,11 @@ const Center = () => {
       if (!isJpgOrPng) {
         message.error('请上传.png.jpg格式的文件');
       }
-      return isJpgOrPng;
+      const isSize = file.size / 1024 / 1024 < 4;
+      if (!isSize) {
+        message.error(`图片大小必须小于4M`);
+      }
+      return isJpgOrPng && isSize;
     },
     onChange(info) {
       if (info.file.status === 'uploading') {

+ 1 - 1
src/pages/system/Menu/Detail/index.tsx

@@ -69,7 +69,7 @@ export default () => {
         setTabKey(key);
       }}
     >
-      {tabKey === 'detail' ? (
+      {tabKey === 'detail' && data ? (
         <BaseDetail
           data={{
             ...data,

+ 1 - 0
src/pages/system/Menu/components/permission.tsx

@@ -148,6 +148,7 @@ export default (props: PermissionType) => {
   };
 
   useEffect(() => {
+    console.log(props.value, 3333333);
     checkKeysRef.clear();
   }, []);
 

+ 14 - 0
src/pages/system/User/index.tsx

@@ -37,6 +37,13 @@ const User = observer(() => {
   };
 
   const [reset, setReset] = useState<boolean>(false);
+
+  const typeMap = new Map();
+  typeMap.set('1', 'red');
+  typeMap.set('2', 'gold');
+  typeMap.set('3', 'blue');
+  typeMap.set('4', 'purple');
+
   const columns: ProColumns<UserItem>[] = [
     {
       title: intl.formatMessage({
@@ -84,6 +91,13 @@ const User = observer(() => {
       },
       hideInSearch: false,
     },
+    // {
+    //   title: '用户类型',
+    //   dataIndex: 'type',
+    //   render: (_, record) => (
+    //     <Tag color={typeMap.get('name')}>{record.name}</Tag>
+    //   ),
+    // },
     {
       title: intl.formatMessage({
         id: 'pages.searchTable.titleStatus',

+ 45 - 0
src/pages/user/Login/index.less

@@ -33,6 +33,7 @@
       display: flex;
       flex-direction: row-reverse;
       justify-content: center;
+      padding: 0 0 15% 0;
 
       .top {
         width: 100%;
@@ -167,6 +168,50 @@
   }
 }
 
+.bottom {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-content: center;
+  height: 11%;
+  border-top: 1px solid #e0e4e8;
+
+  .view {
+    width: 247px;
+    height: 20px;
+    margin-right: 10%;
+    margin-bottom: 10px;
+    padding-top: 2px;
+    color: rgba(0, 0, 0, 0.65);
+    font-size: 14px;
+    font-family: 'PingFang SC';
+  }
+
+  .url {
+    display: flex;
+    align-items: center;
+    margin-right: 10%;
+
+    img {
+      width: 100%;
+      height: 100%;
+    }
+
+    a {
+      position: relative;
+      left: 60px;
+      display: flex;
+      flex-direction: row;
+      align-items: center;
+      justify-content: center;
+      padding: 2px 7px;
+      line-height: 20px;
+      border: 1px solid #2f54eb;
+      border-radius: 2px;
+    }
+  }
+}
+
 @media (min-width: @screen-md-min) {
   .container {
     //background-image: url('https://gw.alipayobjects.com/zos/rmsportal/TVYTbAXWheQpRcWDaDMu.svg');

+ 12 - 3
src/pages/user/Login/index.tsx

@@ -13,7 +13,6 @@ import { useModel } from '@@/plugin-model/useModel';
 import SystemConst from '@/utils/const';
 import { useIntl } from '@@/plugin-locale/localeExports';
 import { SelectLang } from '@@/plugin-locale/SelectLang';
-import Footer from '@/components/Footer';
 import { isNoCommunity } from '@/utils/util';
 
 const Login: React.FC = () => {
@@ -28,6 +27,7 @@ const Login: React.FC = () => {
   iconMap.set('wechat-webapp', require('/public/images/bind/wechat-webapp.png'));
 
   const defaultImg = require('/public/images/apply/provider1.png');
+  const viewLogo = require('/public/images/view-logo.png');
 
   const fetchUserInfo = async () => {
     const userInfo = (await initialState?.fetchUserInfo?.()) as UserInfo;
@@ -301,8 +301,17 @@ const Login: React.FC = () => {
               </div>
             </div>
           </div>
-          <div>
-            <Footer />
+
+          <div className={styles.bottom}>
+            <div className={styles.view}>JETLINKS团队全新力作可视化大屏系统</div>
+            <div className={styles.url}>
+              <div style={{ height: 33 }}>
+                <img src={viewLogo} />
+              </div>
+              <a href={'http://47.108.170.157:9010/'} target="_blank" rel="noopener noreferrer">
+                体验DEMO
+              </a>
+            </div>
           </div>
         </div>
         <div className={styles.right}>