Merge branch 'dev_aliyun' of http://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

dev_cs
cxt 5 years ago
commit a10910824e

@ -326,6 +326,20 @@ class App extends Component {
});
wx.ready(function () {
console.log('wx is ready')
// var shareData = {
// title: 'EduCoder - 首页',
// desc: 'Educoder是一个面向计算机类的互联网IT教育和实战平台提供企业级工程实训以实现工程化专业教学的自动化和智能化。高校和企业人员可以在此开展计算机实践性教学活动将传统的知识传授和时兴的工程实战一体化。',
// link: currentUrl,
// imgUrl: window.__testImageUrl
// || (currentUrl.endsWith('/') ? currentUrl : currentUrl + '/') + 'react/build/images/share_logo_icon.jpg'
// };
// wx.onMenuShareAppMessage(shareData);//分享给好友
// wx.onMenuShareTimeline(shareData);//分享到朋友圈
// wx.onMenuShareQQ(shareData);//分享给手机QQ
// wx.onMenuShareWeibo(shareData);//分享腾讯微博
// wx.onMenuShareQZone(shareData);//分享到QQ空间
configShareForIndex('/')
});
wx.error(function (res) {

@ -1,4 +1,4 @@
const host = window.location.host
const host = window.location.protocol + '//' + window.location.host
const wx = window.wx
function share(shareData) {
try {

@ -174,7 +174,7 @@ class TPIContextProvider extends Component {
}
let testPath = ''
if (window.location.port == 3007) {
testPath = 'http://pre-newweb.educoder.net'
testPath = 'http://test-newweb.educoder.net'
}
// var url = `${testPath}/api/v1/games/${ game.identifier }/cost_time`
var url = `${testPath}/api/tasks/${ game.identifier }/cost_time`

@ -391,9 +391,16 @@ class MainContentContainer extends Component {
// var fileUpdatePromise = this.doFileUpdateRequest(true)
// });
// }
window.addEventListener("beforeunload", this.beforeunload);
}
componentWillUnmount() {
// window.$(window).off( "unload" )
window.removeEventListener("beforeunload", this.beforeunload);
}
beforeunload = () => {
this.doFileUpdateRequestOnCodeMirrorBlur()
}

Loading…
Cancel
Save