Edit D:\xinhaisoft\crisis_new\api\routes\index.js
const Router = require('@koa/router')({ prefix: '/api' }) const Token = require('../token') const Scale = require('../controllers/scale') const Member = require('../controllers/member') const Message = require('../controllers/message') const Test = require('../controllers/test') const Department = require('../controllers/department') const School = require('../controllers/school') const SchoolYuyue = require('../controllers/schoolyuyue') const Upload = require('../controllers/upload') // const UIC = require('../controllers/uic') // const HITSZ = require('../controllers/hitsz') const routers = Router // ??? .get('/', ctx => ctx.body = '<h1>Hello API</h1><p>' + new Date() + '</p>') // ???/???/?????P .post('/login', Member.Login) .post('/regist', Member.Regist) // ??? .get('/member/:id(\\d+)', Member.GetInfo) .get('/member/:id/totestlist', Token.Verify, Member.ScaleListByDistr) .get('/member/:id/tested', Token.Verify, Test.List) .get('/member/mobile/exist', Member.MobileExist) .post('/member/:id(\\d+)', Member.ModifyInfo) .put('/member/:id/birthday', Member.Birthday) // ?????? .get('/department/allchildren', Department.AllChildren) // ??? .get('/school', School.SchoolList) .all('/school/zixun', Token.Verify, SchoolYuyue.Zixun) .get('/school/yuyue-by-date', SchoolYuyue.YuyueByDate) .get('/school/yuyue-week-count', Token.Verify, SchoolYuyue.YuyueWeekCount) .all('/school/tuanfu', Token.Verify, SchoolYuyue.Tuanfu) .get('/school/last-zixun-feedback-exist', Token.Verify, SchoolYuyue.LastZixunFeedbackExist) .all('/school/yuyue-apply', Token.Verify, SchoolYuyue.YuyueApply) .post('/school/yuyue', Token.Verify, SchoolYuyue.AddYuyue) .get('/school/:id(\\d+)/consultant', SchoolYuyue.Consultant) .get('/school/yuyue-by-consultant', SchoolYuyue.YuyueByConsultant) .get('/school/:id/setting', School.Setting) .get('/school/:id/scalelist', School.ScaleList) .get('/school/:id/adminmenu', School.AdminMenu) .get('/school/:id/summary-count', School.SummaryCount) .get('/school/:id/number/exist', School.NumberExist) .get('/school/pub/test', School.Public.Test) .get('/school/pub/zx', School.Public.Zixun) .get('/school/pub/consultant', School.Public.Consultant) // ??????/?????? .get('/message/new', Message.New) .post('/message/mobilecode', Message.SendMobileCode) .put('/message/readed', Message.Readed) .post('/message/sms', Message.SMS) // ??? .get('/lb/:id', Scale.Info) .get('/lb/:id/question', Scale.Question) // ??? .post('/test/start', Token.Verify, Test.Start) // ?????????-?????????????????? // .post('/uic/user-transfer', UIC.UserTransfer) // .get('/uic/user-notify', UIC.UserNotify) // .get('/uic/user-transfer-link', UIC.UserTransferLink) // .post('/uic/import', Token.Verify, UIC.Import) // ????????????????? // .get('/hitsz/total', HITSZ.Total) // .get('/hitsz/import', HITSZ.Import) // .get('/hitsz/number', HITSZ.GetNumber) // ?????? .post('/upload', Upload) .all('/(.*)', ctx => ctx.body = { code: -5, message: '[' + ctx.method.toLowerCase() + '][' + ctx.request.path + '] Not Found' }) module.exports = routers
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de