New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

egg-qcloud-weapp-sdk

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

egg-qcloud-weapp-sdk

egg的腾讯云微信小程序SDK插件

  • 1.5.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

egg-qcloud-weapp-sdk

NPM version build status Test coverage David deps Known Vulnerabilities npm download

Install

$ npm i egg-qcloud-weapp-sdk --save

Usage

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

Configuration

// {app_root}/config/config.default.js
exports.qcloudWeappSDK = {
  serverHost: '',
  authServerUrl: '',
  tunnelServerUrl: '',
  tunnelSignatureKey: '',
  tunnelCheckSignature: true,
  networkTimeout: 30000,
};
  • Why and What: wafer-node-server-sdk is for Express,but eggjs is based on Koa. so, you know.. This plugin comes out to solve the problem.

  • Note: Tunnel service is not supported now.

see config/config.default.js for more detail.

Example

// app/controller/weapp.js
module.exports = app => {
  class WeappController extends app.Controller {
    * login() {
      const { ctx, app } = this;
      const loginService = app.qcloudWeapp.LoginService.create(ctx.request, ctx.response);
      yield loginService.login()
        .then(data => {
          ctx.body = data;
        });
    }

    * user() {
      const { ctx, app } = this;
      const loginService = app.qcloudWeapp.LoginService.create(ctx.request, ctx.response);
      yield loginService.check()
        .then(data => {
          ctx.body = {
            code: 0,
            message: 'ok',
            data: {
              userInfo: data.userInfo,
            },
          };
        });
    }
  }
  return WeappController;
};

Questions & Suggestions

Please open an issue here.

License

MIT

Keywords

FAQs

Package last updated on 18 Apr 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc