Commit 9032db35 authored by 任国军's avatar 任国军

remove %

parent 63eec052
...@@ -230,12 +230,9 @@ class ProductService extends Service { ...@@ -230,12 +230,9 @@ class ProductService extends Service {
ret = R.take(limit)(R.sort(recommendSort)(loanList)); ret = R.take(limit)(R.sort(recommendSort)(loanList));
} else { } else {
const userGjj = await ctx.helper.send_request(this.config.NODE_BASE_URL + '/cassandra-server/gjj/list/' + userId, {}, { method: 'GET' }); const userGjj = await ctx.helper.send_request(this.config.NODE_BASE_URL + '/cassandra-server/gjj/list/' + userId, {}, { method: 'GET' });
ctx.logger.info('userId: ' + userId);
ctx.logger.info('userGjj: ' + JSON.stringify(userGjj.data.ret));
if (userGjj.status !== 200 || ctx.isEmpty(userGjj.data.ret)) { if (userGjj.status !== 200 || ctx.isEmpty(userGjj.data.ret)) {
const loanList = await this.getAllProductsByType(1); const loanList = await this.getAllProductsByType(1);
ret = R.take(limit)(R.sort(recommendSort)(loanList)); ret = R.take(limit)(R.sort(recommendSort)(loanList));
ctx.logger.info('userLoanList: ' + JSON.stringify(ret));
return ret; return ret;
} }
...@@ -453,7 +450,8 @@ class ProductService extends Service { ...@@ -453,7 +450,8 @@ class ProductService extends Service {
location = 'credit_channel'; location = 'credit_channel';
} }
const channels = ctx.isEmpty(v.channel_rate_id) ? [] : v.channel_rate_id.split(','); const channels = ctx.isEmpty(v.channel_rate_id) ? [] : v.channel_rate_id.split(',');
const rate = channels.includes(channel) ? (v.channel_rate.includes('元') || v.channel_rate.includes('%') ? v.channel_rate : v.channel_rate + '%') : (!ctx.isEmpty(v.rate) ? (v.rate.includes('元') || v.rate.includes('%') ? v.rate : v.rate + '%') : ''); // const rate = channels.includes(channel) ? (v.channel_rate.includes('元') || v.channel_rate.includes('%') ? v.channel_rate : v.channel_rate + '%') : (!ctx.isEmpty(v.rate) ? (v.rate.includes('元') || v.rate.includes('%') ? v.rate : v.rate + '%') : '');
const rate = channels.includes(channel) ? v.channel_rate : v.rate;
const rateTitle = channels.includes(channel) ? v.channel_rate_title : v.rate_title; const rateTitle = channels.includes(channel) ? v.channel_rate_title : v.rate_title;
let url = v.url; let url = v.url;
if (Number(v.type) === 4) { if (Number(v.type) === 4) {
......
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