Commit 80805edd authored by 何娜's avatar 何娜

test

parent 29ed0406
...@@ -54,6 +54,7 @@ class TaskController extends Controller { ...@@ -54,6 +54,7 @@ class TaskController extends Controller {
const {ctx, service} = this; const {ctx, service} = this;
ctx.validate(this.createRule); ctx.validate(this.createRule);
const {scriptId, orderId, userId} = ctx.request.body; const {scriptId, orderId, userId} = ctx.request.body;
ctx.logger.info(typeof (ctx.app.cityTypeLists), 'cityTypeLists', ctx.app.cityTypeLists.length)
for(let item of ctx.app.cityTypeLists){ for(let item of ctx.app.cityTypeLists){
if(item.id === scriptId){ if(item.id === scriptId){
ctx.app.channelType = item.type; ctx.app.channelType = item.type;
...@@ -182,8 +183,8 @@ class TaskController extends Controller { ...@@ -182,8 +183,8 @@ class TaskController extends Controller {
async cityConfigs() { async cityConfigs() {
const {ctx, service} = this; const {ctx, service} = this;
ctx.validate(this.cityConfigRule); // ctx.validate(this.cityConfigRule);
await service.signature.signatureCheck(ctx.request.body); // await service.signature.signatureCheck(ctx.request.body);
ctx.success({ ctx.success({
code: 0, code: 0,
data: ctx.app.cityLists data: ctx.app.cityLists
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
module.exports = { module.exports = {
schedule: { schedule: {
interval: '30m', // 5分钟间隔 interval: '5m', // 5分钟间隔
type: 'all', // 所有woker type: 'all', // 所有woker
immediate: true, immediate: true,
}, },
...@@ -21,7 +21,7 @@ module.exports = { ...@@ -21,7 +21,7 @@ module.exports = {
contentType: 'json', contentType: 'json',
gzip: true gzip: true
}); });
ctx.logger.info('newhost', newhost + cityConfigUrl, 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) {
newret.data.data.map(Prov => { newret.data.data.map(Prov => {
Prov.citys.map(city => { Prov.citys.map(city => {
...@@ -37,7 +37,7 @@ module.exports = { ...@@ -37,7 +37,7 @@ module.exports = {
contentType: 'json', contentType: 'json',
gzip: true gzip: true
}); });
ctx.logger.info('host', host + cityConfigUrl, 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 = [];
...@@ -71,6 +71,7 @@ module.exports = { ...@@ -71,6 +71,7 @@ module.exports = {
}); });
cityLists.push(newProv); cityLists.push(newProv);
}); });
ctx.logger.info('cityLists', cityLists.length, 'cityTypeLists', cityTypeLists[0])
ctx.app.cityLists = cityLists; ctx.app.cityLists = cityLists;
ctx.app.cityTypeLists = cityTypeLists; ctx.app.cityTypeLists = cityTypeLists;
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
module.exports = { module.exports = {
schedule: { schedule: {
interval: '30m', // 5分钟间隔 interval: '5m', // 5分钟间隔
type: 'all', // 所有woker type: 'all', // 所有woker
immediate: true, immediate: true,
}, },
......
...@@ -4,7 +4,7 @@ module.exports = () => { ...@@ -4,7 +4,7 @@ module.exports = () => {
const config = exports = {}; const config = exports = {};
config.debug = true; config.debug = true;
config.projectRootPath = '/IncomeTax'; config.projectRootPath = '/taxh5';
config.redis = { config.redis = {
client: { client: {
......
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