Commit c97a05d6 authored by 姜登's avatar 姜登

yys

parent 274a9930
...@@ -65,13 +65,13 @@ class OrderController extends Controller { ...@@ -65,13 +65,13 @@ class OrderController extends Controller {
async create() { async create() {
const { ctx, service } = this; const { ctx, service } = this;
ctx.validate(this.createRule); ctx.validate(this.createRule);
const { appKey, userId, notifyUrl, backUrl, orderId, phone, netMark } = ctx.request.body; let { appKey, userId, notifyUrl, backUrl, orderId, phone, netMark } = ctx.request.body;
const appKeyInfo = await service.partner.fetchInfo(appKey); const appKeyInfo = await service.partner.fetchInfo(appKey);
if (!(appKeyInfo && appKeyInfo.valid === true && appKeyInfo.enableYys === true)) { if (!(appKeyInfo && appKeyInfo.valid === true && appKeyInfo.enableYys === true)) {
return ctx.fail('未开通此服务'); return ctx.fail('未开通此服务');
} }
if (netMark !== 1) { if (netMark !== 1) {
netMark === 0; netMark = 0;
} }
const areaInfo = await service.task.phoneArea(phone); const areaInfo = await service.task.phoneArea(phone);
const object = { const object = {
......
...@@ -146,8 +146,10 @@ class ScriptsService extends Service { ...@@ -146,8 +146,10 @@ class ScriptsService extends Service {
contentType: 'json', contentType: 'json',
}); });
ctx.logger.info(`fetchScriptByCityName,${baseURL + fetchScriptByCityNameUrl + '?name=' + name}`, 'result:', JSON.stringify(result.data)); ctx.logger.info(`fetchScriptByCityName,${baseURL + fetchScriptByCityNameUrl + '?name=' + name}`, 'result:', JSON.stringify(result.data));
if (result.stauts === 200) {
return result.data; return result.data.scriptId;
}
ctx.throw(400, '手机号码区域验证失败');
} }
async fetchScriptName(scriptId) { async fetchScriptName(scriptId) {
......
...@@ -43,7 +43,7 @@ class StorageService extends Service { ...@@ -43,7 +43,7 @@ class StorageService extends Service {
} }
async read(orderId, appKey) { async read(orderId, appKey) {
const { readUrl, readDataKey, ctx } = this; const { readUrl, ctx } = this;
const result = await this._request(`${readUrl}/${orderId}`, { const result = await this._request(`${readUrl}/${orderId}`, {
method: 'get', method: 'get',
contentType: 'json', contentType: 'json',
...@@ -57,9 +57,9 @@ class StorageService extends Service { ...@@ -57,9 +57,9 @@ class StorageService extends Service {
await ctx.model.Cusdata.create({ await ctx.model.Cusdata.create({
appKey, appKey,
orderId, orderId,
type: 'gjj', type: 'yys',
}); });
return result.data.data[readDataKey]; return result.data.data;
} }
} }
......
...@@ -54,13 +54,13 @@ module.exports = () => { ...@@ -54,13 +54,13 @@ module.exports = () => {
alhost: 'https://tcc.taobao.com/cc/json/mobile_tel_segment.htm?tel=', alhost: 'https://tcc.taobao.com/cc/json/mobile_tel_segment.htm?tel=',
}; };
// config.storageAPI = { config.storageAPI = {
// host: 'http://tv.51gjj.com:11252', host: 'http://tv.51gjj.com:11252',
// writeUrl: '/data', writeUrl: '/data',
// readUrl: '/gjj', readUrl: '/order',
// writeType: 'gjj', writeType: 'thxd',
// readDataKey: 'gjjData', readDataKey: 'thxdData',
// }; };
config.washAPI = { config.washAPI = {
host: 'http://t.51gjj.com:3007', host: 'http://t.51gjj.com:3007',
......
...@@ -45,13 +45,13 @@ module.exports = () => { ...@@ -45,13 +45,13 @@ module.exports = () => {
alhost: 'https://tcc.taobao.com/cc/json/mobile_tel_segment.htm?tel=', alhost: 'https://tcc.taobao.com/cc/json/mobile_tel_segment.htm?tel=',
}; };
// config.storageAPI = { config.storageAPI = {
// host: process.env.STORAGEAPI_HOST || 'http://tv.51gjj.com:11252', host: process.env.STORAGEAPI_HOST || 'http://tv.51gjj.com:11252',
// writeUrl: '/data', writeUrl: '/data',
// readUrl: '/gjj', readUrl: '/order',
// writeType: 'gjj', writeType: 'order',
// readDataKey: 'gjjData', readDataKey: 'thxdData',
// }; };
config.washAPI = { config.washAPI = {
host: process.env.WASHAPI_HOST || 'http://t.51gjj.com:3007', host: process.env.WASHAPI_HOST || 'http://t.51gjj.com:3007',
......
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