king
2024-08-07 fcb123b694b9766016a562d7946d57155330fffa
src/views/login/loginform.jsx
@@ -39,6 +39,7 @@
    verdisabled: false,
    hasScan: false,
    timeout: false,
    vispwd: window.GLOB.vispwd,
    wayLabels: {},
    dict: window.GLOB.dict,
    users: [],
@@ -102,14 +103,14 @@
      users = []
    }
    if (users[0]) {
    if (users[0] && activeKey === 'uname_pwd') {
      _user = users[0]
    }
    this.setState({
      users: users,
      username: activeKey === 'uname_pwd' && _user ? _user.username : '',
      password: activeKey === 'uname_pwd' && _user ? _user.password : '',
      username: _user ? _user.username : '',
      password: _user ? _user.password : '',
      smsId: smsId,
      loginWays: _loginWays,
      activeKey,
@@ -441,7 +442,7 @@
  render() {
    const { langList } = this.props
    const { getFieldDecorator } = this.props.form
    const { activeKey, verdisabled, delay, loginWays, remember, scanId, timeout, hasScan, users, wayLabels, dict, lang } = this.state
    const { activeKey, verdisabled, delay, loginWays, remember, scanId, timeout, hasScan, users, wayLabels, dict, lang, vispwd } = this.state
    return (
      <Form className="login-form" id="login-form" onSubmit={this.handleSubmit}>
@@ -482,7 +483,7 @@
                  message: dict['password_required'] || '请输入密码',
                }
              ]
            })(<Input.Password placeholder={dict['password'] || '密码'} prefix={<LockOutlined style={{ color: 'rgba(0,0,0,.25)' }} />} />)}
            })(<Input.Password placeholder={dict['password'] || '密码'} visibilityToggle={vispwd} prefix={<LockOutlined style={{ color: 'rgba(0,0,0,.25)' }} />} />)}
          </Form.Item>
          {window.GLOB.keepKey ? <Form.Item className="minline">
            {getFieldDecorator('remember', {