DCFronted/dist/assets/login-DCaIIcze.js
2025-07-06 20:54:40 +08:00

2 lines
894 B
JavaScript

import{M as o,O as c}from"./index-DGJ6dnLh.js";const i=async()=>{try{return(await o.get("/captcha")).data}catch(r){throw r}},p=async(r,t,e,a)=>{try{const s=await o.post("/user/login",{username:r,password:t,token:e,captcha:a});return s.data.access_token&&c(s.data.access_token,r),s.data}catch(s){throw s}},g=async(r,t,e,a)=>{try{return(await o.post("/user/register",{qq_code:r,password:t,token:e,captcha:a})).data}catch(s){throw s}},d=async(r,t)=>{try{await o.put("/admin/change_user_privilege",{uuid:r,privilege:t})}catch(e){throw e}},h=async r=>{try{console.log("申请的权限【requestTempPrivilege】privilege:",r),await o.post("/user/temp_privilege_request",{privilege:r})}catch(t){throw t}},u=async(r,t,e)=>{try{const a={uuid:r,privilege:t};e!=null&&e!==""&&(a.exp_time=e),await o.post("/admin/add_temp_privilege",a)}catch(a){throw a}};export{g as a,d as b,u as c,i as g,h as r,p as u};