yg-tools
Version:
some convenient APIs and Methods for Youngon
240 lines (239 loc) • 5.93 kB
TypeScript
/**
* 登录接口标志列表
*/
export declare const loginUrlTagList: string[];
export default class YGURL {
/**
* @function: 静态资源 url
*/
static asset_url: string;
/**
* @function: 绑定 wxid
* @method: PATCH | POST
* @param: { stuid, password, wxid }
*/
static patch_wxid: string;
/**
* @function: 绑定 qqid
* @method: PATCH | POST
* @param: { stuid, password, qqid }
*/
static patch_qqid: string;
/**
* @function: 注册
* @method: POST
* @param: { stuid, password, name, email, utype, wxid, qqid }
*/
static post_users: string;
/**
* @function: 通过 wxid 获取用户信息
* @method: GET
* @param: { code } wx.login()
*/
static get_users_by_wxid: string;
/**
* @function: 通过 qqid 获取用户信息
* @method: GET
* @param: { code } qq.login()
*/
static get_users_by_qqid: string;
/**
* @function: 获取最新公告
* @method: GET
*/
static get_last_notices: string;
/**
* @function: 分页获取公告列表
* @method: GET
* @param: { page }
*/
static get_notices_by_page: string;
/**
* @function: 发布公告
* @method: POST
* @param: { stuid, content }
*/
static post_notice: string;
/**
* @function: 获取当前在站人员信息
* @method: GET
*/
static get_current_online: string;
/**
* @function: 获取携带钥匙站员信息
* @method: GET
*/
static get_has_key: string;
/**
* @function: 获取本周签到记录
* @method: GET
*/
static get_sign_record_this_week: string;
/**
* @function: 获取上周签到记录
* @method: GET
*/
static get_sign_record_last_week: string;
/**
* @function: 经纬度转地址
* @method: GET
*/
static get_location: string;
/**
* @function: 通过学号和管理员token获取用户信息
* @param: { stuid, adminToken }
* @method: GET
*/
static get_user_by_stuid_and_admin_token: string;
/**
* @function: 获取允许签到的 wifi 信息
* @method: GET
*/
static get_allow_wifi: string;
/**
* @function: 设置允许签到的 wifi 信息
* @param: { wifi }
* @method: PATCH | PUT
*/
static set_allow_wifi: string;
/**
* @function: 获取允许签到的 经纬度 信息
* @method: GET
*/
static get_allow_longlat: string;
/**
* @function: 设置允许签到的 经纬度 信息
* @param: { latlong }
* @method: PATCH | PUT
*/
static set_allow_longlat: string;
/**
* @function: 获取站员注册码
* @method: GET
*/
static get_reg_code: string;
/**
* @function: 设置站员注册码
* @param: { Rcode }
* @method: PATCH | PUT
*/
static set_reg_code: string;
/**
* @function: 获取某一时间的签到记录
* @param: { time, page, count }
* @method: GET
*/
static get_sign_record_by_time: string;
/**
* @function: 签到
* @param: { stuid, reason }
* @method: POST | PATCH
*/
static post_sign_in: string;
/**
* @function: 签退
* @param: { stuid, ifkey }
* @method: POST | PATCH
*/
static post_sign_out: string;
/**
* @function: 添加值班记录
* @param: { stuid, dutydate }
* @method: POST
*/
static post_update_duty: string;
/**
* @function: 下载值班表
* @method: GET
*/
static get_duty_excel: string;
/**
* @function: 修改用户类型
* @param: { stuid, utype }
* @method: PATCH | PUT
*/
static patch_user_utype: string;
/**
* @function: 修改用户信息
* @param: { info, stuid, [info] }
* @method: PATCH | PUT
*/
static patch_user_info: string;
/**
* @function: 通过 token 获取所有管理员
* @param: { adminToken }
* @method: GET
*/
static get_all_admin_by_token: string;
/**
* @function: 通过 token 获取所有用户
* @param: { adminToken }
* @method: GET
*/
static get_all_user_by_token: string;
/**
* @function: 自动查值班
* @method: GET
*/
static get_duty_info: string;
/**
* @function: 查询某人值班情况
* @method: GET
* @param: { stuid }
*/
static get_duty_info_by_stuid: string;
/**
* @function: 发送邮件
* @param: { tomail, type, title, content }
* @method: POST
*/
static post_email: string;
/**
* @function: 通过类型获取申请
* @param: { type }
* @method: GET
*/
static get_apply_by_type: string;
/**
* @function: 通过学号获取申请
* @param: { stuid }
* @method: GET
*/
static get_apply_by_stuid: string;
/**
* @function: 处理申请
* @param: { stuid, aid, state }
* @method: PATCH | PUT
*/
static patch_handle_apply: string;
/**
* @function: 提出申请
* @param: { stuid, reason, apptime, appclass, appfixtime, appfixclass }
* @method: POST
*/
static post_apply: string;
/**
* @function: 上传图片
* @param: { head }
* @method: POST
*/
static post_upload_img: string;
/**
* @function: 通过社团标志获取社团信息
* @param: { orgId }
* @method: GET
*/
static get_org_info_by_orgid: string;
/**
* @function: 通过年级获取社团成员信息
* @param: { grade }
* @method: GET
*/
static get_members_by_grade: string;
/**
* @function: 通过部门获取社团成员信息
* @param: { department }
* @method: GET
*/
static get_members_by_department: string;
}