diff --git a/app/controllers/oauth/base_controller.rb b/app/controllers/oauth/base_controller.rb
index a9c3f9fe4..e4068fbda 100644
--- a/app/controllers/oauth/base_controller.rb
+++ b/app/controllers/oauth/base_controller.rb
@@ -20,6 +20,7 @@ class Oauth::BaseController < ActionController::Base
end
def auth_hash
+ Rails.logger.info("[OAuth2] omniauth.auth -> #{request.env['omniauth.auth'].inspect}")
request.env['omniauth.auth']
end
end
\ No newline at end of file
diff --git a/app/libs/omniauth/strategies/qq.rb b/app/libs/omniauth/strategies/qq.rb
index 169524e23..97cd9de94 100644
--- a/app/libs/omniauth/strategies/qq.rb
+++ b/app/libs/omniauth/strategies/qq.rb
@@ -48,8 +48,8 @@ module OmniAuth
def user_info
access_token.options[:mode] = :query
- params = { oauth_consumer_key: options.client_id, openid: uid, format: 'json', parse: :json }
- @user_info ||= access_token.get('/user/get_user_info', params: params).parsed
+ param = { oauth_consumer_key: options[:client_id], openid: uid, format: 'json' }
+ @user_info ||= access_token.get('/user/get_user_info', params: param, parse: :json).parsed
end
end
end
diff --git a/app/services/oauth/create_or_find_qq_account_service.rb b/app/services/oauth/create_or_find_qq_account_service.rb
index c258993bd..92966634c 100644
--- a/app/services/oauth/create_or_find_qq_account_service.rb
+++ b/app/services/oauth/create_or_find_qq_account_service.rb
@@ -28,7 +28,7 @@ class Oauth::CreateOrFindQqAccountService < ApplicationService
user.create_user_extension!(gender: gender)
# 下载头像
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
new_open_user = OpenUsers::QQ.create!(user: user, uid: params['uid'], extra: params.dig('extra', 'raw_info'))
diff --git a/public/react/readme.txt b/public/react/readme.txt
index 92dc5a46b..0f085af23 100644
--- a/public/react/readme.txt
+++ b/public/react/readme.txt
@@ -1,3 +1,8 @@
+其他的文档位置:
+/educoder/public/react/public/js/readme.txt 关于js_min_all
+/educoder/educoder/public/react/scripts/readme-cdn.txt 关于CDN
+/educoder/public/react/src/modules/page/readme.txt 关于TPI
+
1、 安装node v6.9.x;此安装包含了node和npm。
2、 安装cnpm(命令行): npm install -g cnpm --registry=https://registry.npm.taobao.org
diff --git a/public/react/src/App.js b/public/react/src/App.js
index e4cd6a732..84b5c0ae4 100644
--- a/public/react/src/App.js
+++ b/public/react/src/App.js
@@ -75,7 +75,10 @@ const Otherloginstart=Loadable({
loader: () => import('./modules/login/Otherloginstart'),
loading: Loading,
})
-
+const Otherloginsqq=Loadable({
+ loader: () => import('./modules/login/Otherloginqq'),
+ loading: Loading,
+})
// const TestIndex = Loadable({
// loader: () => import('./modules/test'),
// loading: Loading,
@@ -527,6 +530,9 @@ class App extends Component {
+
diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js
index ece36b61c..c0dbc6687 100644
--- a/public/react/src/AppConfig.js
+++ b/public/react/src/AppConfig.js
@@ -46,6 +46,7 @@ export function initAxiosInterceptors(props) {
//proxy="http://47.96.87.25:48080"
proxy="https://pre-newweb.educoder.net"
proxy="https://test-newweb.educoder.net"
+ //proxy="http://192.168.2.63:3001"
// 在这里使用requestMap控制,避免用户通过双击等操作发出重复的请求;
// 如果需要支持重复的请求,考虑config里面自定义一个allowRepeat参考来控制
@@ -73,15 +74,22 @@ export function initAxiosInterceptors(props) {
}
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 (window.location.port === "3007") {
- if (url.indexOf('.json') == -1) {
-
- alert('开发提示:请给接口加.json:' + url)
-
- }
+ // if (url.indexOf('.json') == -1) {
+ //
+ // alert('开发提示:请给接口加.json:' + url)
+ //
+ // }
config.url = `${proxy}${url}`;
if (config.url.indexOf('?') == -1) {
config.url = `${config.url}?debug=${debugType}`;
diff --git a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js
index cd61d02d2..1df901d97 100644
--- a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js
+++ b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js
@@ -117,12 +117,12 @@ class ShixunHomeworkPage extends Component {
/// 重做的确认
ModalSaves=()=>{
- this.setState({
- ModalsType:false,
- Modalstopval:""
- });
+ this.setState({
+ ModalsType:false,
+ Modalstopval:""
+ });
if(this.state.teacherdatapage){
- this.resetshixunCombat(this.state.teacherdatapage.myshixun_identifier);
+ this.resetshixunCombat(this.state.teacherdatapage.myshixun_identifier);
}
try {
console.log("this.child");
@@ -149,29 +149,29 @@ class ShixunHomeworkPage extends Component {
}
//重置按钮
resetshixunCombat=(id)=>{
- this.setState({
- mylistisSpin:true,
+ this.setState({
+ mylistisSpin:true,
+ })
+ let zrl=`/myshixuns/${id}/reset_my_game.json`;
+ axios.get(zrl).then((response) => {
+ // window.location.href = "/shixuns/" + response.data.shixun_identifier + "/challenges";
+ this.setState({
+ mylistisSpin:false,
+ })
+ this.child.Isupdatass();
+ this.props.showNotification("已清空本实训的学习记录\n" +
+ "\n" +
+ "请点击“开启挑战”重做实训作业");
+ }).catch((error) => {
+ this.setState({
+ mylistisSpin:false,
})
- let zrl=`/myshixuns/${id}/reset_my_game.json`;
- axios.get(zrl).then((response) => {
- // window.location.href = "/shixuns/" + response.data.shixun_identifier + "/challenges";
- this.setState({
- mylistisSpin:false,
- })
- this.child.Isupdatass();
- this.props.showNotification("已清空本实训的学习记录\n" +
- "\n" +
- "请点击“开启挑战”重做实训作业");
- }).catch((error) => {
- this.setState({
- mylistisSpin:false,
- })
- console.log(error)
- });
+ console.log(error)
+ });
}
bindRef = ref => { this.child = ref }
///////////////教师截止
- //编辑作业
+ //编辑作业
Showupdateinstructionsboolfalse (bool) {
this.setState({
Showupdateinstructions:bool
@@ -183,7 +183,7 @@ class ShixunHomeworkPage extends Component {
Showupdateinstructions:true
})
}
- gotohome=()=>{
+ gotohome=()=>{
// console.log(this.props)
let {jobsettingsdatapage}=this.state
@@ -194,7 +194,7 @@ class ShixunHomeworkPage extends Component {
const isAdmin = this.props.isAdmin();
// console.log(119)
- // console.log(jobsettingsdatapage);
+ // console.log(jobsettingsdatapage);
document.title=jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.course_name;
return (
@@ -224,34 +224,34 @@ class ShixunHomeworkPage extends Component {
}
-
- {parseInt(tab) === 0 ? this.Getdataback(jobsettingsdata, teacherdata)}>:""}
- {parseInt(tab) === 1 ? this.Getdataback(jobsettingsdata, teacherdata)} Showupdateinstructionsboolfalse={(i)=>this.Showupdateinstructionsboolfalse(i)}>:""}
- {parseInt(tab) === 2 ? this.Getdataback(jobsettingsdata, teacherdata)}>:""}
- {parseInt(tab) === 3 ? this.Getdataback(jobsettingsdata, teacherdata)}>:""}
-
+ {parseInt(tab) === 0 ? this.Getdataback(jobsettingsdata, teacherdata)}>:""}
+ {parseInt(tab) === 1 ? this.Getdataback(jobsettingsdata, teacherdata)} Showupdateinstructionsboolfalse={(i)=>this.Showupdateinstructionsboolfalse(i)}>:""}
+ {parseInt(tab) === 2 ? this.Getdataback(jobsettingsdata, teacherdata)}>:""}
+ {parseInt(tab) === 3 ? this.Getdataback(jobsettingsdata, teacherdata)}>:""}
+
)
diff --git a/public/react/src/modules/login/LoginDialog.css b/public/react/src/modules/login/LoginDialog.css
index 9a9373770..37e2f48b6 100644
--- a/public/react/src/modules/login/LoginDialog.css
+++ b/public/react/src/modules/login/LoginDialog.css
@@ -136,12 +136,18 @@
.startlogin{
color:#888;
}
+
.weixinheight390{
height: 390px;
}
+
+.qqheight390{
+ width: 450px;
+ height: 390px;
+}
#log_reg_content {
padding: 38px 30px 20px !important;
}
.textcenter{
text-align: center;
-}
\ No newline at end of file
+}
diff --git a/public/react/src/modules/login/LoginDialog.js b/public/react/src/modules/login/LoginDialog.js
index 6bd6ac41f..68a01d383 100644
--- a/public/react/src/modules/login/LoginDialog.js
+++ b/public/react/src/modules/login/LoginDialog.js
@@ -7,7 +7,7 @@ import Dialog, {
DialogContentText,
DialogTitle,
} from 'material-ui/Dialog';
-import {notification } from 'antd';
+import {notification,Modal } from 'antd';
import axios from 'axios';
@@ -104,8 +104,8 @@ class LoginDialog extends Component {
MyEduCoderModals:false,
Phonenumberisnotco:undefined,
Phonenumberisnotcobool:false,
- weixinlogin:false
-
+ weixinlogin:false,
+ qqlogin:false
};
}
enter=(num) =>{
@@ -529,14 +529,28 @@ class LoginDialog extends Component {
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=()=>{
this.setState({
- weixinlogin:false
+ weixinlogin:false,
+ qqlogin:false
})
}
render() {
- let{open,login,speedy,loginValue,regular,isGoing,isGoingValue,disabled,bottonclass,Phonenumberisnotco,
- dialogBox,shortcutnum,disabledType,gaincode,authCodeType,authCodeclass, isRender,weixinlogin}=this.state;
+ let{qqlogin,login,isGoing,isGoingValue,disabled,bottonclass,Phonenumberisnotco,
+ dialogBox, isRender,weixinlogin}=this.state;
if (isRender === undefined) {
isRender = false
@@ -659,8 +673,22 @@ class LoginDialog extends Component {
this.openweixinlogin()}>
+ this.openqqlogin()} className={"ml10"}>
+
+
- :""}
+ :
+
+ ———————— 快速登录 ————————
+
+ }
}
{weixinlogin===true?:""}
- {weixinlogin===true?
+
+
+ {weixinlogin===true?
this.hideweixinlogin()}>返回账号登录
:""}
@@ -690,110 +720,3 @@ class LoginDialog extends Component {
export default LoginDialog ;
-
-// onkeypress="user_login_keypress(event);"
-
-// onkeypress="user_login_keypress(event);"
-
-
-{/* }
-
-
-
-{/*第三方账号登录*/}
-
-{/* }
-
-//
-// {/**/}
diff --git a/public/react/src/modules/login/Otherlogin.js b/public/react/src/modules/login/Otherlogin.js
index 73f0c6dc6..59710ab2f 100644
--- a/public/react/src/modules/login/Otherlogin.js
+++ b/public/react/src/modules/login/Otherlogin.js
@@ -132,6 +132,8 @@ class Otherlogin extends Component {
}
postwechatlogin=(type,username,password)=>{
+ let query=this.props.location.search;
+ const types = query.split('?type=');
if(type===false){
if(username===undefined||username===""||username===null){
this.setState({
@@ -146,9 +148,11 @@ class Otherlogin extends Component {
return
}
}
+
+
let url = "/bind_user.json";
axios.post(url, {
- type: 'wechat',
+ type: types[1]==="qq"?"qq":'wechat',
not_bind:type,
username:username,
password:password
diff --git a/public/react/src/modules/login/Otherloginqq.js b/public/react/src/modules/login/Otherloginqq.js
new file mode 100644
index 000000000..ae614b474
--- /dev/null
+++ b/public/react/src/modules/login/Otherloginqq.js
@@ -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 (
+
+
+
+
+ );
+ }
+}
+
+export default Otherloginqq;
\ No newline at end of file
diff --git a/public/react/src/modules/login/Otherloginstart.js b/public/react/src/modules/login/Otherloginstart.js
index fc5d46bbc..9901fc8ad 100644
--- a/public/react/src/modules/login/Otherloginstart.js
+++ b/public/react/src/modules/login/Otherloginstart.js
@@ -8,31 +8,34 @@ class Otherloginstart extends Component {
componentDidMount() {
let query=this.props.location.search;
- const type = query.split('?code=');
- const types = type[1].split('&state=');
- console.log(types)
- let codeurl = `/auth/wechat/callback.json`
- axios.get(codeurl,{params:{
- code:types[0]
- }}).then((result)=> {
- if(result){
- if(result.data.status===0){
- if(result.data.new_user===true){
- window.location.href="/otherlogin"
- }else{
- // this.getinfo()
- if(types[1]==="account"){
- window.location.href="/account/binding"
+ debugger
+ if(query!= ""){
+ const type = query.split('?code=');
+ const types = type[1].split('&state=');
+ let codeurl = `/auth/wechat/callback.json`
+ axios.get(codeurl,{params:{
+ code:types[0]
+ }}).then((result)=> {
+ if(result){
+ if(result.data.status===0){
+ if(result.data.new_user===true){
+ window.location.href="/otherlogin?type=wechat"
}else{
- window.location.href="/"
- }
+ // this.getinfo()
+ if(types[1]==="account"){
+ window.location.href="/account/binding"
+ }else{
+ window.location.href="/"
+ }
+ }
}
}
- }
- }).catch((error)=>{
+ }).catch((error)=>{
+
+ })
+ }
- })
}
diff --git a/public/react/src/modules/page/readme.txt b/public/react/src/modules/page/readme.txt
index 21c2ce13c..882c48ee5 100644
--- a/public/react/src/modules/page/readme.txt
+++ b/public/react/src/modules/page/readme.txt
@@ -1,3 +1,131 @@
+state说明
+ tasks详情接口
+ allowed_unlock 为true时,才允许非管理员用户解锁隐藏测试集
+ discusses_count 总评论数
+
+ challenge 实训关卡信息
+ exec_time --
+ modify_time --
+ path 关卡文件路径
+ position 第几关
+ praises_count 点赞数
+ score 分数
+ shixun_id
+ st 0-编程题 1-选择题
+ subject 关卡名称
+ task_pass 过关任务
+ web_route --
+
+ game 为每一个用户独立创建的实训关卡对应的信息
+ accuracy --
+ answer_deduction--
+ answer_open --
+ challenge_id
+ cost_time 通关耗时
+ created_at
+ end_time
+ evaluate_count
+ final_score
+ id
+ identifier
+ modify_time
+ myshixun_id
+ open_time
+ picture_path
+ resubmit_identifier
+ retry_status
+ star
+ status 2-已通关
+ test_sets_view true-测试集已解锁
+ updated_at
+ user_id
+ game_count 关卡数
+ git_url 仓库地址,vnc会用到
+ has_answer
+ is_teacher 是否是老师 初始化被赋值到 user.is_teacher
+ last_compile_output
+ mirror_name 镜像名称 TPIMonaco会用到这个属性来判断当前关卡使用的什么语言 见 mirror2LanguageMap
+ myshixun
+ commit_id: "80cb6fc55a14bdd64a9c99913f416966238ed3de"
+ created_at: "2019-07-26T09:00:31.000+08:00"
+ git_url: null
+ gpid: null
+ id: 542543
+ identifier: "ns53g8vfeo" 有些接口会用到
+ is_public: true
+ modify_time: "2017-11-02T18:12:23.000+08:00"
+ onclick_time: "2019-07-26T09:00:31.000+08:00"
+ repo_name: "p15478209/ns53g8vfeo20190726090031"
+ reset_time: "2017-10-25T09:33:03.000+08:00"
+ shixun_id: 61
+ status: 0
+ system_tip: true (如果修改了测试集 || 修改了代码) && system_tip为true 也就是下面代码为true时,才显示更新通知弹框
+ const showUpdateButton = (tpm_cases_modified || needUpdateScript) && myshixun.system_tip === true;
+ updated_at: "2019-11-05T10:58:35.000+08:00"
+ user_id: 24731
+ myshixun_manager: true
+ next_game: "so7ijzqe63a9" 下一关identifier
+ praise_count: 120 点赞数
+ prev_game: "bxg5w9uonhts" 上一关identifier
+ record_onsume_time: 0.296 上一次评测耗时 初始化被赋值到newResData.record = newResData.record_onsume_time
+ sets_error_count: 0 失败测试集数量
+ shixun
+ authentication: false
+ averge_star: 4.9
+ can_copy: false
+ challenges_count: 4 关卡数
+ closer_id: null
+ code_edit_permission: false 是否允许修改代码
+ code_hidden: false 是否隐藏文件目录按钮
+ created_at: "2017-06-09T11:32:16.000+08:00"
+ end_time: null
+ excute_time: null
+ exec_time: 25
+ forbid_copy: false forbid_copy ? "不允许学员复制和粘贴代码" : "允许学员复制和粘贴代码"
+ fork_from: null
+ git_url: "educoder/uznmbg54"
+ gpid: 2448
+ hidden: false
+ hide_code: false 是否隐藏代码tab
+ homepage_show: true
+ id: 61
+ identifier: "uznmbg54"
+ image_text: null
+ language: "Python3.6" !!
+ major_id: 635
+ mirror_script_id: null
+ modify_time: "2017-11-02T18:12:23.000+08:00"
+ multi_webssh: false 多命令行tab
+ myshixuns_count: 9655 学员数
+ name: "Python表达式问题求解(一)※"
+ opening_time: null
+ pod_life: 0
+ publish_time: "2017-09-01T10:37:49.000+08:00"
+ repo_name: "educoder/uznmbg54"
+ reset_time: "2017-10-25T09:33:03.000+08:00"
+ sigle_training: false
+ status: 2 shixun.status >= 2 实训已发布 shixun.status <= 1 模拟实战
+ task_pass: task_pass ? "允许学员跳关挑战" : "不允许学员跳关挑战"
+ test_set_permission: true test_set_permission ? "允许学员通过金币解锁查看测试集内容" : "不允许学员通过金币解锁查看测试集内容"
+ trainee: 1
+ updated_at: "2019-10-11T08:50:59.000+08:00"
+ use_scope: 0
+ user_id: 3039
+ users_count: 4
+ visits: 69699
+ webssh: 1 是否显示命令行tab
+ st 0-编程题 1-选择题
+ test_sets 测试集
+ test_sets_count: 1
+ time_limit: 25 game_status.json轮训次数
+ tomcat_url: "http://47.96.157.89" web类型实训,可以打开展现一个测试服务,用来查看评测结果 const webDisplayUrl = `${tomcat_url}:${data.port}/${path}`
+ tpm_cases_modified: false 参考system_tip属性
+ tpm_modified: true 参考system_tip属性
+ user 当前关卡所属用户的信息
+ user_praise 当前用户是否点赞
+
+-------------- -------------- -------------- -------------- -------------- -------------- -------------- -------------- --------------
+
TPIContextProvider
tpi主要的state容器,主要接口:`/tasks/${stageId}.json`,一次性获取所有tpi首屏展示所需要的信息,除了代码内容。
接口返回的内容包括
@@ -54,4 +182,21 @@ TPIContextProvider
没用的文件
LeftNav.js
- AnswerListContainer.js left 他人解答
\ No newline at end of file
+ AnswerListContainer.js left 他人解答
+
+
+
+
+
+TPI SSH
+ 命令行的js资源都位于这个目录:/react/public/js/jsFromMiddleLayer/base64.js
+
+ /page/main/CodeRepositoryView.js文件中,open_webssh.json接口返回后,会根据代码区试图大小计算ssh视图的大小(同样的逻辑在js_min_all中也有:
+ var h = $("#games_repository_contents").height() - $("#top_repository").height() - repositoryTabHeight; )
+ 这里有个对应的issue https://www.trustie.net/issues/25279
+ 这里是要判断特殊的屏幕(公司dell笔记本可重现),针对这些情况处理,加高命令行的高度
+ ps js_min_all中搜`$("#games_repository_contents").height()`可以找到相关代码
+
+
+VNCDisplay
+ 使用的github上的代码 https://github.com/novnc/noVNC/
\ No newline at end of file
diff --git a/public/react/src/modules/user/LoginRegisterComponent.js b/public/react/src/modules/user/LoginRegisterComponent.js
index 52e0d6869..3e5731c69 100644
--- a/public/react/src/modules/user/LoginRegisterComponent.js
+++ b/public/react/src/modules/user/LoginRegisterComponent.js
@@ -68,6 +68,7 @@ class LoginRegisterComponent extends Component {
registered:undefined,
Phonenumberisnotcodmms:undefined,
weixinlogin:false,
+ qqlogin:false
}
}
if(props.loginstatus === false){
@@ -106,7 +107,7 @@ class LoginRegisterComponent extends Component {
registered:undefined,
Phonenumberisnotcodmms:undefined,
weixinlogin:false,
-
+ qqlogin:false
}
}
}
@@ -892,9 +893,23 @@ class LoginRegisterComponent extends Component {
hideweixinlogin=()=>{
this.setState({
weixinlogin:false,
+ qqlogin:false,
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() {
const {
// 登录
@@ -1040,12 +1055,31 @@ class LoginRegisterComponent extends Component {
this.openweixinlogin()}>
+ this.openqqlogin()} className={"ml10"}>
+
+
+
+ :
+
+ ———————— 快速登录 ————————
+
- :""}
+ }
}
+
+
+
+
+
{
weixinlogin===false&&parseInt(tab[0])==1 &&
+ :
+
+ ———————— 快速登录 ————————
+
- :""}
+ }
}
{weixinlogin===true?