...
|
...
|
@@ -12,7 +12,7 @@ exports.index = (req, res) => { |
|
|
// 传入参数给lotteryModel发送到后端,获取返回的数据
|
|
|
lotteryModel({test: 1}).then((data) => {
|
|
|
|
|
|
// 接受接口返回到的数据,处理后,渲染页面或者返回 JSON
|
|
|
// 接收接口返回到的数据,处理后,渲染页面或者返回 JSON
|
|
|
res.send(data);
|
|
|
|
|
|
// res.render('wxLottery/index', {
|
...
|
...
|
@@ -20,6 +20,6 @@ exports.index = (req, res) => { |
|
|
// wxLottery: data
|
|
|
// });
|
|
|
}).catch((err) => {
|
|
|
errUtil.webError(err, res);
|
|
|
errUtil.webError(err, res); // 抓取 Promise 链的错误
|
|
|
});
|
|
|
}; |
...
|
...
|
|