Commit 29add4a7 authored by 李尚科's avatar 李尚科
parents 53b2cd31 530e5b09
......@@ -132,10 +132,10 @@ class ProductService extends Service {
const { ctx } = this;
const url = this.config.NODE_BASE_URL + '/cassandra-server/bu_basic/list';
const products_results = await ctx.helper.send_request(url, { type, app_id: ctx.appId }, { method: 'GET' });
const products_results = await ctx.helper.send_request(url, { type, app_id: '7c59fa87-a794-4037-8c18-cba5dc04290e' }, { method: 'GET' });
// ctx.logger.info(JSON.stringify({ url, products_results }));
let products = [];
console.log(products_results)
console.log(products_results);
if (products_results.status !== 200 || !products_results.data || !products_results.data.ret) {
return products;
}
......@@ -405,12 +405,12 @@ class ProductService extends Service {
async formatLoanList(loanList) {
//以下代码是为了处理渠道包下不展示特殊的4个业务
//start
// 以下代码是为了处理渠道包下不展示特殊的4个业务
// start
const { ctx } = this;
const user_sid = ctx.oldUserId;
let filter = { where: { sid: user_sid } };
let userInfo = await ctx.gjjModel.SysUser.one(filter);
const userInfo = await ctx.gjjModel.SysUser.one(filter);
ctx.logger.info('get_phone_by_user_sid:' + JSON.stringify(userInfo));
let place_cid = 0;
if (userInfo !== null) {
......@@ -418,23 +418,23 @@ class ProductService extends Service {
} else {
const jianbing_guest_customer_id = ctx.cookies.get('jianbing_guest_customer_id', { signed: false });
filter = { where: { sid: jianbing_guest_customer_id } };
let userInfo = await ctx.gjjModel.SysGuest.one(filter);
const userInfo = await ctx.gjjModel.SysGuest.one(filter);
if (userInfo !== null) {
place_cid = userInfo.place_cid;
}
}
//end
// end
const ret = [];
for (const v of loanList) {
//以下代码是为了处理渠道包下不展示特殊的4个业务
//start
let sepecial_business_ids = [95, 7, 130, 51];
if(place_cid > 0 && place_cid == 2420 && sepecial_business_ids.includes(v.business_id)) {
// 以下代码是为了处理渠道包下不展示特殊的4个业务
// start
const sepecial_business_ids = [ 95, 7, 130, 51 ];
if (place_cid > 0 && place_cid == 2420 && sepecial_business_ids.includes(v.business_id)) {
continue;
}
//end
// end
// 处理C组
let url = v.url;
......@@ -480,18 +480,18 @@ class ProductService extends Service {
let location = 'loan_channel';
let city = '';
if(type == 4) {
let city_res = await ctx.helper.parseIp();
if(city_res && city_res.content && city_res.content.address_detail && city_res.content.address_detail.city) {
if (type == 4) {
const city_res = await ctx.helper.parseIp();
if (city_res && city_res.content && city_res.content.address_detail && city_res.content.address_detail.city) {
city = city_res.content.address_detail.city.replace('市', '');
}
ctx.logger.info(city_res)
ctx.logger.info(city_res);
}
for (const v of products) {
ctx.logger.info('imh------begin----------')
ctx.logger.info('imh------begin----------');
if (Number(v.type) === 2 || Number(v.type) === 3) {
v.rate = '';
v.rate_title = '';
......@@ -505,13 +505,13 @@ class ProductService extends Service {
if (Number(v.type) === 4 && !url.includes('51yhdai')) {
url = url.includes('?') ? url + '&from=51gjj_loan_channel' : url + '?from=51gjj_loan_channel';
}
url = this.config.PHP_URL + '/app/track/url?url=' + encodeURI(url) + '&source=51gjj&location=' + location;
ctx.logger.info(v.cities)
ctx.logger.info(city)
if(v.cities && v.cities.length > 0 && city != '') {
ctx.logger.info('imh------222----------')
if(v.cities.includes(city)) {
ctx.logger.info('imh----------------')
url = this.config.PHP_URL + '/app/track/url?url=' + encodeURIComponent(url) + '&source=51gjj&location=' + location;
ctx.logger.info(v.cities);
ctx.logger.info(city);
if (v.cities && v.cities.length > 0 && city != '') {
ctx.logger.info('imh------222----------');
if (v.cities.includes(city)) {
ctx.logger.info('imh----------------');
const tmp = {
type: v.type,
business_id: v.business_id,
......@@ -558,7 +558,7 @@ class ProductService extends Service {
}
ctx.logger.info('imh------end----------')
ctx.logger.info('imh------end----------');
}
......
......@@ -139,8 +139,8 @@ module.exports = appInfo => {
};
config.PHP_URL = 'https://kaifa.jianbing.com';
config.NODE_URL = 'https://dev-nginx.jianbing.com/user_api/v1';
config.NODE_BASE_URL = 'https://dev-nginx.jianbing.com';
config.NODE_URL = 'https://uat-nginx.jianbing.com/user_api/v1';
config.NODE_BASE_URL = 'https://uat-nginx.jianbing.com';
config.HOUSE_SERVICE_API = 'https://uat-nginx.jianbing.com/house-service';
config.CDN_BASE_URL = 'https://r.51gjj.com/image/';
......
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