Commit a5707719 authored by Hsinli's avatar Hsinli

add

parent 43ab61e0
'use strict';
const Controller = require('egg').Controller;
class HomeController extends Controller {
/**
* 我的信用首页
*/
async home() {
const { ctx } = this;
let ret = await ctx.service.credit.home.home();
ctx.success(ret);
}
}
module.exports = HomeController;
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
module.exports = app => { module.exports = app => {
const router = app.router.namespace(app.config.projectRootPath + '/credit'); const router = app.router.namespace(app.config.projectRootPath + '/credit');
const loginAuth = app.middleware.loginAuth({ type: 'new' });//登录中间件
router.get('/home', 'credit.order.getMyCredit'); router.get('/home', 'credit.order.getMyCredit');
router.get('/history/:type', 'credit.order.getRecord'); router.get('/history/:type', 'credit.order.getRecord');
...@@ -11,11 +12,10 @@ module.exports = app => { ...@@ -11,11 +12,10 @@ module.exports = app => {
router.get('/order/check_pay/:order_id', 'credit.order.checkPay'); router.get('/order/check_pay/:order_id', 'credit.order.checkPay');
//我的信用-黑名单报告 //我的信用-黑名单报告
router.get('/blacklist/report/:report_id', 'credit.blacklist.getBlacklistReport');//获取报告信息 router.get('/blacklist/report/:report_id', loginAuth, 'credit.blacklist.getBlacklistReport');//获取报告信息
router.post('/blacklist/report', 'credit.blacklist.applyBlacklistReport');//查询个人黑名单报告 router.post('/blacklist/report', loginAuth, 'credit.blacklist.applyBlacklistReport');//查询个人黑名单报告
router.get('/blacklist/init', loginAuth, 'credit.blacklist.blacklistInit');//进入黑名单检测页面
router.get('/blacklist/init', 'credit.blacklist.blacklistInit');//进入黑名单检测页面 router.post('/blacklist/verification_code', loginAuth, 'credit.blacklist.getBlacklistReportVerificationCode');//获取短信验证码
router.post('/blacklist/verification_code', 'credit.blacklist.getBlacklistReportVerificationCode');//获取短信验证码
//我的信用-个人通话风险 //我的信用-个人通话风险
......
'use strict';
const Service = require('egg').Service;
class HomeService extends Service {
}
module.exports = HomeService;
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