Authored by 郭成尧

ticketsConfirm-controller-ctx

'use strict';
const headerModel = require('../../../doraemon/models/header'); // 头部model
const indexModel = require('../models/ticketsConfirm');
const ticketsConfirmModel = require('../models/ticketsConfirm');
// cookie 参数
const actCkOpthn = {
... ... @@ -43,7 +43,7 @@ const ticketsConfirm = (req, res) => {
yohoCoinMode: true
};
indexModel.ticketsConfirm(params).then(result => {
req.ctx(ticketsConfirmModel).ticketsConfirm(params).then(result => {
res.render('ticketsConfirm', Object.assign(responseData, result));
});
};
... ... @@ -57,7 +57,7 @@ const submitTicket = (req, res) => {
useYohoCoin: req.body.useYohoCoin
};
indexModel.submitTicket(params).then(result => {
req.ctx(ticketsConfirmModel).submitTicket(params).then(result => {
if (result === {}) {
result.message = '人太多啦,稍后再试!';
}
... ... @@ -83,7 +83,7 @@ const checkTickets = (req, res) => {
redirect: '/signin.html'
});
} else {
indexModel.checkTickets(params).then(result => {
req.ctx(ticketsConfirmModel).checkTickets(params).then(result => {
res.json(result);
});
}
... ...