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

dev_cxt2
hjm 5 years ago
commit 2f6a03f80e

@ -20,6 +20,7 @@ class Oauth::BaseController < ActionController::Base
end end
def auth_hash def auth_hash
Rails.logger.info("[OAuth2] omniauth.auth -> #{request.env['omniauth.auth'].inspect}")
request.env['omniauth.auth'] request.env['omniauth.auth']
end end
end end

@ -28,7 +28,7 @@ class Oauth::CreateOrFindQqAccountService < ApplicationService
user.create_user_extension!(gender: gender) user.create_user_extension!(gender: gender)
# 下载头像 # 下载头像
avatar_path = Util::FileManage.source_disk_filename(user) avatar_path = Util::FileManage.source_disk_filename(user)
Util.download_file(params.dig('info', 'figureurl_qq_1'), avatar_path) Util.download_file(params.dig('info', 'image'), avatar_path)
end end
new_open_user = OpenUsers::QQ.create!(user: user, uid: params['uid'], extra: params.dig('extra', 'raw_info')) new_open_user = OpenUsers::QQ.create!(user: user, uid: params['uid'], extra: params.dig('extra', 'raw_info'))

@ -75,7 +75,10 @@ const Otherloginstart=Loadable({
loader: () => import('./modules/login/Otherloginstart'), loader: () => import('./modules/login/Otherloginstart'),
loading: Loading, loading: Loading,
}) })
const Otherloginsqq=Loadable({
loader: () => import('./modules/login/Otherloginqq'),
loading: Loading,
})
// const TestIndex = Loadable({ // const TestIndex = Loadable({
// loader: () => import('./modules/test'), // loader: () => import('./modules/test'),
// loading: Loading, // loading: Loading,
@ -527,6 +530,9 @@ class App extends Component {
<Route <Route
path="/otherloginstart" component={Otherloginstart} path="/otherloginstart" component={Otherloginstart}
/> />
<Route
path={"/otherloginqq"} component={Otherloginsqq}
/>
<Route <Route
path="/otherlogin" component={Otherlogin} path="/otherlogin" component={Otherlogin}
/> />

@ -46,6 +46,7 @@ export function initAxiosInterceptors(props) {
//proxy="http://47.96.87.25:48080" //proxy="http://47.96.87.25:48080"
proxy="https://pre-newweb.educoder.net" proxy="https://pre-newweb.educoder.net"
proxy="https://test-newweb.educoder.net" proxy="https://test-newweb.educoder.net"
//proxy="http://192.168.2.63:3001"
// 在这里使用requestMap控制避免用户通过双击等操作发出重复的请求 // 在这里使用requestMap控制避免用户通过双击等操作发出重复的请求
// 如果需要支持重复的请求考虑config里面自定义一个allowRepeat参考来控制 // 如果需要支持重复的请求考虑config里面自定义一个allowRepeat参考来控制
@ -73,15 +74,22 @@ export function initAxiosInterceptors(props) {
} }
requestProxy(config) requestProxy(config)
var url = `/api${config.url}`; let url = `/api${config.url}`;
//qq登录去掉api
if(config.params&&config.params.redirect_uri!=undefined){
if(config.params.redirect_uri.indexOf('otherloginqq')!=-1){
url = `${config.url}`;
}
}
if(`${config[0]}`!=`true`){ if(`${config[0]}`!=`true`){
if (window.location.port === "3007") { if (window.location.port === "3007") {
if (url.indexOf('.json') == -1) { // if (url.indexOf('.json') == -1) {
//
alert('开发提示:请给接口加.json:' + url) // alert('开发提示:请给接口加.json:' + url)
//
} // }
config.url = `${proxy}${url}`; config.url = `${proxy}${url}`;
if (config.url.indexOf('?') == -1) { if (config.url.indexOf('?') == -1) {
config.url = `${config.url}?debug=${debugType}`; config.url = `${config.url}?debug=${debugType}`;

@ -43,7 +43,7 @@ class CompetitionCommon extends Component{
// }) // })
// } // }
// }).catch((error) => { // }).catch((error) => {
// console.log(error) // //console.log(error)
// }) // })
} }
} }
@ -51,8 +51,8 @@ class CompetitionCommon extends Component{
componentDidUpdate = (prevProps) => { componentDidUpdate = (prevProps) => {
if (prevProps.user != this.props.user) { if (prevProps.user != this.props.user) {
console.log("componentDidUpdatess"); //console.log("componentDidUpdatess");
console.log(this.props.user); //console.log(this.props.user);
if (this.props.user && this.props.user.login != "") { if (this.props.user && this.props.user.login != "") {
const zul = `/competitions/${this.props.match.params.identifier}/competition_staff.json`; const zul = `/competitions/${this.props.match.params.identifier}/competition_staff.json`;
axios.get((zul)).then((result) => { axios.get((zul)).then((result) => {
@ -64,7 +64,7 @@ class CompetitionCommon extends Component{
} }
} }
}).catch((error) => { }).catch((error) => {
//console.log(error); ////console.log(error);
}) })
} }
} }
@ -103,7 +103,7 @@ class CompetitionCommon extends Component{
} }
} }
}).catch((error) => { }).catch((error) => {
console.log(error) //console.log(error)
}) })
//this.props.user 有可能为空 //this.props.user 有可能为空
@ -119,7 +119,7 @@ class CompetitionCommon extends Component{
} }
} }
}).catch((error) => { }).catch((error) => {
//console.log(error); ////console.log(error);
}) })
} }
@ -161,7 +161,7 @@ class CompetitionCommon extends Component{
} }
}).catch((error) => { }).catch((error) => {
console.log(error) //console.log(error)
}) })
} }
} }
@ -192,7 +192,7 @@ class CompetitionCommon extends Component{
} }
}).catch((error) => { }).catch((error) => {
console.log(error) //console.log(error)
}) })
}else{ }else{
if (module_url.substring(0, 7) == 'http://' || module_url.substring(0, 8) == 'https://') { if (module_url.substring(0, 7) == 'http://' || module_url.substring(0, 8) == 'https://') {
@ -309,7 +309,7 @@ class CompetitionCommon extends Component{
}) })
} }
}).catch((error) => { }).catch((error) => {
console.log(error) //console.log(error)
}) })
} }

@ -294,14 +294,15 @@ class SingleEditor extends Component{
<div className="mb20"> <div className="mb20">
{/* {!exerciseIsPublish && <ActionBtn style="grey" className="middle mr20" onClick={this.addOption}>新增选项</ActionBtn>} */} {/* {!exerciseIsPublish && <ActionBtn style="grey" className="middle mr20" onClick={this.addOption}>新增选项</ActionBtn>} */}
<span style={{color: '#FF6800'}}>{!exerciseIsPublish ? '温馨提示:点击选项标题,可以直接设置答案;选择多个答案即为多选题' : ' '}</span> <span
style={{color: '#FF6800'}}>{!exerciseIsPublish ? '温馨提示:点击选项输入框可设置答案;选中的选项即为正确答案,选择多个答案即为多选题' : ' '}</span>
{ answerTagArray && !!answerTagArray.length ? { answerTagArray && !!answerTagArray.length ?
<React.Fragment> <React.Fragment>
<span className="fr color-orange">{answerTagArray.join(' ')}</span> <span className="fr color-orange">{answerTagArray.join(' ')}</span>
<span className="fr">标准答案</span> <span className="fr">标准答案</span>
</React.Fragment> </React.Fragment>
: :
<span className="fr color-orange">请点击正确选项</span> <span className="fl color-orange">温馨提示点击选项输入框可设置答案选中的选项即为正确答案选择多个答案即为多选题</span>
} }
</div> </div>

@ -136,9 +136,15 @@
.startlogin{ .startlogin{
color:#888; color:#888;
} }
.weixinheight390{ .weixinheight390{
height: 390px; height: 390px;
} }
.qqheight390{
width: 450px;
height: 390px;
}
#log_reg_content { #log_reg_content {
padding: 38px 30px 20px !important; padding: 38px 30px 20px !important;
} }

@ -7,7 +7,7 @@ import Dialog, {
DialogContentText, DialogContentText,
DialogTitle, DialogTitle,
} from 'material-ui/Dialog'; } from 'material-ui/Dialog';
import {notification } from 'antd'; import {notification,Modal } from 'antd';
import axios from 'axios'; import axios from 'axios';
@ -104,8 +104,8 @@ class LoginDialog extends Component {
MyEduCoderModals:false, MyEduCoderModals:false,
Phonenumberisnotco:undefined, Phonenumberisnotco:undefined,
Phonenumberisnotcobool:false, Phonenumberisnotcobool:false,
weixinlogin:false weixinlogin:false,
qqlogin:false
}; };
} }
enter=(num) =>{ enter=(num) =>{
@ -529,14 +529,28 @@ class LoginDialog extends Component {
weixinlogin:true weixinlogin:true
}) })
} }
openqqlogin=()=>{
this.setState({
qqlogin:true
})
//window.location.href=`https://graph.qq.com/oauth2.0/show?which=Login&display=pc&client_id=101508858&redirect_uri=https%3a%2f%2f${window.location.host}%2otherloginqq&response_type=code`
window.location.href=`https://graph.qq.com/oauth2.0/show?which=Login&display=pc&client_id=101508858&redirect_uri=https%3a%2f%2f${window.location.host}%2fotherloginqq&response_type=code`
// window.location.href=`https://graph.qq.com/oauth2.0/show?which=Login&display=pc&client_id=101508858&redirect_uri=https%3a%2f%2fwww.educoder.net%2fotherloginstart&tp=qq&response_type=code`
}
openphoneqqlogin=()=>{
window.location.href=`https://xui.ptlogin2.qq.com/cgi-bin/xlogin?appid=716027609&pt_3rd_aid=101508858&daid=383&pt_skey_valid=0&style=35&s_url=http%3A%2F%2Fconnect.qq.com&refer_cgi=authorize&which=&client_id=101508858&response_type=code&scope=get_user_info&redirect_uri=https%3a%2f%2f${window.location.host}%2fotherloginqq&response_type=code`
}
hideweixinlogin=()=>{ hideweixinlogin=()=>{
this.setState({ this.setState({
weixinlogin:false weixinlogin:false,
qqlogin:false
}) })
} }
render() { render() {
let{open,login,speedy,loginValue,regular,isGoing,isGoingValue,disabled,bottonclass,Phonenumberisnotco, let{qqlogin,login,isGoing,isGoingValue,disabled,bottonclass,Phonenumberisnotco,
dialogBox,shortcutnum,disabledType,gaincode,authCodeType,authCodeclass, isRender,weixinlogin}=this.state; dialogBox, isRender,weixinlogin}=this.state;
if (isRender === undefined) { if (isRender === undefined) {
isRender = false isRender = false
@ -659,8 +673,22 @@ class LoginDialog extends Component {
<a onClick={()=>this.openweixinlogin()}> <a onClick={()=>this.openweixinlogin()}>
<img src={require('./WeChat.png')} alt="微信登录"/> <img src={require('./WeChat.png')} alt="微信登录"/>
</a> </a>
<a onClick={()=>this.openqqlogin()} className={"ml10"}>
<img src={require('./qq.png')} alt="qq登录"/>
</a>
</div> </div>
</p>:""} </p>:<p className="clearfix mt20">
<span className={"startlogin"}> 快速登录 </span>
<div className={"mt10"}>
{/*<a onClick={()=>this.openweixinlogin()}>*/}
{/*<img src={require('./WeChat.png')} alt="微信登录"/>*/}
{/*</a>*/}
<a onClick={()=>this.openphoneqqlogin()} className={"ml10"}>
<img src={require('./qq.png')} alt="qq登录"/>
</a>
</div>
</p>}
</form>} </form>}
{weixinlogin===true?<iframe {weixinlogin===true?<iframe
@ -669,7 +697,9 @@ class LoginDialog extends Component {
sandbox="allow-scripts allow-same-origin allow-top-navigation" sandbox="allow-scripts allow-same-origin allow-top-navigation"
scrolling="no" scrolling="no"
src={`https://open.weixin.qq.com/connect/qrconnect?appid=wx6b119e2d829c13fa&redirect_uri=https%3a%2f%2f${window.location.host}%2fotherloginstart&response_type=code&scope=snsapi_login#wechat_redirect`}></iframe>:""} src={`https://open.weixin.qq.com/connect/qrconnect?appid=wx6b119e2d829c13fa&redirect_uri=https%3a%2f%2f${window.location.host}%2fotherloginstart&response_type=code&scope=snsapi_login#wechat_redirect`}></iframe>:""}
{weixinlogin===true?<p className="clearfix">
{weixinlogin===true?<p className="clearfix ">
<a className={"startlogin color-blue"} onClick={()=>this.hideweixinlogin()}>返回账号登录</a> <a className={"startlogin color-blue"} onClick={()=>this.hideweixinlogin()}>返回账号登录</a>
</p>:""} </p>:""}
</div> </div>
@ -690,110 +720,3 @@ class LoginDialog extends Component {
export default LoginDialog ; export default LoginDialog ;
// onkeypress="user_login_keypress(event);"
// onkeypress="user_login_keypress(event);"
{/* <div className="pr drag_certi_block width100 mt5">
<div id="quick-drag" className="drag_slider" style={{color: 'rgb(255, 255, 255)'}}></div>
<div className="new-login-error" style={{height: '25px'}}>
<p id="passlogin_error_notice" className="color-orange edu-txt-left none" style={{display: 'block'}}></p>
</div>
</div>}
{/*第三方账号登录*/}
{/* <div className="mt10 edu-txt-center">
<p className="color-grey-9">第三方账号登录</p>
<div className="mt15">
<a href="javascript:void(0)" className="margin15"><img src="/images/educoder/weixin.png" className="radius"/></a>
<a href="javascript:void(0)" className="margin15"><img src="/images/educoder/QQ.png" className="radius"/></a>
<a href="javascript:void(0)" className="margin15"><img src="/images/educoder/weibo.png" className="radius"/></a>
</div>
</div>}
//
// {/*<div className="login-panel none" id="login-panel-2" style={{display:speedy==0?'block':'none'}}>*/}
// {/*<form acceptCharset="UTF-8" action="/login" id="code_login_form" method="post">*/}
// {/*<div style={{"display":"inline","padding":"0","margin":"0"}}>*/}
// {/*<input name="utf8" type="hidden" value="✓"></input>*/}
// {/*<input name="authenticity_token" type="hidden" value="NVLiIlHZfhVBQtO9djnWncJqqdikNQIIxEmOvzK9vNM="></input>*/}
// {/*</div>*/}
// {/*<input name="back_url" type="hidden" value={this.back_url}></input>*/}
// {/*<input*/}
// {/*type="text"*/}
// {/*id="pass_name_input"*/}
// {/*name="username"*/}
// {/*ref="shortcutText"*/}
// {/*onInput={this.shortcutIdChange}*/}
// {/*className="input-100-45 mt20"*/}
// {/*placeholder="手机号/邮箱号">*/}
// {/*</input>*/}
// {/*<div style={{height: '25px'}}>*/}
// {/*<p className="color-orange edu-txt-left none" id="pass_name_error_notice"*/}
// {/*style={{display: shortcutnum==0?'block':'none'}}>请输入有效的手机号/邮箱号*/}
// {/*</p>*/}
// {/*</div>*/}
//
// {/*<div id="wrapper">*/}
// {/*/!*drag*/ }*/}
// {/*<div id="quick-drag" className="drag_slider">*/}
// {/*<div className="drag_bg"></div>*/}
// {/*<div className="drag_text slidetounlock">*/}
// {/*请按住滑块,拖动到最右边*/}
// {/*</div>*/}
// {/*<div className="handler handler_bg"></div>*/}
// {/*</div>*/}
// {/*<div className="new-login-error" style={{height: '25px'}}>*/}
// {/*<p id="passlogin_error_notice" className="color-orange edu-txt-left none">请先拖动滑块完成验证</p>*/}
// {/*</div>*/}
// {/*</div>*/}
//
// {/*<p className="clearfix mt5">*/}
// {/*<input*/}
// {/*type="text"*/}
// {/*name="code"*/}
// {/*id="login_verification_code"*/}
// {/*className="input-48-45 edu-txt-center fl"*/}
// {/*ref="authCodeText"*/}
// {/*onInput={this.authCodeChange}*/}
// {/*placeholder="请输入验证码">*/}
// {/*</input>*/}
// {/*<button className={gaincode} disabled={disabledType}*/}
// {/*onClick={()=>{this.get_login_verification_code()}} id="get_verification_code">获取验证码</button>*/}
// {/*</p>*/}
//
// {/*<div style={{height: '25px'}}>*/}
// {/*<p className="color-orange edu-txt-left none" id="send_code_notice">*/}
// {/*请输入验证码*/}
// {/*</p>*/}
// {/*</div>*/}
//
// {/*<button className={authCodeclass} disabled={authCodeType} id="code_login_btn">登录</button>*/}
//
// {/*<p className="clearfix mt10">*/}
//
// {/*<span className="fl">*/}
// {/*<input type="checkbox"*/}
// {/*className="mr5 magic-checkbox"*/}
// {/*id="autolog"*/}
// {/*checked={isGoing}*/}
// {/*onChange={this.handleInputChange}*/}
// {/*value={isGoingValue}*/}
// {/*name="isGoing"*/}
// {/*></input>*/}
// {/*<label htmlFor="autolog" style={{"top":"0px"}}>下次自动登录</label>*/}
// {/*</span>*/}
//
// {/*<span className="fr">*/}
// {/*<a href="https://www.educoder.net/account/lost_password" className="mr3 color-grey-9">忘记密码</a><em className="vertical-line"></em>*/}
// {/*<a href="https://www.educoder.net/user_join" target="_blank" className="color-grey-9">注册</a>*/}
// {/*</span>*/}
//
// {/*</p>*/}
// {/*</form>*/}
// {/*</div>*/}

@ -132,6 +132,8 @@ class Otherlogin extends Component {
} }
postwechatlogin=(type,username,password)=>{ postwechatlogin=(type,username,password)=>{
let query=this.props.location.search;
const types = query.split('?type=');
if(type===false){ if(type===false){
if(username===undefined||username===""||username===null){ if(username===undefined||username===""||username===null){
this.setState({ this.setState({
@ -146,9 +148,11 @@ class Otherlogin extends Component {
return return
} }
} }
let url = "/bind_user.json"; let url = "/bind_user.json";
axios.post(url, { axios.post(url, {
type: 'wechat', type: types[1]==="qq"?"qq":'wechat',
not_bind:type, not_bind:type,
username:username, username:username,
password:password password:password

@ -0,0 +1,60 @@
import React, { Component } from 'react';
import { BrowserRouter as Router, Route, Link } from "react-router-dom";
import { Spin } from 'antd';
import axios from 'axios';
class Otherloginqq extends Component {
componentDidMount() {
let query=this.props.location.search;
if(query!= ""){
}
const type = query.split('?code=');
let codeurl = `/auth/qq/callback`;
axios.get(codeurl,{params:{
code:type[1],
redirect_uri:`https://test-newweb.educoder.net/otherloginqq`
}}).then((result)=> {
if(result){
if(result.data.status===0){
if(result.data.new_user===true){
window.location.href="/otherlogin?type=qq"
}else{
// this.getinfo()
if(types[1]==="account"){
window.location.href="/account/binding"
}else{
window.location.href="/"
}
}
}
}
}).catch((error)=>{
})
}
render() {
// Loading
return (
<div className="App" style={{minHeight: '800px',width:"100%"}}>
<style>
{
`
.margintop{
margin-top:20%;
}
`
}
</style>
<Spin size="large" className={"margintop"}/>
</div>
);
}
}
export default Otherloginqq;

@ -8,9 +8,10 @@ class Otherloginstart extends Component {
componentDidMount() { componentDidMount() {
let query=this.props.location.search; let query=this.props.location.search;
debugger
if(query!= ""){
const type = query.split('?code='); const type = query.split('?code=');
const types = type[1].split('&state='); const types = type[1].split('&state=');
console.log(types)
let codeurl = `/auth/wechat/callback.json` let codeurl = `/auth/wechat/callback.json`
axios.get(codeurl,{params:{ axios.get(codeurl,{params:{
code:types[0] code:types[0]
@ -18,7 +19,7 @@ class Otherloginstart extends Component {
if(result){ if(result){
if(result.data.status===0){ if(result.data.status===0){
if(result.data.new_user===true){ if(result.data.new_user===true){
window.location.href="/otherlogin" window.location.href="/otherlogin?type=wechat"
}else{ }else{
// this.getinfo() // this.getinfo()
if(types[1]==="account"){ if(types[1]==="account"){
@ -33,6 +34,8 @@ class Otherloginstart extends Component {
}).catch((error)=>{ }).catch((error)=>{
}) })
}
} }

@ -68,6 +68,7 @@ class LoginRegisterComponent extends Component {
registered:undefined, registered:undefined,
Phonenumberisnotcodmms:undefined, Phonenumberisnotcodmms:undefined,
weixinlogin:false, weixinlogin:false,
qqlogin:false
} }
} }
if(props.loginstatus === false){ if(props.loginstatus === false){
@ -106,7 +107,7 @@ class LoginRegisterComponent extends Component {
registered:undefined, registered:undefined,
Phonenumberisnotcodmms:undefined, Phonenumberisnotcodmms:undefined,
weixinlogin:false, weixinlogin:false,
qqlogin:false
} }
} }
} }
@ -892,9 +893,23 @@ class LoginRegisterComponent extends Component {
hideweixinlogin=()=>{ hideweixinlogin=()=>{
this.setState({ this.setState({
weixinlogin:false, weixinlogin:false,
qqlogin:false,
tab:["0"] tab:["0"]
}) })
} }
openqqlogin=()=>{
this.setState({
qqlogin:true
})
//window.location.href=`https://graph.qq.com/oauth2.0/show?which=Login&display=pc&client_id=101508858&redirect_uri=https%3a%2f%2f${window.location.host}%2otherloginqq&response_type=code`
window.location.href=`https://graph.qq.com/oauth2.0/show?which=Login&display=pc&client_id=101508858&redirect_uri=https%3a%2f%2f${window.location.host}%2fotherloginqq&response_type=code`
// window.location.href=`https://graph.qq.com/oauth2.0/show?which=Login&display=pc&client_id=101508858&redirect_uri=https%3a%2f%2fwww.educoder.net%2fotherloginstart&tp=qq&response_type=code`
}
openphoneqqlogin=()=>{
window.location.href=`https://xui.ptlogin2.qq.com/cgi-bin/xlogin?appid=716027609&pt_3rd_aid=101508858&daid=383&pt_skey_valid=0&style=35&s_url=http%3A%2F%2Fconnect.qq.com&refer_cgi=authorize&which=&client_id=101508858&response_type=code&scope=get_user_info&redirect_uri=https%3a%2f%2f${window.location.host}%2fotherloginqq&response_type=code`
}
render() { render() {
const { const {
// 登录 // 登录
@ -1040,12 +1055,31 @@ class LoginRegisterComponent extends Component {
<a onClick={()=>this.openweixinlogin()}> <a onClick={()=>this.openweixinlogin()}>
<img src={require('./img/WeChat.png')} alt="微信登录"/> <img src={require('./img/WeChat.png')} alt="微信登录"/>
</a> </a>
<a onClick={()=>this.openqqlogin()} className={"ml10"}>
<img src={require('./img/qq.png')} alt="qq登录"/>
</a>
</div> </div>
</p>:""} </p>:<p className="clearfix mb10 textcenter">
<span className={"startlogin"}> 快速登录 </span>
<div className={"mt10"}>
{/*<a onClick={()=>this.openweixinlogin()}>*/}
{/*<img src={require('./WeChat.png')} alt="微信登录"/>*/}
{/*</a>*/}
<a onClick={()=>this.openphoneqqlogin()}>
<img src={require('./img/qq.png')} alt="qq登录"/>
</a>
</div>
</p>}
</div> </div>
} }
{ {
weixinlogin===false&&parseInt(tab[0])==1 && weixinlogin===false&&parseInt(tab[0])==1 &&
<div style={{width: '340px'}}> <div style={{width: '340px'}}>
@ -1201,8 +1235,22 @@ class LoginRegisterComponent extends Component {
<a onClick={()=>this.openweixinlogin()}> <a onClick={()=>this.openweixinlogin()}>
<img src={require('./img/WeChat.png')} alt="微信登录"/> <img src={require('./img/WeChat.png')} alt="微信登录"/>
</a> </a>
<a onClick={()=>this.openqqlogin()} className={"ml10"}>
<img src={require('./img/qq.png')} alt="qq登录"/>
</a>
</div> </div>
</p>:""} </p>:<p className="clearfix mb10 textcenter">
<span className={"startlogin"}> 快速登录 </span>
<div className={"mt10"}>
{/*<a onClick={()=>this.openweixinlogin()}>*/}
{/*<img src={require('./WeChat.png')} alt="微信登录"/>*/}
{/*</a>*/}
<a onClick={()=>this.openphoneqqlogin()}>
<img src={require('./img/qq.png')} alt="qq登录"/>
</a>
</div>
</p>}
</div> </div>
} }
{weixinlogin===true?<iframe {weixinlogin===true?<iframe

@ -137,6 +137,10 @@ class AccountSecure extends Component {
font-size: 40px !important; font-size: 40px !important;
color: #4eaf2b; color: #4eaf2b;
} }
.qqlogo{
font-size: 40px !important;
color: #29a1e6;
}
.lineheight60{ .lineheight60{
line-height: 60px; line-height: 60px;
@ -146,6 +150,7 @@ class AccountSecure extends Component {
} }
`}</style> `}</style>
<div className="title">绑定登录账号</div> <div className="title">绑定登录账号</div>
<Form> <Form>
<div className="flexTable"> <div className="flexTable">
<div className="flexTable"> <div className="flexTable">
@ -202,6 +207,63 @@ class AccountSecure extends Component {
</Modal> </Modal>
</div>
<div className="flexTable">
<div className="flexTable">
</div>
<div className="flexTable">
<div className="flexRow">
<div className="name">
<i className={"iconfont icon-qq qqlogo mr10"}></i>
<span className={"color-ooo"}>QQ</span>
</div>
<div className="description lineheight60">
{basicInfo===undefined||JSON.stringify(basicInfo) == "{}"?"":basicInfo&&basicInfo.open_users.length===0?"":<span className={"color-grey-9 ml80"}>{basicInfo===undefined||JSON.stringify(basicInfo) == "{}"?"":basicInfo&&basicInfo.open_users[0].nickname}</span>}
</div>
<div className="status pt19">
<WordsBtn style={basicInfo===undefined||JSON.stringify(basicInfo) == "{}"?"":basicInfo&&basicInfo.open_users.length===0?"blue":"colorgrey9"} className={basicInfo===undefined||JSON.stringify(basicInfo) == "{}"?"":basicInfo&&basicInfo.open_users.length===0?"borderBottom":""}
onClick={
basicInfo===undefined||JSON.stringify(basicInfo) == "{}"?"":basicInfo&&basicInfo.open_users.length===0 ?() => this.showModal("wechat"):() => this.undologin("wechat",basicInfo===undefined||JSON.stringify(basicInfo) == "{}"?"":basicInfo&&basicInfo.open_users[0].id)
}
>{basicInfo===undefined||JSON.stringify(basicInfo) == "{}"?"":basicInfo&&basicInfo.open_users.length===0 ?"绑定":"解绑"}</WordsBtn>
</div>
</div>
</div>
<style>
{
`
.ml70{
margin-left: 70px;
}
`
}
</style>
<Modal
closable={false}
footer={null}
visible={this.state.visible}
onOk={this.handleOk}
onCancel={this.handleCancel}
>
<div>
<iframe
className={"weixinheight390 ml70"}
frameBorder="0"
sandbox="allow-scripts allow-same-origin allow-top-navigation"
scrolling="no"
src={`https://open.weixin.qq.com/connect/qrconnect?appid=wx6b119e2d829c13fa&redirect_uri=https%3a%2f%2f${window.location.host}%2fotherloginstart&response_type=code&scope=snsapi_login&state=account#wechat_redirect`}></iframe>
<p className="clearfix pagemancenter">
<a className={"startlogin color-blue"} onClick={()=>this.handleCancel()}>取消</a>
</p>
</div>
</Modal>
</div> </div>
</Form> </Form>
</div> </div>

Loading…
Cancel
Save