SecurityView.js 1.47 KB
Newer Older
陈帅's avatar
陈帅 committed
1 2 3 4 5 6 7 8 9
import React, { Component, Fragment } from 'react';
import { List } from 'antd';

const passwordStrength = {
  strong: <font className="strong"></font>,
  medium: <font className="medium">中文</font>,
  weak: <font className="weak"></font>,
};

ddcat1115's avatar
ddcat1115 committed
10
export default class SecurityView extends Component {
陈帅's avatar
陈帅 committed
11 12 13 14
  getData = () => {
    return [
      {
        title: '账户密码',
jim's avatar
jim committed
15
        description: <Fragment> 当前密码强度{passwordStrength.strong}</Fragment>,
陈帅's avatar
陈帅 committed
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
        actions: [<a>修改</a>],
      },
      {
        title: '密保手机',
        description: '已绑定手机:138****8293',
        actions: [<a>修改</a>],
      },
      {
        title: '密保问题',
        description: '未设置密保问题,密保问题可有效保护账户安全',
        actions: [<a>设置</a>],
      },
      {
        title: '备用邮箱',
        description: '已绑定邮箱:ant***sign.com',
        actions: [<a>修改</a>],
      },
      {
        title: 'MFA 设备',
        description: '未绑定 MFA 设备,绑定后,可以进行二次确认',
        actions: [<a>绑定</a>],
      },
    ];
  };
陈帅's avatar
陈帅 committed
40

陈帅's avatar
陈帅 committed
41 42 43 44 45 46 47 48
  render() {
    return (
      <Fragment>
        <List
          itemLayout="horizontal"
          dataSource={this.getData()}
          renderItem={item => (
            <List.Item actions={item.actions}>
jim's avatar
jim committed
49
              <List.Item.Meta title={item.title} description={item.description} />
陈帅's avatar
陈帅 committed
50 51 52 53 54 55 56
            </List.Item>
          )}
        />
      </Fragment>
    );
  }
}