king
2024-03-28 6cf3812e28b35290a521001a3bc866a9eee8bc89
2024-03-28
2个文件已修改
1个文件已添加
67 ■■■■ 已修改文件
src/assets/img/wx-icon.png 补丁 | 查看 | 原始文档 | blame | 历史
src/components/header/index.jsx 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/header/index.scss 35 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/img/wx-icon.png
src/components/header/index.jsx
@@ -10,6 +10,7 @@
import MKEmitter from '@/utils/events.js'
import Utils from '@/utils/utils.js'
import avatar from '@/assets/img/avatar.jpg'
import wxicon from '@/assets/img/wx-icon.png'
import './index.scss'
const { confirm } = Modal
@@ -24,6 +25,7 @@
    userName: '',
    fullName: '',
    logourl: window.GLOB.mainlogo,
    wxVisible: false,
    loginVisible: false,
    loginLoading: false,
    avatar: Utils.getrealurl(sessionStorage.getItem('avatar')),
@@ -595,14 +597,6 @@
    })
  }
  wxnotice = () => {
    Modal.success({
      className: 'mk-wx-notice',
      title: <QrCode card={{qrWidth: 320, color: '#000000'}} value={window.GLOB.baseurl + 'mob/wxnotice.html?userid=' + sessionStorage.getItem('UserID') + '&loginuid=' + sessionStorage.getItem('LoginUID')}/>,
      okText: '关闭'
    })
  }
  changeToHome = () => {
    if (!['linkage', 'menu_board'].includes(window.GLOB.navBar)) return
@@ -629,7 +623,7 @@
        <Menu.Item key="verup" onClick={this.verup}>
          页面更新
        </Menu.Item>
        {window.GLOB.WXNotice ? <Menu.Item key="wxnotice" onClick={this.wxnotice}>
        {window.GLOB.WXNotice ? <Menu.Item key="wxnotice" onClick={() => this.setState({wxVisible: true})}>
          微信消息
        </Menu.Item> : null}
        {window.GLOB.appVersion ? <Menu.Item key="version" onClick={this.about}>
@@ -802,6 +796,26 @@
        </Modal>
        {/* 修改密码 */}
        <Resetpwd />
        {/* 微信消息 */}
        <Modal
          wrapClassName="mk-wx-sms-modal"
          visible={this.state.wxVisible}
          title="扫码关注  接收消息"
          width={400}
          centered={true}
          onCancel={() => this.setState({wxVisible: false})}
          footer={null}
          destroyOnClose
        >
          <div className="wx-sms-wrap">
            <QrCode card={{qrWidth: 200, color: '#000000'}} value={window.GLOB.baseurl + 'mob/wxnotice.html?userid=' + sessionStorage.getItem('UserID') + '&loginuid=' + sessionStorage.getItem('LoginUID')}/>
            <div className="tip">
              <img src={wxicon} alt=""/>
              <span>微信扫码</span>
              <span>关注公众号</span>
            </div>
          </div>
        </Modal>
      </header>
    )
  }
src/components/header/index.scss
@@ -276,17 +276,34 @@
  }
}
.mk-wx-notice {
  top: 100px!important;
  .anticon-check-circle {
    display: none;
  }
  .ant-modal-confirm-title {
.mk-wx-sms-modal {
  .ant-modal-title {
    text-align: center;
    min-height: 320px;
    font-size: 22px;
    font-weight: 500;
    color: #151515;
    margin-top: 15px;
    letter-spacing: 2px;
  }
  .ant-modal-confirm-btns {
    float: none!important;
  .wx-sms-wrap {
    text-align: center;
    .tip {
      margin: 15px;
      img {
        width: 24px;
        margin-right: 10px;
      }
      span {
        font-size: 16px;
        letter-spacing: 2px;
        font-weight: 500;
        color: #333;
      }
      span + span {
        color: #45B449;
        font-weight: bold;
      }
    }
  }
}