Commit 5e9fe7de authored by 任国军's avatar 任国军

classList add cripher

parent 806e8f2f
Pipeline #21787 passed with stage
in 12 seconds
......@@ -7,7 +7,8 @@ class InstitutionController extends Controller {
async getClassList() {
const { ctx } = this;
const queryParams = ctx.request.query;
const ret = await ctx.service.course.v5.institution.getClassList(queryParams);
let ret = await ctx.service.course.v5.institution.getClassList(queryParams);
ret = await ctx.helper.cipherByAES(ret);
ctx.success(ret);
}
......
......@@ -485,4 +485,23 @@ module.exports = {
return rtn;
},
// aes加密
async cipherByAES(data) {
const { ctx } = this;
const response_params = await ctx.helper.send_request(ctx.app.config.NODEV2_URL + '/user/cipher', {
data: JSON.stringify(data),
mode: 'aes',
type: 'encrypt',
}, {
method: 'POST',
});
// ctx.logger.info('response_params', JSON.stringify(ctx.body));
if (response_params.status !== 200) {
ctx.logger.info('response_params', JSON.stringify(input_params), JSON.stringify(ctx.body), response_params.data);
ctx.failed('加密失败');
return;
}
return { data: response_params.data.data };
},
};
......@@ -149,6 +149,7 @@ module.exports = appInfo => {
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.NODEV2_URL = 'https://uat-nginx.jianbing.com/user_api/v2';
config.CDN_BASE_URL = 'https://r.51gjj.com/image/';
......
......@@ -127,6 +127,7 @@ module.exports = appInfo => {
config.CDN_BASE_URL = 'https://r.51gjj.com/image/';
config.NODE_URL = process.env.NODE_URL;
config.NODE_BASE_URL = process.env.NODE_BASE_URL;
config.NODEV2_URL = process.env.NODEV2_URL;
config.PHP_URL = process.env.PHP_URL;
config.HOUSE_SERVICE_API = process.env.HOUSE_SERVICE_API; // 房产
......
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