...
|
...
|
@@ -5,7 +5,8 @@ |
|
|
*/
|
|
|
'use strict';
|
|
|
const channelModel = require('../models/channel');
|
|
|
const homeModel = require('../../home/models/index');
|
|
|
|
|
|
// const homeModel = require('../../home/models/index');
|
|
|
const footerModel = require('../../../doraemon/models/footer_tab'); // 底部tab
|
|
|
|
|
|
const helpers = global.yoho.helpers;
|
...
|
...
|
@@ -213,27 +214,27 @@ exports.shopRecom = (req, res, next) => { |
|
|
/**
|
|
|
* 获取用户vip信息
|
|
|
*/
|
|
|
exports.userVip = (req, res, next) => {
|
|
|
let uid = req.user.uid;
|
|
|
|
|
|
if (!uid) {
|
|
|
res.json({
|
|
|
code: 555,
|
|
|
msg: '未登录'
|
|
|
});
|
|
|
} else {
|
|
|
req.ctx(homeModel).getGradeGrade(uid, req.query.channel || 1).then(result => {
|
|
|
if (result.code === 200) {
|
|
|
res.json({
|
|
|
code: 200,
|
|
|
current_vip_level: result.data.current_vip_level,
|
|
|
});
|
|
|
} else {
|
|
|
res.json({
|
|
|
code: 500,
|
|
|
msg: '出错了',
|
|
|
});
|
|
|
}
|
|
|
}).catch(next);
|
|
|
}
|
|
|
}; |
|
|
// exports.userVip = (req, res, next) => {
|
|
|
// let uid = req.user.uid;
|
|
|
|
|
|
// if (!uid) {
|
|
|
// res.json({
|
|
|
// code: 555,
|
|
|
// msg: '未登录'
|
|
|
// });
|
|
|
// } else {
|
|
|
// req.ctx(homeModel).getGradeGrade(uid, req.query.channel || 1).then(result => {
|
|
|
// if (result.code === 200) {
|
|
|
// res.json({
|
|
|
// code: 200,
|
|
|
// current_vip_level: result.data.current_vip_level,
|
|
|
// });
|
|
|
// } else {
|
|
|
// res.json({
|
|
|
// code: 500,
|
|
|
// msg: '出错了',
|
|
|
// });
|
|
|
// }
|
|
|
// }).catch(next);
|
|
|
// }
|
|
|
// }; |
...
|
...
|
|