From 558c8042d8462b14604a79a8f06b2c51a0683e13 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Thu, 5 Sep 2019 09:25:30 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E9=87=8D=E7=BD=AE=E6=97=B6=20=E5=85=88?= =?UTF-8?q?=E5=85=B3socket?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/page/component/WebSSHTimer.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/public/react/src/modules/page/component/WebSSHTimer.js b/public/react/src/modules/page/component/WebSSHTimer.js index b1e67f0be..844c29785 100644 --- a/public/react/src/modules/page/component/WebSSHTimer.js +++ b/public/react/src/modules/page/component/WebSSHTimer.js @@ -145,6 +145,9 @@ class WebSSHTimer extends Component { } // 重置命令行的时候调用的接口,会删pod closeWebssh = (callback) => { + // 先关socket + this.closeWebsshSocket() + const { game } = this.props; // const url = `/api/v1/games/${game.identifier}/close_webssh` const url = `/tasks/${game.identifier}/close_webssh.json` From 8613995658c9668ba268dbafd73a379f94719b0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Thu, 5 Sep 2019 09:39:07 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/coursesPublic/AccessoryModal2.js | 15 +++++++----- .../courses/coursesPublic/SelectSetting.js | 24 +++++++++---------- .../courses/coursesPublic/sendResource.js | 23 +++++++++--------- .../src/modules/tpm/newshixuns/Newshixuns.js | 20 +++++++++------- 4 files changed, 44 insertions(+), 38 deletions(-) diff --git a/public/react/src/modules/courses/coursesPublic/AccessoryModal2.js b/public/react/src/modules/courses/coursesPublic/AccessoryModal2.js index a15cb0617..1f5dea3e8 100644 --- a/public/react/src/modules/courses/coursesPublic/AccessoryModal2.js +++ b/public/react/src/modules/courses/coursesPublic/AccessoryModal2.js @@ -34,12 +34,15 @@ class AccessoryModal2 extends Component{ } // 附件相关 START handleChange = (info) => { - let fileList = info.fileList; - console.log(fileList) - // for(var list of fileList ){ - // console.log(fileList) - // } - this.setState({ fileList }); + if(info.file.status === 'uploading' || info.file.status === 'done' || info.file.status === 'removed'){ + let fileList = info.fileList; + console.log(fileList) + // for(var list of fileList ){ + // console.log(fileList) + // } + this.setState({ fileList }); + } + } onAttachmentRemove = (file) => { diff --git a/public/react/src/modules/courses/coursesPublic/SelectSetting.js b/public/react/src/modules/courses/coursesPublic/SelectSetting.js index 1a18513e7..37b22c205 100644 --- a/public/react/src/modules/courses/coursesPublic/SelectSetting.js +++ b/public/react/src/modules/courses/coursesPublic/SelectSetting.js @@ -253,19 +253,19 @@ class Selectsetting extends Component{ // 附件相关 START handleChange = (info) => { - - let fileList = info.fileList; - if(info.file.status!="removed"){ - this.setState({ - fileList: appendFileSizeToUploadFileAll(fileList), - fileListtype:true - }); - }else{ - this.setState({ - fileList: appendFileSizeToUploadFileAll(fileList), - }); + if(info.file.status === 'uploading' || info.file.status === 'done' || info.file.status === 'removed') { + let fileList = info.fileList; + if (info.file.status != "removed") { + this.setState({ + fileList: appendFileSizeToUploadFileAll(fileList), + fileListtype: true + }); + } else { + this.setState({ + fileList: appendFileSizeToUploadFileAll(fileList), + }); + } } - } // onAttachmentRemove = (file) => { diff --git a/public/react/src/modules/courses/coursesPublic/sendResource.js b/public/react/src/modules/courses/coursesPublic/sendResource.js index a9ceb6405..fbc2ebeb2 100644 --- a/public/react/src/modules/courses/coursesPublic/sendResource.js +++ b/public/react/src/modules/courses/coursesPublic/sendResource.js @@ -86,17 +86,18 @@ class Sendresource extends Component{ } // 附件相关 START handleChange = (info) => { - - let fileList = info.fileList; - if(info.file.status!="removed"){ - this.setState({ - fileList: appendFileSizeToUploadFileAll(fileList), - fileListtype:true - }); - }else{ - this.setState({ - fileList: appendFileSizeToUploadFileAll(fileList), - }); + if (info.file.status === 'uploading' || info.file.status === 'done' || info.file.status === 'removed') { + let fileList = info.fileList; + if (info.file.status != "removed") { + this.setState({ + fileList: appendFileSizeToUploadFileAll(fileList), + fileListtype: true + }); + } else { + this.setState({ + fileList: appendFileSizeToUploadFileAll(fileList), + }); + } } } diff --git a/public/react/src/modules/tpm/newshixuns/Newshixuns.js b/public/react/src/modules/tpm/newshixuns/Newshixuns.js index d7b2b7d26..d2e26d58b 100644 --- a/public/react/src/modules/tpm/newshixuns/Newshixuns.js +++ b/public/react/src/modules/tpm/newshixuns/Newshixuns.js @@ -759,19 +759,21 @@ class Newshixuns extends Component { // 附件相关 START handleChange = (info) => { - let {fileList}=this.state; + if(info.file.status === 'uploading' || info.file.status === 'done' || info.file.status === 'removed') { + let {fileList} = this.state; - if (info.file.status === 'uploading' || info.file.status === 'done' || info.file.status === 'removed') { - console.log("handleChange1"); - // if(fileList.length===0){ + if (info.file.status === 'uploading' || info.file.status === 'done' || info.file.status === 'removed') { + console.log("handleChange1"); + // if(fileList.length===0){ let fileLists = info.fileList; this.setState({ // fileList:appendFileSizeToUploadFileAll(fileList), - fileList:fileLists, - deleteisnot:false}); - // } - } - + fileList: fileLists, + deleteisnot: false + }); + // } + } + } } onAttachmentRemove = (file) => { if(!file.percent || file.percent == 100){ From 786519fa1fd79e9d141f825ef5597f508ac9b123 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Thu, 5 Sep 2019 09:43:03 +0800 Subject: [PATCH 3/3] log --- public/react/src/App.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/public/react/src/App.js b/public/react/src/App.js index fbb9ac7b0..7cd219dba 100644 --- a/public/react/src/App.js +++ b/public/react/src/App.js @@ -288,6 +288,7 @@ class App extends Component { axios.post(url, { url: 'http://pre-newweb.educoder.net', }).then((response) => { + console.log('got res') const data = response.data; wx.config({ debug: false, @@ -305,6 +306,7 @@ class App extends Component { ] }); wx.ready(function () { + console.log('wx is ready') var shareData = { title: '这是是分享标题', desc: '这是是摘要', @@ -322,6 +324,8 @@ class App extends Component { }); wx.error(function (res) { + console.log('wx is error') + console.log(res) //alert(res.errMsg);//错误提示 });