code: function (opts, ctx) {
      const cookie = opts.cookie;
      const obj = cookie instanceof Function ? cookie(ctx) : cookie;
      const options = Object.assign({
          maxAge: 0,
          path: '/',
          httpOnly: true
      }, obj || {}, {
              overwrite: true,
              signed: false
          });
      if (!(opts.maxAge >= 0)) opts.maxAge = 0;
      return options;
  }
docs: 获取cookie函数
  @param   {Object}      opts         [cookie配置]
  @param   {Object}      ctx          [Koa上下文对象]
  @return  {Object}      cookie配置