优化网站导航模块
This commit is contained in:
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ThinkUsersVip, ThinkUsersVipParam } from './model';
|
||||
import { THINK_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*/
|
||||
export async function pageThinkUsersVip(params: ThinkUsersVipParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ThinkUsersVip>>>(
|
||||
THINK_API_URL + '/think/think-users-vip/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
export async function listThinkUsersVip(params?: ThinkUsersVipParam) {
|
||||
const res = await request.get<ApiResult<ThinkUsersVip[]>>(
|
||||
THINK_API_URL + '/think/think-users-vip',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
export async function addThinkUsersVip(data: ThinkUsersVip) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-users-vip',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
export async function updateThinkUsersVip(data: ThinkUsersVip) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-users-vip',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
export async function removeThinkUsersVip(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-users-vip/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*/
|
||||
export async function removeBatchThinkUsersVip(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-users-vip/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*/
|
||||
export async function getThinkUsersVip(id: number) {
|
||||
const res = await request.get<ApiResult<ThinkUsersVip>>(
|
||||
THINK_API_URL + '/think/think-users-vip/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export interface ThinkUsersVip {
|
||||
//
|
||||
id?: number;
|
||||
// sid场馆id集合,适用的场馆
|
||||
sid?: string;
|
||||
// 用户id
|
||||
uid?: number;
|
||||
// vip卡id
|
||||
vid?: number;
|
||||
// 微信订单号
|
||||
wechatOrder?: string;
|
||||
// 虚拟卡号
|
||||
code?: string;
|
||||
// 会员卡名称
|
||||
name?: string;
|
||||
// vip购卡价格
|
||||
price?: string;
|
||||
// 会员卡介绍
|
||||
desc?: string;
|
||||
// 会员卡说明
|
||||
info?: string;
|
||||
// vip卡折扣率
|
||||
discount?: string;
|
||||
// 使用次数
|
||||
count?: number;
|
||||
// 每使用一次减少的金额
|
||||
eachMoney?: string;
|
||||
// 剩余金额
|
||||
remainingMoney?: string;
|
||||
// 剩余次数
|
||||
num?: number;
|
||||
// 付款状态
|
||||
status?: string;
|
||||
// 是否已充值,1已充值,2未充值
|
||||
isRecharge?: string;
|
||||
// 充值金额
|
||||
rechargePrice?: string;
|
||||
// 会员卡年限
|
||||
term?: string;
|
||||
// 月限
|
||||
month?: string;
|
||||
// 会员卡类型:1年卡,2次卡,3月卡,4会员VIP
|
||||
type?: string;
|
||||
// 卡类型:1成人卡,2儿童卡
|
||||
cardType?: string;
|
||||
// vip卡等级类型:1特殊vip卡,2普通vip卡
|
||||
vipType?: string;
|
||||
// 特殊卡开发凭证图
|
||||
pic?: string;
|
||||
// VIP充值卡价格组
|
||||
prices?: string;
|
||||
// 临时VIP充值卡价格组,用于充值成功赋值给prices
|
||||
tempPrices?: string;
|
||||
// 是否赠送积分:1赠送,2不赠送
|
||||
isIntegral?: number;
|
||||
// 是否已开具发票:1已开发票,2未开发票
|
||||
isInvoice?: number;
|
||||
// 使用时间
|
||||
useTime?: number;
|
||||
// vip卡到期时间
|
||||
expireTime?: number;
|
||||
// 购买时间
|
||||
createTime?: number;
|
||||
// 付款时间
|
||||
payTime?: number;
|
||||
// 退款时间
|
||||
refundTime?: number;
|
||||
// 申请退款时间
|
||||
refundApplyTime?: number;
|
||||
// 对账情况:1=已对账;2=未对账;3=已对账,金额对不上;4=未查询到该订单
|
||||
checkBill?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索条件
|
||||
*/
|
||||
export interface ThinkUsersVipParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
Reference in New Issue
Block a user