egg-pdd-sdk

1.0.12 • Public • Published

egg-pdd-sdk

Install

$ npm i egg-pdd-sdk --save

Usage

// {app_root}/config/plugin.js
exports.pddSdk = {
  enable: true,
  package: 'egg-pdd-sdk',
};

Configuration

// {app_root}/config/config.default.js
exports.pddSdk = {
  client_id:"client_id",
  client_secret:"client_secret"
};

Example

// controller
async test() {
    const { ctx, service } = this;
    const data = await service.pdd.post({
      type: "pdd.ddk.goods.pid.generate",
      number: 2,
      p_id_name_list: ["3","4"],
    });
    ctx.body=data;
}

License

MIT

Package Sidebar

Install

npm i egg-pdd-sdk

Weekly Downloads

7

Version

1.0.12

License

MIT

Unpacked Size

6.52 kB

Total Files

8

Last publish

Collaborators

  • wshshra