Commit 26ef2629 authored by mayongxin's avatar mayongxin

宿主管理接口替换

parent 55e0f46b
Pipeline #24261 skipped with stages
import React, { useState, useEffect } from 'react'
import { Card } from 'antd'
import styles from './BaseConfig.less'
import { S_GetDataBaseConfig, GetTCPConfigInfo } from '../../../../services/platform/hostmanager'
import { S_GetDataBaseConfig, GetTCPConfigInfo,GetDataBaseConfig,GetBasicInfo } from '../../../../services/platform/hostmanager'
......@@ -9,7 +10,7 @@ const BaseConfig = () => {
const [currentDataBase, setCurrentDataBase] = useState({});
const [currentSiteInfo, setcurrentSiteInfo] = useState({getMe:[{SiteCode:""}]});
const [currentSiteInfo, setcurrentSiteInfo] = useState("");
useEffect(() => {
......@@ -18,25 +19,39 @@ const BaseConfig = () => {
},[])
const getCurrentConfig = () => {
S_GetDataBaseConfig({
_version: 9999,
_dc: new Date().getTime(),
}).then(
res => {
if (res.success === true) {
setCurrentDataBase(res)
// S_GetDataBaseConfig({
// _version: 9999,
// _dc: new Date().getTime(),
// }).then(
// res => {
// if (res.success === true) {
// setCurrentDataBase(res)
// }
// }
// )
GetDataBaseConfig().then(
res =>{
if(res.code === 0){
setCurrentDataBase(res.data)
}
}
)
}
const getSiteCode = () => {
GetTCPConfigInfo({
_version: 9999,
_dc: new Date().getTime(),
}).then(
res => {
if (res.say.statusCode === '0000') {
setcurrentSiteInfo(res)
// GetTCPConfigInfo({
// _version: 9999,
// _dc: new Date().getTime(),
// }).then(
// res => {
// if (res.say.statusCode === '0000') {
// setcurrentSiteInfo(res)
// }
// }
// )
GetBasicInfo().then(
res =>{
if(res.code === 0 ){
setcurrentSiteInfo(res.data)
}
}
)
......@@ -62,7 +77,7 @@ const BaseConfig = () => {
</Card>
<Card title="站点信息" style={{ width: 300, marginLeft: 15 }}>
<Card type="inner" title="站点编号" style={{ margin: 10 }}>
{currentSiteInfo.getMe[0].SiteCode}
{currentSiteInfo}
</Card>
</Card>
</div>
......
......@@ -5,4 +5,8 @@ export const S_GetDataBaseConfig = param =>
get(`${CITY_SERVICE}/OMS.svc/S_GetDataBaseConfig`, param);
export const GetTCPConfigInfo = param =>
get(`${CITY_SERVICE}/MessagePlatform.svc/MessageManage/GetTCPConfigInfo`, param);
\ No newline at end of file
get(`${CITY_SERVICE}/MessagePlatform.svc/MessageManage/GetTCPConfigInfo`, param);
export const GetDataBaseConfig = param =>
get(`${PUBLISH_SERVICE}/DBManager/GetDataBaseConfig`, param);
export const GetBasicInfo = param =>
get(`${PUBLISH_SERVICE}/Message/GetBasicInfo`, param);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment