#
luxiaotao1123
2024-02-27 8891516476a779d7cb720880a8de9f816e8a998e
#
1个文件已修改
1个文件已添加
22 ■■■■■ 已修改文件
zy-asrs-flow/public/img/defaultAva.png 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-flow/src/pages/account/setting/components/base.jsx 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-flow/public/img/defaultAva.png
zy-asrs-flow/src/pages/account/setting/components/base.jsx
@@ -11,10 +11,9 @@
import { Button, Input, message, Upload } from 'antd';
import React from 'react';
import useStyles from './index.style';
import Http from '@/utils/http';
const queryCurrent = () => {
}
import defaultAvat from '/public/img/defaultAva.png'
const validatorPhone = (rule, value, callback) => {
  if (!value[0]) {
@@ -29,7 +28,6 @@
const BaseView = () => {
  const { styles } = useStyles();
  // 头像组件 方便以后独立,增加裁剪之类的功能
  const AvatarView = ({ avatar }) => (
    <>
      <div className={styles.avatar_title}>头像</div>
@@ -38,14 +36,20 @@
      </div>
      <Upload showUploadList={false}>
        <div className={styles.button_view}>
          <Button>
          {/* <Button>
            <UploadOutlined />
            更换头像
          </Button>
          </Button> */}
        </div>
      </Upload>
    </>
  );
  const queryCurrent = async () => {
    await Http.doGet('api/auth/user');
  }
  const { data: currentUser, loading } = useRequest(() => {
    return queryCurrent();
@@ -56,16 +60,16 @@
      if (currentUser.avatar) {
        return currentUser.avatar;
      }
      const url = 'https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png';
      const url = { defaultAvat };
      return url;
    }
    return '';
    return defaultAvat;
  };
  const handleFinish = async () => {
    message.success('更新基本信息成功');
  };
  return (
    <div className={styles.baseView}>
      {loading ? null : (