1234567891011121314151617181920212223242526272829303132 |
- 'use strict';
- const assert = require('assert');
- const _ = require('lodash');
- const uuid = require('uuid');
- const urljoin = require('url-join');
- const Controller = require('egg').Controller;
- class WechatController extends Controller {
- // 取得微信AccessToken
- async accesstoken() {
- const res = await this.ctx.service.weixin.accesstoken(this.ctx.query);
- this.ctx.ok({ res });
- }
- // 取得微信jsapiticket
- async jsapiticket() {
- const res = await this.ctx.service.weixin.jsapiticket(this.ctx.query);
- this.ctx.ok({ res });
- }
- // 取得微信getsign
- async getsign() {
- const data = await this.ctx.service.weixin.getsign(this.ctx.query);
- this.ctx.ok({ data });
- }
- }
- module.exports = WechatController;
|