261024
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { UserBalanceLog, UserBalanceLogParam } from './model';
|
||||
import { MODULES_API_URL } from '../../../config/setting';
|
||||
import { THINK_API_URL } from '../../../config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询余额明细
|
||||
*/
|
||||
export async function pageUserBalanceLog(params: UserBalanceLogParam) {
|
||||
const res = await request.get<ApiResult<PageResult<UserBalanceLog>>>(MODULES_API_URL + '/shop/user-balance-log/page', { params });
|
||||
const res = await request.get<ApiResult<PageResult<UserBalanceLog>>>(THINK_API_URL + '/shop/user-balance-log/page', { params });
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
@@ -18,7 +18,7 @@ export async function pageUserBalanceLog(params: UserBalanceLogParam) {
|
||||
* 查询余额明细列表
|
||||
*/
|
||||
export async function listUserBalanceLog(params?: UserBalanceLogParam) {
|
||||
const res = await request.get<ApiResult<UserBalanceLog[]>>(MODULES_API_URL + '/shop/user-balance-log', {
|
||||
const res = await request.get<ApiResult<UserBalanceLog[]>>(THINK_API_URL + '/shop/user-balance-log', {
|
||||
params
|
||||
});
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
@@ -31,7 +31,7 @@ export async function listUserBalanceLog(params?: UserBalanceLogParam) {
|
||||
* 根据id查询余额明细
|
||||
*/
|
||||
export async function getUserBalanceLog(id: number) {
|
||||
const res = await request.get<ApiResult<UserBalanceLog>>(MODULES_API_URL + '/shop/user-balance-log/' + id);
|
||||
const res = await request.get<ApiResult<UserBalanceLog>>(THINK_API_URL + '/shop/user-balance-log/' + id);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
@@ -42,7 +42,7 @@ export async function getUserBalanceLog(id: number) {
|
||||
* 添加余额明细
|
||||
*/
|
||||
export async function addUserBalanceLog(data: UserBalanceLog) {
|
||||
const res = await request.post<ApiResult<unknown>>(MODULES_API_URL + '/shop/user-balance-log', data);
|
||||
const res = await request.post<ApiResult<unknown>>(THINK_API_URL + '/shop/user-balance-log', data);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
@@ -53,7 +53,7 @@ export async function addUserBalanceLog(data: UserBalanceLog) {
|
||||
* 修改余额明细
|
||||
*/
|
||||
export async function updateUserBalanceLog(data: UserBalanceLog) {
|
||||
const res = await request.put<ApiResult<unknown>>(MODULES_API_URL + '/shop/user-balance-log', data);
|
||||
const res = await request.put<ApiResult<unknown>>(THINK_API_URL + '/shop/user-balance-log', data);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
@@ -64,7 +64,7 @@ export async function updateUserBalanceLog(data: UserBalanceLog) {
|
||||
* 删除余额明细
|
||||
*/
|
||||
export async function removeUserBalanceLog(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(MODULES_API_URL + '/shop/user-balance-log/' + id);
|
||||
const res = await request.delete<ApiResult<unknown>>(THINK_API_URL + '/shop/user-balance-log/' + id);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
@@ -75,7 +75,7 @@ export async function removeUserBalanceLog(id?: number) {
|
||||
* 批量删除余额明细
|
||||
*/
|
||||
export async function removeUserBalanceLogs(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(MODULES_API_URL + '/shop/user-balance-log/batch', {
|
||||
const res = await request.delete<ApiResult<unknown>>(THINK_API_URL + '/shop/user-balance-log/batch', {
|
||||
data
|
||||
});
|
||||
if (res.data.code === 0) {
|
||||
|
||||
@@ -8,6 +8,7 @@ export interface UserBalanceLog {
|
||||
userId?: number;
|
||||
scene?: number;
|
||||
money?: string;
|
||||
balance?: string;
|
||||
describe?: string;
|
||||
remark?: string;
|
||||
sortNumber?: number;
|
||||
|
||||
Reference in New Issue
Block a user