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) kaminari (~> 1.1, >= 1.1.1)
listen (>= 3.0.5, < 3.2) listen (>= 3.0.5, < 3.2)
mysql2 (>= 0.4.4, < 0.6.0) mysql2 (>= 0.4.4, < 0.6.0)
newrelic_rpm
oauth2 oauth2
pdfkit pdfkit
puma (~> 3.11) puma (~> 3.11)

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

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

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

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

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

Loading…
Cancel
Save