Commit 91628a1a authored by Hsinli's avatar Hsinli

addd

parent 6644965e
Pipeline #19328 passed with stage
in 30 seconds
......@@ -18,9 +18,8 @@ class CheckController extends Controller {
async getCheck() {
const { ctx } = this;
let params = ctx.request.query;
ctx.logger.info('params:-----' + JSON.stringify(params));
let businessId = params['business_id'] ? Number(params['business_id']) : 142;
const ret = await ctx.service.duxiaoman.check.check(businessId);
ctx.logger.info('params:' + JSON.stringify(params));
const ret = await ctx.service.duxiaoman.check.check(params);
ctx.success(ret);
}
......
......@@ -75,7 +75,7 @@ class CheckService extends Service {
return sign;
}
async check(bid) {
async check(inputParams) {
const { ctx } = this;
let ret = {
is_target_user: 0,//1 true 0 false -1 NOT_FOUND
......@@ -97,11 +97,13 @@ class CheckService extends Service {
if (!userInfo) {
ctx.failed('没有找到对应的手机号');
}
let fr = this.config.CFG_ENV === 'pro' ? (inputParams.fr ? inputParams.fr : 'jmall_list54') : 'gjj_test';
let params = {
app_id: this.config.DXM_APP_ID,
datetime: new Date().getTime(),
phone_md5: ctx.helper.md5(userInfo.passport),
fr: this.config.DXM_FR,
fr: fr,
sign: '',
}
params.sign = await this.sign(params);
......@@ -135,6 +137,7 @@ class CheckService extends Service {
if (ret.is_target_user === 1) {
//pro环境 142对应193 143对应194
//uat环境 174对应175 176对应177
let bid = inputParams['business_id'] ? Number(inputParams['business_id']) : 142;
let businessId = this.config.CFG_ENV === 'pro' ? (bid === 142 ? 193 : 194) : (this.config.CFG_ENV === 'uat' ? (bid === 174 ? 175 : 177) : 1);
let businessInfo = await this.getBusinessInfo(businessId);
ret.url = businessInfo.url;
......
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