Commit 67712824 authored by 任国军's avatar 任国军

add uploadImage

parent a0beafa4
Pipeline #15296 passed with stage
in 8 seconds
...@@ -2,12 +2,12 @@ ...@@ -2,12 +2,12 @@
const Controller = require('egg').Controller; const Controller = require('egg').Controller;
const crypto = require('crypto'); const crypto = require('crypto');
const fs = require('fs');
const request = require('request');
class WechatController extends Controller { class WechatController extends Controller {
async test() { async test() {
const { ctx, service } = this; const { ctx, service } = this;
await service.course.wechat.getAccessToken();
ctx.success();
} }
async callbackAction() { async callbackAction() {
......
...@@ -30,4 +30,5 @@ module.exports = app => { ...@@ -30,4 +30,5 @@ module.exports = app => {
router.get('third', '/wechat/callbackAction', 'course.wechat.check'); router.get('third', '/wechat/callbackAction', 'course.wechat.check');
router.post('third', '/wechat/callbackAction', 'course.wechat.callbackAction'); router.post('third', '/wechat/callbackAction', 'course.wechat.callbackAction');
router.post('third', '/wechat/test', 'course.wechat.test');
}; };
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment