UNPKG

yg-tools

Version:

some convenient APIs and Methods for Youngon

250 lines (249 loc) 6.71 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.loginUrlTagList = void 0; /** * 登录接口标志列表 */ exports.loginUrlTagList = [ '/wxlogin', '/qqlogin' ]; var YGURL = /** @class */ (function () { function YGURL() { } /** * @function: 静态资源 url */ YGURL.asset_url = '/static/assets'; /** * @function: 绑定 wxid * @method: PATCH | POST * @param: { stuid, password, wxid } */ YGURL.patch_wxid = '/users/patch/wxid'; /** * @function: 绑定 qqid * @method: PATCH | POST * @param: { stuid, password, qqid } */ YGURL.patch_qqid = '/users/patch/qqid'; /** * @function: 注册 * @method: POST * @param: { stuid, password, name, email, utype, wxid, qqid } */ YGURL.post_users = '/users'; /** * @function: 通过 wxid 获取用户信息 * @method: GET * @param: { code } wx.login() */ YGURL.get_users_by_wxid = '/users/get/wxlogin'; /** * @function: 通过 qqid 获取用户信息 * @method: GET * @param: { code } qq.login() */ YGURL.get_users_by_qqid = '/users/get/qqlogin'; /** * @function: 获取最新公告 * @method: GET */ YGURL.get_last_notices = '/notice/get'; /** * @function: 分页获取公告列表 * @method: GET * @param: { page } */ YGURL.get_notices_by_page = '/notice/get/all'; /** * @function: 发布公告 * @method: POST * @param: { stuid, content } */ YGURL.post_notice = '/notice/post'; /** * @function: 获取当前在站人员信息 * @method: GET */ YGURL.get_current_online = '/users/get/online'; /** * @function: 获取携带钥匙站员信息 * @method: GET */ YGURL.get_has_key = '/users/get/haskey'; /** * @function: 获取本周签到记录 * @method: GET */ YGURL.get_sign_record_this_week = '/sign/record/thisweek'; /** * @function: 获取上周签到记录 * @method: GET */ YGURL.get_sign_record_last_week = '/sign/record/lastweek'; /** * @function: 经纬度转地址 * @method: GET */ YGURL.get_location = '/location/infor'; /** * @function: 通过学号和管理员token获取用户信息 * @param: { stuid, adminToken } * @method: GET */ YGURL.get_user_by_stuid_and_admin_token = '/users/get/stuid'; /** * @function: 获取允许签到的 wifi 信息 * @method: GET */ YGURL.get_allow_wifi = '/commonset/index/getwifi'; /** * @function: 设置允许签到的 wifi 信息 * @param: { wifi } * @method: PATCH | PUT */ YGURL.set_allow_wifi = '/commonset/index/setwifi'; /** * @function: 获取允许签到的 经纬度 信息 * @method: GET */ YGURL.get_allow_longlat = '/commonset/index/getlatlongwxmp'; /** * @function: 设置允许签到的 经纬度 信息 * @param: { latlong } * @method: PATCH | PUT */ YGURL.set_allow_longlat = '/commonset/index/setlatlongwxmp'; /** * @function: 获取站员注册码 * @method: GET */ YGURL.get_reg_code = '/commonset/index/getrcode'; /** * @function: 设置站员注册码 * @param: { Rcode } * @method: PATCH | PUT */ YGURL.set_reg_code = '/commonset/index/setrcode'; /** * @function: 获取某一时间的签到记录 * @param: { time, page, count } * @method: GET */ YGURL.get_sign_record_by_time = '/sign/record/time'; /** * @function: 签到 * @param: { stuid, reason } * @method: POST | PATCH */ YGURL.post_sign_in = '/sign/patch/in'; /** * @function: 签退 * @param: { stuid, ifkey } * @method: POST | PATCH */ YGURL.post_sign_out = '/sign/patch/out'; /** * @function: 添加值班记录 * @param: { stuid, dutydate } * @method: POST */ YGURL.post_update_duty = '/duty/index/updateduty'; /** * @function: 下载值班表 * @method: GET */ YGURL.get_duty_excel = '/duty/download'; /** * @function: 修改用户类型 * @param: { stuid, utype } * @method: PATCH | PUT */ YGURL.patch_user_utype = '/users/patch/utype'; /** * @function: 修改用户信息 * @param: { info, stuid, [info] } * @method: PATCH | PUT */ YGURL.patch_user_info = '/users/patch'; /** * @function: 通过 token 获取所有管理员 * @param: { adminToken } * @method: GET */ YGURL.get_all_admin_by_token = '/users/get/alladmins'; /** * @function: 通过 token 获取所有用户 * @param: { adminToken } * @method: GET */ YGURL.get_all_user_by_token = '/users'; /** * @function: 自动查值班 * @method: GET */ YGURL.get_duty_info = '/duty/query'; /** * @function: 查询某人值班情况 * @method: GET * @param: { stuid } */ YGURL.get_duty_info_by_stuid = '/duty/query/stuid'; /** * @function: 发送邮件 * @param: { tomail, type, title, content } * @method: POST */ YGURL.post_email = '/email'; /** * @function: 通过类型获取申请 * @param: { type } * @method: GET */ YGURL.get_apply_by_type = '/application/get'; /** * @function: 通过学号获取申请 * @param: { stuid } * @method: GET */ YGURL.get_apply_by_stuid = '/application/get/stuid'; /** * @function: 处理申请 * @param: { stuid, aid, state } * @method: PATCH | PUT */ YGURL.patch_handle_apply = '/application/reply'; /** * @function: 提出申请 * @param: { stuid, reason, apptime, appclass, appfixtime, appfixclass } * @method: POST */ YGURL.post_apply = '/application/post'; /** * @function: 上传图片 * @param: { head } * @method: POST */ YGURL.post_upload_img = '/static/assets/up/upload.php'; /** * @function: 通过社团标志获取社团信息 * @param: { orgId } * @method: GET */ YGURL.get_org_info_by_orgid = '/api/organization'; /** * @function: 通过年级获取社团成员信息 * @param: { grade } * @method: GET */ YGURL.get_members_by_grade = '/users/get/gradestaff'; /** * @function: 通过部门获取社团成员信息 * @param: { department } * @method: GET */ YGURL.get_members_by_department = '/users/get/departmentstaff'; return YGURL; }()); exports.default = YGURL;