complete api ver param
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
import React, {Component, PureComponent} from 'react';
|
import React, {Component, PureComponent} from 'react';
|
||||||
import {PKUHELPER_ROOT,get_json} from './flows_api';
|
import {PKUHELPER_ROOT, get_json, API_VERSION_PARAM} from './flows_api';
|
||||||
import {Time} from './Common';
|
import {Time} from './Common';
|
||||||
|
|
||||||
export class MessageViewer extends PureComponent {
|
export class MessageViewer extends PureComponent {
|
||||||
@@ -20,7 +20,7 @@ export class MessageViewer extends PureComponent {
|
|||||||
this.setState({
|
this.setState({
|
||||||
loading_status: 'loading',
|
loading_status: 'loading',
|
||||||
},()=>{
|
},()=>{
|
||||||
fetch(PKUHELPER_ROOT+'api_xmcp/hole/system_msg?user_token='+encodeURIComponent(this.props.token))
|
fetch(PKUHELPER_ROOT+'api_xmcp/hole/system_msg?user_token='+encodeURIComponent(this.props.token)+API_VERSION_PARAM())
|
||||||
.then(get_json)
|
.then(get_json)
|
||||||
.then((json)=>{
|
.then((json)=>{
|
||||||
if(json.error)
|
if(json.error)
|
||||||
|
|||||||
@@ -92,7 +92,9 @@ export class LoginForm extends Component {
|
|||||||
loading_status: 'loading',
|
loading_status: 'loading',
|
||||||
},()=>{
|
},()=>{
|
||||||
fetch(
|
fetch(
|
||||||
PKUHELPER_ROOT+'api_xmcp/isop/'+api_name+'?user='+encodeURIComponent(this.username_ref.current.value),
|
PKUHELPER_ROOT+'api_xmcp/isop/'+api_name
|
||||||
|
+'?user='+encodeURIComponent(this.username_ref.current.value)
|
||||||
|
+API_VERSION_PARAM()
|
||||||
)
|
)
|
||||||
.then(get_json)
|
.then(get_json)
|
||||||
.then((json)=>{
|
.then((json)=>{
|
||||||
@@ -127,7 +129,7 @@ export class LoginForm extends Component {
|
|||||||
data.append('username', this.username_ref.current.value);
|
data.append('username', this.username_ref.current.value);
|
||||||
data.append('valid_code', this.password_ref.current.value);
|
data.append('valid_code', this.password_ref.current.value);
|
||||||
data.append('isnewloginflow', 'true');
|
data.append('isnewloginflow', 'true');
|
||||||
fetch(LOGIN_BASE+'/login.php?platform=webhole', {
|
fetch(LOGIN_BASE+'/login.php?platform=webhole'+API_VERSION_PARAM(), {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/x-www-form-urlencoded',
|
'Content-Type': 'application/x-www-form-urlencoded',
|
||||||
|
|||||||
Reference in New Issue
Block a user