Commit 68483b60 authored by wty's avatar wty

修改配置,测试6

parent 5ea17426
...@@ -3,6 +3,7 @@ const request = require('request') ...@@ -3,6 +3,7 @@ const request = require('request')
const config = require('../config/getConfig')() const config = require('../config/getConfig')()
//应用数据库 //应用数据库
console.info('CONFIG:',config)
const getMysql = new Promise((resolve)=>{ const getMysql = new Promise((resolve)=>{
request(config['remote_config_url'],{},(error, request, body)=>{ request(config['remote_config_url'],{},(error, request, body)=>{
const data = JSON.parse(body) const data = JSON.parse(body)
......
...@@ -13,7 +13,7 @@ function Index() { ...@@ -13,7 +13,7 @@ function Index() {
const history = useHistory() const history = useHistory()
const {fetchData, dataCenter, dispatch} = useContext(Root) const {fetchData, dataCenter, dispatch} = useContext(Root)
const getUser = () => { const getUser = () => {
fetchData('/users/getUser', {uid: '100001'}, 'userInfo') fetchData('/users/getUser', {}, 'userInfo')
.catch(res => .catch(res =>
+res.code === 70001 && (gotoLogin()) +res.code === 70001 && (gotoLogin())
) )
......
...@@ -16,7 +16,7 @@ function Index() { ...@@ -16,7 +16,7 @@ function Index() {
const {fetchData, dataCenter, dispatch} = useContext(Root) const {fetchData, dataCenter, dispatch} = useContext(Root)
const showPop = popComponent => {} const showPop = popComponent => {}
const getUser = () => { const getUser = () => {
fetchData('/users/getUser', {uid: '100001'}, 'userInfo') fetchData('/users/getUser', {}, 'userInfo')
.catch(res => .catch(res =>
+res.code === 70001 && (gotoLogin()) +res.code === 70001 && (gotoLogin())
) )
......
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