增加对空白奖励的支持

This commit is contained in:
zhl 2021-06-07 20:27:48 +08:00
parent 5f7b57fe78
commit 72b4949347
2 changed files with 2 additions and 2 deletions

View File

@ -35,7 +35,7 @@ class LotteryController extends BaseController {
let name = '抽奖券' let name = '抽奖券'
let couponUrl = reward.icon let couponUrl = reward.icon
if (reward.rewardType === 0) { if (reward.rewardType === 0) {
if (!couponMap.has(reward.coupon)) { if (!couponMap.has(reward.coupon) && reward.coupon !== EMPTY) {
let coupon = await Coupon.findById(reward.coupon) let coupon = await Coupon.findById(reward.coupon)
couponMap.set(coupon.id, coupon) couponMap.set(coupon.id, coupon)
} }

View File

@ -51,7 +51,7 @@ export class LotteryCfgClass extends Base {
/** /**
* *
* @type {number} 0: 优惠券, 1: 抽奖券 * @type {number} 0: 优惠券, 1: 抽奖券, 9: 留空
*/ */
@prop({ default: 0 }) @prop({ default: 0 })
public rewardType: number public rewardType: number