微信授权登录流程调整实训选择题体验问题

sso
杨树明 5 years ago
parent e686d84866
commit 96f184acb6

@ -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(`/`);
}
}
}

@ -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(`/`);
}
}

@ -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 {
/>
{/*<a className="white-btn orange-btn fl mt1 use_scope-btn ml20 mt5 mr20"*/}
{/*onClick={this.clickshixunsanswerskill}>+ 添加</a>*/}
<div className="ml15 color-grey-9 mt5">学员答题正确将获得技能否则不能获得技能
<div className="ml15 color-grey-9 mt5">学员答题正确将获得技能否则不能获得技能回车添加标签
<span className=" color-orange ml20" style={{display:this.props.challenge_tagtype===true?"inline-block":"none"}} id="stage_name_notice">
<i className="fa fa-exclamation-circle mr3"></i>
</span>
@ -193,8 +193,12 @@ export default class TpmQuestionEdit extends Component {
{
this.props.shixunsskillanswerlist.length === 0 ? "" : this.props.shixunsskillanswerlist.map((itme, key) => {
return (
<li className="task_tag_span" key={key}><span>{itme}</span>
<a onClick={() =>this.props.delshixunssnswerllist(key)}>×</a>
<li className="fl ml10 mr10" key={key}>
<Badge className={"tpmpointer"} count={"x"} onClick={()=>this.props.delshixunssnswerllist(key)}>
<Button type="primary" ghost className={"Permanentban "}>
{itme}
</Button>
</Badge>
</li>
)
})

@ -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}
>
<span className="fl mr30 color-orange pt10">*</span>
<Select style={{width: 120}} className="winput-240-40 fl"
id="challenge_score"
onChange={(e)=>this.props.onshixunsansweSelect(e)}
@ -176,7 +178,7 @@ export default class TpmQuestionNew extends Component {
/>
{/*<a className="white-btn orange-btn fl mt1 use_scope-btn ml20 mt5 mr20"*/}
{/*onClick={this.clickshixunsanswerskill}>+ 添加</a>*/}
<div className="ml15 color-grey-9 mt5">学员答题正确将获得技能否则不能获得技能
<div className="ml15 color-grey-9 mt5">学员答题正确将获得技能否则不能获得技能回车添加标签
<span className=" color-orange ml20" style={{display:this.props.challenge_tagtype===true?"inline-block":"none"}} id="stage_name_notice">
<i className="fa fa-exclamation-circle mr3"></i>
</span>
@ -186,8 +188,14 @@ export default class TpmQuestionNew extends Component {
{
this.props.shixunsskillanswerlist.length === 0 ? "" : this.props.shixunsskillanswerlist.map((itme, key) => {
return (
<li className="task_tag_span" key={key}><span>{itme}</span>
<a onClick={()=>this.props.delshixunssnswerllist(key)}>×</a>
<li className="fl ml10 mr10" key={key}>
<Badge className={"tpmpointer"} count={"x"} onClick={()=>this.props.delshixunssnswerllist(key)}>
<Button type="primary" ghost className={"Permanentban "}>
{itme}
</Button>
</Badge>
</li>
)
})

@ -0,0 +1,7 @@
.tpmpointer{
cursor: pointer;
}
.Permanentban{
color:#5091FF !important;
border-color: #5091FF !important;
}
Loading…
Cancel
Save