UNPKG

generator-wxnode-boilerplate

Version:

Yeoman generator for wxnode boilerplate

31 lines (25 loc) 741 B
import {IRouterContext} from 'koa-router'; export async function userinfo(ctx: IRouterContext) { ctx.body = { success: true, code: 0, data: { login: true, isOfficialUser: true, headimgurl: 'https://mmbiz.qpic.cn/mmbiz/icTdbqWNOwNRna42FI242Lcia07jQodd2FJGIYQfG0LAJGFxM4FbnQP6yfMxBgJ0F3YRqJCJ1aPAK2dQagdusBZg/0?wx_fmt=png', nickname: 'mock', openid: 'mockid', user_name: 'mock', authority: [1], }, }; } export async function data(ctx: IRouterContext) { ctx.body = { success: true, code: 0, data: { list: [ {name: 'a', val: '1'}, {name: 'b', val: '2'} ], }, }; }