From 4abaf0d19247e262d58bdfdac2d1a6247648737c Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Sat, 13 Jul 2019 16:05:56 +0800 Subject: [PATCH] init --- .../src/modules/user/account/ChangeHeaderPicModal.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/public/react/src/modules/user/account/ChangeHeaderPicModal.js b/public/react/src/modules/user/account/ChangeHeaderPicModal.js index 997d99357..130a45b68 100644 --- a/public/react/src/modules/user/account/ChangeHeaderPicModal.js +++ b/public/react/src/modules/user/account/ChangeHeaderPicModal.js @@ -2,7 +2,7 @@ import React, { Component } from "react"; import { Modal } from "antd"; import axios from 'axios' import ModalWrapper from "../../courses/common/ModalWrapper" -import { Cropper } from 'educoder' +import { Cropper, getUrl } from 'educoder' const imageId = 'changeHeaderPic' const previewId = 'changeHeader_imagePreview' @@ -120,7 +120,8 @@ class ChangeHeaderPicModal extends Component{ render(){ const { course_lists } = this.state - const { moduleName } = this.props + const { moduleName, current_user } = this.props + const userHeaderImgUrl = `${getUrl()}/images/${current_user.image_url}` return(
-
+
+ {userHeaderImgUrl && } +
头像预览