增加对空白奖励的支持
This commit is contained in:
parent
5f7b57fe78
commit
72b4949347
@ -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)
|
||||||
}
|
}
|
||||||
|
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user