123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- import { request,downloadFile } from '/@/utils/service';
- import { PageQuery, AddReq, DelReq, EditReq, InfoReq } from '@fast-crud/fast-crud';
- export const apiPrefix = '/api/system/user/';
- export function GetDept(query: PageQuery) {
- return request({
- url: "/api/system/dept/dept_lazy_tree/",
- method: 'get',
- params: query,
- });
- }
- export function GetList(query: PageQuery) {
- return request({
- url: apiPrefix,
- method: 'get',
- params: query,
- });
- }
- export function GetObj(id: InfoReq) {
- return request({
- url: apiPrefix + id,
- method: 'get',
- });
- }
- export function AddObj(obj: AddReq) {
- return request({
- url: apiPrefix,
- method: 'post',
- data: obj,
- });
- }
- export function UpdateObj(obj: EditReq) {
- return request({
- url: apiPrefix + obj.id + '/',
- method: 'put',
- data: obj,
- });
- }
- export function DelObj(id: DelReq) {
- return request({
- url: apiPrefix + id + '/',
- method: 'delete',
- data: { id },
- });
- }
- export function exportData(params:any){
- return downloadFile({
- url: apiPrefix + 'export_data/',
- params: params,
- method: 'get'
- })
- }
- export function resetToDefaultPassword(id:any){
- return request({
- url: apiPrefix + id + '/reset_to_default_password/',
- method: 'put'
- })
- }
- export function getShopOptions(query: any) {
- return request({
- url: '/api/choice/marketplace_shops/select/',
- method: 'GET',
- params: query
- })
- }
- export function getAuthorizedShop(query: any) {
- return request({
- url: '/api/system/user/authorized-shop/',
- method: 'GET',
- params: query
- })
- }
- export function postAuthorize(body: any) {
- return request({
- url: '/api/system/user/authorized-shop/',
- method: 'POST',
- data: body
- })
- }
|