RedenvelopesModel.js
769 Bytes
'use strict';
const Promise = require('bluebird');
const co = Promise.coroutine;
const RedenvelopesData = require('./RedenvelopesData.js');
const redenvelopesList = uid=>{
return co(function*() {
let result = {};
let data = yield RedenvelopesData.getRedenvelopesTotal(uid);
if (data.code && data.code == 200 && data.data.redpacket_num) {
result.money = data.data.redpacket_num;
result.termOfValidity = data.data.useable_time;
}
result.useRemark = '1.红包活动,全场通用(预售商品除外);<br>2.结算时折抵现金使用,可以和优惠券叠加使用;<br>3.限有效期内使用,过期清零';
return [result];
})();
};
module.exports = {
redenvelopesList
};