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

dev_cs
杨树明 5 years ago
commit df527a50ff

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

@ -8,7 +8,7 @@ import PropTypes from 'prop-types';
import classNames from 'classnames';
import { getImageUrl ,markdownToHTML} from 'educoder'
import { getImageUrl ,markdownToHTML, configShareForCustom} from 'educoder'
import { CircularProgress } from 'material-ui/Progress';
@ -51,6 +51,7 @@ class Challenges extends Component {
if (response.data.status === 403||response.data.status === 401||response.data.status === 500) {
}else{
configShareForCustom(this.props.shixunsDetails.name, response.data.description)
this.setState({
ChallengesDataList: response.data,
sumidtype: false,

Loading…
Cancel
Save