Authored by 郭成尧

coupon-new

  1 +const headerModel = require('../../../doraemon/models/header'); // 头部model
  2 +const CouponNewModel = require('../models/coupon-new');
  3 +
  4 +class CouponNew {
  5 + page(req, res) {
  6 + res.render('coupons/page', {
  7 + module: 'home',
  8 + page: 'coupon-new',
  9 + pageHeader: headerModel.setNav({
  10 + navTitle: '优惠券',
  11 + myConponPageNavBtn: true,
  12 + navBtn: false
  13 + })
  14 + });
  15 + }
  16 +}
  17 +
  18 +module.exports = new CouponNew();
  1 +class CouponNewModel extends global.yoho.BaseModel {
  2 + constructor(ctx) {
  3 + super(ctx);
  4 + }
  5 +}
  6 +
  7 +
  8 +module.exports = CouponNewModel;
@@ -25,6 +25,7 @@ const orderController = require(`${cRoot}/order`); @@ -25,6 +25,7 @@ const orderController = require(`${cRoot}/order`);
25 const orderDetailController = require(`${cRoot}/orderDetail`); 25 const orderDetailController = require(`${cRoot}/orderDetail`);
26 const currencyController = require(`${cRoot}/myCurrency`); 26 const currencyController = require(`${cRoot}/myCurrency`);
27 const coupons = require(`${cRoot}/coupons`); 27 const coupons = require(`${cRoot}/coupons`);
  28 +const couponNew = require(`${cRoot}/coupon-new`);
28 const suggest = require(`${cRoot}/suggest`); 29 const suggest = require(`${cRoot}/suggest`);
29 const message = require(`${cRoot}/message`); 30 const message = require(`${cRoot}/message`);
30 const onlineService = require(`${cRoot}/onlineService`); 31 const onlineService = require(`${cRoot}/onlineService`);
@@ -92,7 +93,7 @@ router.get('/favBrand', auth, favorite.favfavBrand);// 收藏的品牌 @@ -92,7 +93,7 @@ router.get('/favBrand', auth, favorite.favfavBrand);// 收藏的品牌
92 router.post('/favoriteDel', auth, favorite.favoriteDelete);// 取消收藏 93 router.post('/favoriteDel', auth, favorite.favoriteDelete);// 取消收藏
93 94
94 // 优惠券 95 // 优惠券
95 -router.use('/coupons', auth, coupons.index); 96 +router.use('/coupons', auth, couponNew.page);
96 router.use('/couponsAjax', coupons.couponsAjax); 97 router.use('/couponsAjax', coupons.couponsAjax);
97 98
98 // 意见反馈 99 // 意见反馈
@@ -24,6 +24,9 @@ @@ -24,6 +24,9 @@
24 {{#installmentPage}} 24 {{#installmentPage}}
25 <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> 25 <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>
26 {{/installmentPage}} 26 {{/installmentPage}}
  27 + {{#myConponPageNavBtn}}
  28 + <a href="/service/qaDetail?keyword=%E4%BC%98%E6%83%A0%E5%88%B8&sonId=181" class="iconfont nav-home">&#xe639;</a>
  29 + {{/myConponPageNavBtn}}
27 {{#navPhone}} 30 {{#navPhone}}
28 <a href="{{.}}" class="iconfont nav-home">&#xe641;</a> 31 <a href="{{.}}" class="iconfont nav-home">&#xe641;</a>
29 {{/navPhone}} 32 {{/navPhone}}
  1 +import Page from 'yoho-page';
  2 +class ConponController extends Page {
  3 + constructor() {
  4 + super();
  5 + }
  6 +}
  7 +
  8 +export default ConponController;
  1 +import 'home/conpon-new.page.css';
  2 +import ConponController from './controller';
  3 +
  4 +new ConponController();