forked from newthuhole/hole_thu_frontend
use new backend
This commit is contained in:
12
src/App.js
12
src/App.js
@@ -3,20 +3,10 @@ import {Flow} from './Flows';
|
||||
import {Title} from './Title';
|
||||
import {Sidebar} from './Sidebar';
|
||||
import {PressureHelper} from './PressureHelper';
|
||||
import {TokenCtx,ISOP_APPKEY} from './UserAction';
|
||||
import {TokenCtx} from './UserAction';
|
||||
import {load_config,bgimg_style} from './Config';
|
||||
|
||||
function DeprecatedAlert(props) {
|
||||
if(document.domain==='hole.xmcp.ml')
|
||||
return (
|
||||
<div className="flow-item">
|
||||
<div className="box box-tip">
|
||||
<p><b>请使用新域名访问P大树洞!</b></p>
|
||||
<p><a href="http://pkuhelper.pku.edu.cn/hole/">pkuhelper.pku.edu.cn/hole</a></p>
|
||||
<p>当前域名将停止支持</p>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
import React, {Component, PureComponent} from 'react';
|
||||
import {ISOP_APPKEY,ISOP_APPCODE,ISOP_SVCID} from './infrastructure/const';
|
||||
import copy from 'copy-to-clipboard';
|
||||
import {API_BASE,SafeTextarea} from './Common';
|
||||
import {MessageViewer} from './Message';
|
||||
import {API_VERSION_PARAM,PKUHELPER_ROOT,API,get_json} from './flows_api';
|
||||
import md5 from 'md5';
|
||||
|
||||
import './UserAction.css';
|
||||
|
||||
@@ -15,8 +13,6 @@ const MAX_IMG_DIAM=8000;
|
||||
const MAX_IMG_PX=6000000;
|
||||
const MAX_IMG_FILESIZE=450000*BASE64_RATE;
|
||||
|
||||
export {ISOP_APPKEY,ISOP_APPCODE,ISOP_SVCID};
|
||||
|
||||
export const TokenCtx=React.createContext({
|
||||
value: null,
|
||||
set_value: ()=>{},
|
||||
@@ -95,15 +91,8 @@ export class LoginForm extends Component {
|
||||
this.setState({
|
||||
loading_status: 'loading',
|
||||
},()=>{
|
||||
let param=
|
||||
'user='+this.username_ref.current.value+
|
||||
'&svcId='+ISOP_SVCID+
|
||||
'&appKey='+ISOP_APPKEY+
|
||||
'×tamp='+(+new Date());
|
||||
|
||||
fetch(
|
||||
PKUHELPER_ROOT+'isop_proxy/'+api_name+'?'+param+
|
||||
'&msg='+md5(param+ISOP_APPCODE),
|
||||
PKUHELPER_ROOT+'api_xmcp/isop/'+api_name+'?user='+encodeURIComponent(this.username_ref.current.value),
|
||||
)
|
||||
.then(get_json)
|
||||
.then((json)=>{
|
||||
|
||||
Submodule src/infrastructure updated: 1bbc568e5f...d1b302d3d1
Reference in New Issue
Block a user