Merge remote-tracking branch 'origin/dev_aliyun' into dev_aliyun

dev_cs
杨树明 5 years ago
commit db01b664b3

@ -378,6 +378,7 @@ DEPENDENCIES
kaminari (~> 1.1, >= 1.1.1)
listen (>= 3.0.5, < 3.2)
mysql2 (>= 0.4.4, < 0.6.0)
newrelic_rpm
oauth2
pdfkit
puma (~> 3.11)

@ -122,11 +122,11 @@ export function configShareForCourses () {
export function configShareForCustom (title, desc, imgUrl, path) {
requestForSignatrue(() => {
console.log('configShareForCustom', host)
const _path = window.location.href.split('#')[0];
const _url = window.location.href.split('#')[0];
var shareData = {
title: title,
desc: desc,
link: `${host}/${path || _path}`,
link: path ? `${host}/${path}` : _url,
imgUrl: imgUrl || window.__testImageUrl
|| host + '/react/build/images/share_logo_icon.jpg'
};

@ -73,7 +73,6 @@ class NewWorkForm extends Component{
setTimeout(() => {
this.contentMdRef.current.setValue(data.description || '')
this.answerMdRef.current.setValue(data.reference_answer || '')
}, 2000)
this.props.form.setFieldsValue({
@ -86,8 +85,13 @@ class NewWorkForm extends Component{
} else { // new
}
this._scrollToTop()
}
_scrollToTop = () => {
setTimeout(() => {
$("html").animate({ scrollTop: 0 })
}, 1500)
}
// 输入title
changeTitle=(e)=>{
@ -289,6 +293,7 @@ class NewWorkForm extends Component{
}
componentDidMount() {
window.$('.groupSetting .ant-form-item-label > label').addClass('ant-form-item-required')
this._scrollToTop()
}
render(){

@ -1,5 +1,5 @@
import React, { Component } from 'react';
import {getImageUrl,markdownToHTML} from 'educoder';
import {getImageUrl,markdownToHTML, configShareForCustom} from 'educoder';
import DetailTop from './DetailTop.js';
import DetailCards from './DetailCards.js'
import AddCollaborators from "./addCollaborators.js";
@ -164,6 +164,7 @@ class PathDetailIndex extends Component{
// window.location.href = "/403";
return;
}
configShareForCustom(result.data.name, result.data.description)
if(result.data.allow_visit===true){
this.setState({

@ -430,3 +430,7 @@
.topsicinline{
display: inline-block;
}
/* 防抖 */
.educontent .square-list {
min-height: 400px;
}

@ -1,3 +1,7 @@
/* 撑开滚动条,防抖 */
.educontent > .itemWrap {
min-height: 400px;
}
.itemWrap {
display: flex;
flex-wrap: wrap;

Loading…
Cancel
Save