| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118 |
- /*
- * @Author: wanglj 471442253@qq.com
- * @Date: 2023-07-19 13:42:40
- * @LastEditors: wanglj wanglijie@dashoo.cn
- * @LastEditTime: 2025-03-19 09:54:45
- * @Description: file content
- * @FilePath: \labsop_meno\frontend\packages\base\src\api\system\user.ts
- */
- import request from '/@/utils/micro_request'
- const basePath = import.meta.env.VITE_ADMIN
- const insrtPath = import.meta.env.VITE_INSTR_ADMIN
- // 日程管理
- export function useUserApi() {
- return {
- // 创建
- createUser(query?: object) {
- return request.postRequest(basePath, 'User', 'Create', query)
- },
- // 更新
- updateUser(query?: object) {
- return request.postRequest(basePath, 'User', 'UpdateById', query)
- },
- // 列表
- getUserList(query?: object) {
- return request.postRequest(basePath, 'User', 'GetList', query)
- },
- // 删除
- deleteUser(query?: object) {
- return request.postRequest(basePath, 'User', 'DeleteByIds', query)
- },
- // 详情
- getUserEntity(query?: object) {
- return request.postRequest(basePath, 'User', 'GetEntityById', query)
- },
- // 详情
- getUserInfo(query?: object) {
- return request.postRequest(basePath, 'User', 'GetUserInfo', query)
- },
- // 修改密码
- changePassword(query?: object) {
- return request.postRequest(basePath, 'User', 'ChangePassword', query)
- },
- // 重置密码
- resetPassword(query?: object) {
- return request.postRequest(basePath, 'User', 'ResetPassword', query)
- },
- // 更新状态
- setUserStatus(query?: object) {
- return request.postRequest(basePath, 'User', 'SetStatus', query)
- },
- // 根据用户名获取用户信息
- getUserByUserName(query?: object) {
- return request.postRequest(basePath, 'User', 'GetUserByUserName', query)
- },
- // 下载用户模板
- downloadTmpl(query?: object) {
- return request.postRequest(basePath, 'User', 'ExcelTemplate', query)
- },
- // 上传用户模板
- uploadTmpl(query?: object) {
- return request.postRequest(basePath, 'User', 'ExcelImport', query)
- },
- // 获取用户字典
- getUserDict(query?: object) {
- return request.postRequest(basePath, 'User', 'GetDictList', query);
- },
- // 首页注册
- indexRegister(query?: object) {
- return request.postRequest(basePath, 'System', 'Register', query)
- },
- // 用户审批
- registerUserApproval(query?: object) {
- return request.postRequest(basePath, 'User', 'RegisterUserApproval', query)
- },
- // 发送邮件重置密码
- sendResetPasswordEmail(query?: object) {
- return request.postRequest(basePath, 'User', 'SendResetPasswordEmail', query)
- },
- // 邮箱链接重置密码
- resetPasswordFromEmail(query?: object) {
- return request.postRequest(basePath, 'User', 'ResetPasswordFromEmail', query)
- },
- // 根据字典类型获取字典项明细
- getDictDataByType(str: string) {
- return request.postRequest(basePath, 'Dict', 'GetDictDataByType', { dictType: str });
- },
- // 个人中心获取用户基础信息
- getProfile(query?: object) {
- return request.postRequest(basePath, 'User', 'GetProfile', query)
- },
- // 个人中心更新用户信息
- updateProfile(query?: object) {
- return request.postRequest(basePath, 'User', 'UpdateProfile', query)
- },
- // 个人中心用户修改头像
- setAvatar(query?: object) {
- return request.postRequest(basePath, 'User', 'SetAvatar', query)
- },
- // 个人中心信用分
- getScore(query?: object) {
- return request.postRequest(insrtPath, 'TusBlacklist', 'MyScore', query)
- },
- // 用户类型
- getUserTypeList(query?: object) {
- return request.postRequest(basePath, 'UserType', 'GetUserTypeList', query)
- },
- // 用户类型
- getUserType10List(query?: object) {
- return request.postRequest(basePath, 'UserType', 'GetUserType10List', query)
- },
- //更新 微信信息
- updateUserWxInfo(query?: object) {
- return request.postRequest(basePath, 'User', 'UpdateWechatIdByUserId', query)
- },
- }
- }
|