返回运行方法,可以写在一行 callback&&callback()

return DiscountMap[discountType] && DiscountMap[discountType](price)

猜你喜欢

转载自www.cnblogs.com/pengchenggang/p/11412222.html