Commit a8370d71 authored by 何娜's avatar 何娜

Update cityList.js

parent 4cfda883
Pipeline #4417 passed with stage
in 2 seconds
...@@ -22,12 +22,16 @@ module.exports = { ...@@ -22,12 +22,16 @@ module.exports = {
gzip: true gzip: true
}); });
ctx.logger.info('cityList--newhost', newhost, JSON.stringify(newret.data.code)); ctx.logger.info('cityList--newhost', newhost, JSON.stringify(newret.data.code));
if (newret.data.code === 0) { if (newret.data.code == 0) {
ctx.logger.info('newret-start')
newret.data.data.map(Prov => { newret.data.data.map(Prov => {
Prov.citys.map(city => { Prov.citys.map(city => {
newCityMap.set(String(city.id), city) newCityMap.set(String(city.id), city)
}) })
}) })
ctx.logger.info('newCityMap', newCityMap)
}else{
ctx.logger.info('newCityMap- fail' )
} }
const ret = await ctx.curl(host + cityConfigUrl, { const ret = await ctx.curl(host + cityConfigUrl, {
...@@ -38,7 +42,7 @@ module.exports = { ...@@ -38,7 +42,7 @@ module.exports = {
gzip: true gzip: true
}); });
ctx.logger.info('cityList--host', host, JSON.stringify(ret.data.code)); ctx.logger.info('cityList--host', host, JSON.stringify(ret.data.code));
if (ret.data.code === 0) { if (ret.data.code == 0) {
cityLists = []; cityLists = [];
cityTypeLists = []; cityTypeLists = [];
ctx.logger.info('start') ctx.logger.info('start')
......
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