摘要: 策略模式:不同策略分开处理,避免出现大量 if...else 或者 switch...case class User { constructor(type) { this.type = type; } buy() { if (this.type 'ordinary') { console.log(' 阅读全文
posted @ 2019-11-15 07:04 wzndkj 阅读(216) 评论(0) 推荐(0) 编辑
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2019-11-15 06:51 wzndkj 阅读(3) 评论(0) 推荐(0) 编辑
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2019-11-15 06:41 wzndkj 阅读(3) 评论(0) 推荐(0) 编辑