From 96f184acb6b4e46e4f5cffe3c44ef0fac44a9c30 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
Date: Fri, 21 Feb 2020 18:17:04 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E6=8E=88=E6=9D=83?=
=?UTF-8?q?=E7=99=BB=E5=BD=95=E6=B5=81=E7=A8=8B=E8=B0=83=E6=95=B4=E5=AE=9E?=
=?UTF-8?q?=E8=AE=AD=E9=80=89=E6=8B=A9=E9=A2=98=E4=BD=93=E9=AA=8C=E9=97=AE?=
=?UTF-8?q?=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/react/src/modules/login/Otherloginqq.js | 12 +++++++++---
.../react/src/modules/login/Otherloginstart.js | 11 ++++++++---
.../tpm/challengesnew/TpmQuestionEdit.js | 12 ++++++++----
.../tpm/challengesnew/TpmQuestionNew.js | 18 +++++++++++++-----
.../tpm/challengesnew/css/newquestion.css | 7 +++++++
5 files changed, 45 insertions(+), 15 deletions(-)
create mode 100644 public/react/src/modules/tpm/challengesnew/css/newquestion.css
diff --git a/public/react/src/modules/login/Otherloginqq.js b/public/react/src/modules/login/Otherloginqq.js
index 5a03a0fbb..18ae57d7c 100644
--- a/public/react/src/modules/login/Otherloginqq.js
+++ b/public/react/src/modules/login/Otherloginqq.js
@@ -12,6 +12,12 @@ class Otherloginqq extends Component {
const type = query.split('?code=');
const types = type[1].split('&state=');
const typeshref = types[1].split('%2C');
+
+ if(decodeURIComponent(typeshref[1])==="test-newweb.educoder.net"){
+ window.location.href=`https://${decodeURIComponent(typeshref[1])}/otherloginqq?code=${types[0]}&state=null%2C`;
+ }else if(decodeURIComponent(typeshref[1])==="pre-newweb.educoder.net"){
+ window.location.href=`https://${decodeURIComponent(typeshref[1])}/otherloginqq?code=${types[0]}&state=null%2C`;
+ }
let codeurl = `/auth/qq/callback`;
axios.get(codeurl,{params:{
code:types[0],
@@ -20,13 +26,13 @@ class Otherloginqq extends Component {
if(result){
if(result.data.status===0){
if(result.data.new_user===true){
- window.location.href=`https://${decodeURIComponent(typeshref[1])}/otherlogin?type=qq`;
+ this.props.history.replace(`/otherlogin?type=qq`);
}else{
// this.getinfo()
if(typeshref[0]==="account"){
- window.location.href=`https://${decodeURIComponent(typeshref[1])}/account/binding`;
+ this.props.history.replace(`/account/binding`);
}else{
- window.location.href=`https://${decodeURIComponent(typeshref[1])}`;
+ this.props.history.replace(`/`);
}
}
}
diff --git a/public/react/src/modules/login/Otherloginstart.js b/public/react/src/modules/login/Otherloginstart.js
index 216e3f073..93d202ce1 100644
--- a/public/react/src/modules/login/Otherloginstart.js
+++ b/public/react/src/modules/login/Otherloginstart.js
@@ -14,6 +14,11 @@ class Otherloginstart extends Component {
const types = type[1].split('&state=');
const typeshref = types[1].split(',');
+ if(typeshref[1]==="test-newweb.educoder.net"){
+ window.location.href=`https://${typeshref[1]}/otherloginstart?code=${types[0]}&state=null,""`;
+ }else if(typeshref[1]==="pre-newweb.educoder.net"){
+ window.location.href=`https://${typeshref[1]}/otherloginstart?code=${types[0]}&state=null,""`;
+ }
let codeurl = `/auth/wechat/callback.json`
axios.get(codeurl,{params:{
code:types[0]
@@ -21,13 +26,13 @@ class Otherloginstart extends Component {
if(result){
if(result.data.status===0){
if(result.data.new_user===true){
- window.location.href=`https://${typeshref[1]}/otherlogin?type=wechat`;
+ this.props.history.replace(`/otherlogin?type=wechat`);
}else{
// this.getinfo()
if(typeshref[0]==="account"){
- window.location.href=`https://${typeshref[1]}/account/binding`;
+ this.props.history.replace(`/account/binding`);
}else{
- window.location.href=`https://${typeshref[1]}`;
+ this.props.history.replace(`/`);
}
}
diff --git a/public/react/src/modules/tpm/challengesnew/TpmQuestionEdit.js b/public/react/src/modules/tpm/challengesnew/TpmQuestionEdit.js
index 5e90c1f3d..ccf22057f 100644
--- a/public/react/src/modules/tpm/challengesnew/TpmQuestionEdit.js
+++ b/public/react/src/modules/tpm/challengesnew/TpmQuestionEdit.js
@@ -1,6 +1,6 @@
import React, {Component} from 'react';
-import {Input, Select, Radio, Checkbox, Popconfirm, message, Modal,Tooltip} from 'antd';
+import {Input, Select, Radio,Button, Badge, message, Modal,Tooltip} from 'antd';
import {BrowserRouter as Router, Route, Link, Switch} from "react-router-dom";
@@ -183,7 +183,7 @@ export default class TpmQuestionEdit extends Component {
/>
{/*+ 添加*/}
-
学员答题正确将获得技能,否则不能获得技能
+
学员答题正确将获得技能,否则不能获得技能(回车添加标签)
必填项
@@ -193,8 +193,12 @@ export default class TpmQuestionEdit extends Component {
{
this.props.shixunsskillanswerlist.length === 0 ? "" : this.props.shixunsskillanswerlist.map((itme, key) => {
return (
-
{itme}
- this.props.delshixunssnswerllist(key)}>×
+
+ this.props.delshixunssnswerllist(key)}>
+
+
)
})
diff --git a/public/react/src/modules/tpm/challengesnew/TpmQuestionNew.js b/public/react/src/modules/tpm/challengesnew/TpmQuestionNew.js
index c808fea61..602aa6d16 100644
--- a/public/react/src/modules/tpm/challengesnew/TpmQuestionNew.js
+++ b/public/react/src/modules/tpm/challengesnew/TpmQuestionNew.js
@@ -1,11 +1,13 @@
import React, {Component} from 'react';
-import {Input, Select, Radio, Checkbox, Popconfirm, message, Modal,Tooltip} from 'antd';
+import {Input, Select, Radio, Checkbox, Popconfirm, Button, Badge,Tooltip} from 'antd';
import {BrowserRouter as Router, Route, Link, Switch} from "react-router-dom";
import TPMMDEditor from '../../tpm/challengesnew/TPMMDEditor';
+import './css/newquestion.css';
+
const Option = Select.Option;
const RadioGroup = Radio.Group;
@@ -138,7 +140,7 @@ export default class TpmQuestionNew extends Component {
// onMouseLeave={this.onshixunsmarkss}
>
*
-
+