杨树林 5 years ago
commit d5f10bef11

@ -224,7 +224,12 @@ class App extends Component {
componentDidMount() { componentDidMount() {
// force an update if the URL changes // force an update if the URL changes
history.listen(() => this.forceUpdate()); history.listen(() => {
this.forceUpdate()
const $ = window.$
// https://www.trustie.net/issues/21919 可能会有问题
$("html").animate({ scrollTop: $('html').scrollTop() - 0 })
});
initAxiosInterceptors(this.props) initAxiosInterceptors(this.props)

@ -6,27 +6,8 @@ const $ = window.$
let _url_origin = getUrl2() let _url_origin = getUrl2()
// let _url_origin = `http://47.96.87.25:48080`; // let _url_origin = `http://47.96.87.25:48080`;
if (!window.Cropper) {
$.ajaxSetup({
cache: true
});
$('head').append($('<link rel="stylesheet" type="text/css" />')
.attr('href', `${_url_origin}/react/public/js/cropper/cropper.min.css`));
$.getScript(
`${_url_origin}/react/public/js/cropper/cropper.js`,
(data, textStatus, jqxhr) => {
});
$.getScript(
`${_url_origin}/react/public/js/cropper/html2canvas.min.js`,
(data, textStatus, jqxhr) => {
});
}
function save_avatar(){ function save_avatar(){
// if($(img_lg).html().trim() == ""){ // if($(img_lg).html().trim() == ""){
@ -93,9 +74,30 @@ class Cropper extends Component {
// console.log(event.detail.scaleX); // console.log(event.detail.scaleX);
// console.log(event.detail.scaleY); // console.log(event.detail.scaleY);
}, },
preview: this.props.previewId ? `#${this.props.previewId}` : '.img-preview', preview: this.props.previewId ? `#${this.props.previewId}` : '.img-preview',
} }
if (!window.Cropper) {
$.ajaxSetup({
cache: true
});
$('head').append($('<link rel="stylesheet" type="text/css" />')
.attr('href', `${_url_origin}/react/public/js/cropper/cropper.min.css`));
$.getScript(
`${_url_origin}/react/public/js/cropper/cropper.js`,
(data, textStatus, jqxhr) => {
});
$.getScript(
`${_url_origin}/react/public/js/cropper/html2canvas.min.js`,
(data, textStatus, jqxhr) => {
});
}
setTimeout(() => { setTimeout(() => {
const image = document.getElementById(this.props.imageId || '__image'); const image = document.getElementById(this.props.imageId || '__image');
this.cropper = new window.Cropper(image, this.options); this.cropper = new window.Cropper(image, this.options);

@ -401,7 +401,7 @@ class commonWork extends Component{
} }
secondRowLeft={ secondRowLeft={
<div style={{"display":"inline-block", "marginTop": "22px"}}> <div style={{"display":"inline-block", "marginTop": "22px"}}>
<span> {mainList&&mainList.all_count} 作业</span> <span> {mainList&&mainList.all_count} {moduleChineseName}</span>
<span style={{"marginLeft":"16px"}}>已发布{published_count}</span> <span style={{"marginLeft":"16px"}}>已发布{published_count}</span>
{/* {this.props.isAdmin()?:""} */} {/* {this.props.isAdmin()?:""} */}
<span style={{"marginLeft":"16px"}}>未发布{unpublished_count}</span> <span style={{"marginLeft":"16px"}}>未发布{unpublished_count}</span>

@ -77,7 +77,7 @@ class GraduationTasksappraiseReplyChild extends Component{
{this.props.ultimate===true ? "": isAdmin && <GraduationTasksappraiseMainEditor {...this.props} {this.props.ultimate===true ? "": isAdmin && <GraduationTasksappraiseMainEditor {...this.props}
addSuccess={() => this.props.addSuccess()} addSuccess={() => this.props.addSuccess()}
showSameScore={true} showSameScore={this.props.task_type == 2}
></GraduationTasksappraiseMainEditor> } ></GraduationTasksappraiseMainEditor> }
</div> </div>

Loading…
Cancel
Save