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

 

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

posted @ 2019-08-26 14:08  彭成刚  阅读(207)  评论(0编辑  收藏  举报