king
2025-03-07 861192573a5fa59529d542201c210066f0ed3ca4
src/views/appcheck/index.jsx
@@ -1,4 +1,5 @@
import React, {Component} from 'react'
import { withRouter } from 'react-router-dom'
import { Spin, notification, Table, Typography, Row, Col, Tooltip } from 'antd'
import { QuestionCircleOutlined } from '@ant-design/icons'
@@ -21,12 +22,12 @@
  bg_black_style_yellow_green: {name: '黄绿色', color: '#a0d911'},
  bg_black_style_green: {name: '绿色', color: '#52c41a'},
  bg_black_style_cyan: {name: '青色', color: '#13c2c2'},
  bg_black_style_blue_purple: {name: '蓝紫色', color: '#2f54eb'},
  bg_black_style_blue_purple: {name: '蓝紫色', color: '#3860f4'},
  bg_black_style_purple: {name: '紫色', color: '#722ed1'},
  bg_black_style_magenta: {name: '洋红色', color: '#eb2f96'},
  bg_black_style_grass_green: {name: '草绿色', color: '#aeb303'},
  bg_black_style_deep_red: {name: '深红色', color: '#c32539'},
  bg_black_style_deep_blue: {name: '深红色', color: '#1d3661'}
  bg_black_style_deep_blue: {name: '深蓝色', color: '#1d3661'}
}
class AppCheck extends Component {
@@ -42,7 +43,17 @@
  UNSAFE_componentWillMount() {
    document.body.className = ''
    this.getAppList()
    if (sessionStorage.getItem('UserID')) {
      this.getAppList()
      return
    }
  }
  componentDidMount() {
    if (!sessionStorage.getItem('UserID')) {
      this.props.history.replace('/login')
      return
    }
  }
  /**
@@ -84,6 +95,10 @@
              }
              cell.copyright = _param.copyright || ''
              cell.logo = _param.logo || ''
              cell.wxAppId = _param.wxAppId || ''
              cell.wxAppName = _param.wxAppName || ''
              cell.wxMerchId = _param.wxMerchId || ''
              cell.wxMerchName = _param.wxMerchName || ''
            }
            return cell
@@ -134,6 +149,8 @@
  render () {
    const { loading, columns, applist, selectApp } = this.state
    if (!sessionStorage.getItem('UserID')) return null
    return (
      <div className="mk-app-check">
@@ -193,6 +210,10 @@
                    </Col>
                    <Col span={12}>
                      <div className="app-item">
                        {item.wxAppName || item.wxMerchName ? <>
                          <div className="label">关联应用:</div>
                          <div className="content">{`${item.wxAppName}${item.wxAppName && item.wxMerchName ? ' / ' + item.wxMerchName : item.wxMerchName || ''}`}</div>
                        </> : null}
                      </div>
                    </Col>
                    <Col span={12}>
@@ -226,19 +247,19 @@
                    </Col>
                    <Col span={12}>
                      <div className="app-item">
                        <div className="label">版权:</div>
                        <div className="content">{item.copyright || '无'}</div>
                        <div className="label">应用名称:</div>
                        <div className="content">{item.app_name || ''}</div>
                      </div>
                    </Col>
                    <Col span={12}>
                      <div className="app-item">
                        <div className="label">LOGO:</div>
                        <div className="content">{item.logo ? <img style={{height: '18px'}} src={item.logo} alt="" /> : '无'}</div>
                        <div className="content">{item.app_icon ? <img style={{height: '18px'}} src={item.app_icon} alt="" /> : '无'}</div>
                      </div>
                    </Col>
                  </Row>
                  <div className="action">
                    <Paragraph style={{display: 'inline-block', margin: 0}} copyable={{ text: `${window.GLOB.baseurl}${item.typename === 'pad' ? 'mob' : item.typename}/index.html#/index/${this.state.selectApp.kei_no}/${item.typename !== 'pc' ? item.typename + '/' : ''}${item.lang}` }}></Paragraph>
                    <Paragraph style={{display: 'inline-block', margin: 0}} copyable={{ text: `${window.GLOB.baseurl}${item.typename === 'pad' ? 'mob' : item.typename}/index.html#/index/${this.state.selectApp.kei_no}/${item.typename !== 'pc' ? item.typename + '/' : ''}${item.lang}${item.wxAppId ? '/' + item.wxAppId : ''}` }}></Paragraph>
                  </div>
                </div>
              )
@@ -250,4 +271,4 @@
  }
}
export default AppCheck
export default withRouter(AppCheck)