code: function bindMethods(obj, scope) {
    return Object.keys(obj).reduce((bound, key) => {
      if (typeof obj[key] === 'function') {
        bound[key] = obj[key].bind(scope);
      } else if (_lodash2.default.isObject(obj[key])) {
        bound[key] = bindMethods(obj[key], scope);
      }
      return bound;
    }, {});
  }
docs: 递归将obj上所有的方法绑定至scope
  @param {Object} obj
  @param {Object} scope
  @returns {Object}