123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- module.exports = {
- create: {
- requestBody: ['is_leader', 'name', 'phone', 'password', 'icon', 'birth', 'gender', 'email', 'openid', 'status'],
- },
- destroy: {
- requestBody: ['!key', '!target'],
- service: 'delete',
- },
- update: {
- params: ['!id'],
- requestBody: ['is_leader', 'name', 'phone', 'password', 'icon', 'birth', 'gender', 'email', 'openid', 'status'],
- },
- show: {
- parameters: {
- params: ['!id'],
- },
- service: 'fetch',
- },
- index: {
- parameters: {
- query: {
- 'meta.createdAt@start': 'meta.createdAt@start',
- 'meta.createdAt@end': 'meta.createdAt@end',
- name: '%name%',
- phone: 'phone',
- gender: 'gender',
- email: 'email',
- openid: 'openid',
- status: 'status',
- is_leader: 'is_leader',
- },
- // options: {
- // "meta.state": 0 // 默认条件
- // },
- },
- service: 'query',
- options: {
- query: ['skip', 'limit'],
- sort: ['meta.createdAt'],
- desc: true,
- count: true,
- },
- },
- resetPwd: {
- params: ['!id'],
- requestBody: ['!password'],
- },
- login: {
- requestBody: ['!phone', '!password'],
- },
- wxLogin: {
- requestBody: ['!openid'],
- },
- toBindEmail: {
- requestBody: ['!id', '!email'],
- },
- checkBindEmail: {
- requestBody: ['!code', '!id', '!email'],
- },
- toBindPhone: {
- requestBody: ['!id', '!phone'],
- },
- checkBindPhone: {
- requestBody: ['!code', '!id', '!phone'],
- },
- toLoginByCode: {
- requestBody: ['!phone'],
- },
- checkLoginCode: {
- requestBody: ['!code', '!phone'],
- },
- cct: {
- service: 'changeCacheToken',
- },
- };
|