Authored by 郭成尧

coupon-new

const headerModel = require('../../../doraemon/models/header'); // 头部model
const CouponNewModel = require('../models/coupon-new');
class CouponNew {
page(req, res) {
res.render('coupons/page', {
module: 'home',
page: 'coupon-new',
pageHeader: headerModel.setNav({
navTitle: '优惠券',
myConponPageNavBtn: true,
navBtn: false
})
});
}
}
module.exports = new CouponNew();
... ...
class CouponNewModel extends global.yoho.BaseModel {
constructor(ctx) {
super(ctx);
}
}
module.exports = CouponNewModel;
... ...
... ... @@ -25,6 +25,7 @@ const orderController = require(`${cRoot}/order`);
const orderDetailController = require(`${cRoot}/orderDetail`);
const currencyController = require(`${cRoot}/myCurrency`);
const coupons = require(`${cRoot}/coupons`);
const couponNew = require(`${cRoot}/coupon-new`);
const suggest = require(`${cRoot}/suggest`);
const message = require(`${cRoot}/message`);
const onlineService = require(`${cRoot}/onlineService`);
... ... @@ -92,7 +93,7 @@ router.get('/favBrand', auth, favorite.favfavBrand);// 收藏的品牌
router.post('/favoriteDel', auth, favorite.favoriteDelete);// 取消收藏
// 优惠券
router.use('/coupons', auth, coupons.index);
router.use('/coupons', auth, couponNew.page);
router.use('/couponsAjax', coupons.couponsAjax);
// 意见反馈
... ...
... ... @@ -24,6 +24,9 @@
{{#installmentPage}}
<a href="/service/qaDetail?keyword=%E6%9C%89%E8%B4%A7%E5%88%86%E6%9C%9F&sonId=179" class="iconfont nav-home">&#xe639;</a>
{{/installmentPage}}
{{#myConponPageNavBtn}}
<a href="/service/qaDetail?keyword=%E4%BC%98%E6%83%A0%E5%88%B8&sonId=181" class="iconfont nav-home">&#xe639;</a>
{{/myConponPageNavBtn}}
{{#navPhone}}
<a href="{{.}}" class="iconfont nav-home">&#xe641;</a>
{{/navPhone}}
... ...
import Page from 'yoho-page';
class ConponController extends Page {
constructor() {
super();
}
}
export default ConponController;
... ...
import 'home/conpon-new.page.css';
import ConponController from './controller';
new ConponController();
... ...