Commit cf7528cd authored by 姜登's avatar 姜登

调度器修改地址

parent 397276bc
Pipeline #24567 passed with stage
in 3 seconds
...@@ -59,8 +59,12 @@ class TaskService extends Service { ...@@ -59,8 +59,12 @@ class TaskService extends Service {
async fetchCapture({ taskId, type }) { async fetchCapture({ taskId, type }) {
const { taskAPI, ctx } = this; const { taskAPI, ctx } = this;
const { fetchCodeUrl } = taskAPI; const { fetchCodeUrl, fetchPhoneCodeUrl } = taskAPI;
const result = await this._request(fetchCodeUrl, { let url = fetchCodeUrl;
if (type == 'phone_code') {
url = fetchPhoneCodeUrl;
}
const result = await this._request(url, {
method: 'post', method: 'post',
data: { data: {
taskId, taskId,
......
...@@ -20,11 +20,12 @@ module.exports = () => { ...@@ -20,11 +20,12 @@ module.exports = () => {
appSecret: '6bc693e3ce84478482880a3600c9a78c', appSecret: '6bc693e3ce84478482880a3600c9a78c',
}; };
config.taskAPI = { config.taskAPI = {
host: 'http://tm.51gjj.com:4831', host: 'https://uat-nginx.jianbing.com/scheduler-service',
createTaskUrl: '/gjjServices/createGjjTask', createTaskUrl: '/create',
fetchCodeUrl: '/gjjServices/queryGjjCode', fetchCodeUrl: '/code',
submitTaskUrl: '/gjjServices/queryGjj', fetchPhoneCodeUrl: '/phonecode',
fetchTaskUrl: '/gjjServices/getGjjData', submitTaskUrl: '/query',
fetchTaskUrl: '/data',
}; };
config.partnerAPI = { config.partnerAPI = {
......
...@@ -24,11 +24,12 @@ module.exports = () => { ...@@ -24,11 +24,12 @@ module.exports = () => {
appSecret: '6bc693e3ce84478482880a3600c9a78c', appSecret: '6bc693e3ce84478482880a3600c9a78c',
}; };
config.taskAPI = { config.taskAPI = {
host: process.env.TASKAPI_HOST || 'http://tm.51gjj.com:4831', host: process.env.TASKAPI_HOST || 'https://uat-nginx.jianbing.com/scheduler-service',
createTaskUrl: '/gjjServices/createGjjTask', createTaskUrl: '/create',
fetchCodeUrl: '/gjjServices/queryGjjCode', fetchCodeUrl: '/code',
submitTaskUrl: '/gjjServices/queryGjj', fetchPhoneCodeUrl: '/phonecode',
fetchTaskUrl: '/gjjServices/getGjjData', submitTaskUrl: '/query',
fetchTaskUrl: '/data',
}; };
config.scriptsAPI = { config.scriptsAPI = {
......
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