fix(approval): 场馆单场地主数据改用 think_site
modules 侧没有 /booking/booking-site 接口(实测 404),改取审批服务同步的 think_site;api/booking/bookingSite 已无引用,随之删除。
This commit is contained in:
@@ -1,20 +0,0 @@
|
|||||||
import request from '@/utils/request';
|
|
||||||
import type { ApiResult } from '@/api';
|
|
||||||
import type { BookingSite, BookingSiteParam } from './model';
|
|
||||||
import { MODULES_API_URL } from '@/config/setting';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询场馆场地列表(场地主数据,供场地使用申请选择)
|
|
||||||
*/
|
|
||||||
export async function listBookingSite(params?: BookingSiteParam) {
|
|
||||||
const res = await request.get<ApiResult<BookingSite[]>>(
|
|
||||||
MODULES_API_URL + '/booking/booking-site',
|
|
||||||
{
|
|
||||||
params
|
|
||||||
}
|
|
||||||
);
|
|
||||||
if (res.data.code === 0 && res.data.data) {
|
|
||||||
return res.data.data;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
@@ -1,51 +0,0 @@
|
|||||||
import type { PageParam } from '@/api';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 场馆场地(场地主数据)
|
|
||||||
*/
|
|
||||||
export interface BookingSite {
|
|
||||||
id?: number;
|
|
||||||
// 场地名称
|
|
||||||
name?: string;
|
|
||||||
// 封面图
|
|
||||||
thumb?: string;
|
|
||||||
// 每小时价格
|
|
||||||
price?: string;
|
|
||||||
// 营业时间
|
|
||||||
businessTime?: string;
|
|
||||||
// 场馆地址
|
|
||||||
address?: string;
|
|
||||||
// 场馆介绍
|
|
||||||
info?: string;
|
|
||||||
// 场馆电话
|
|
||||||
tel?: string;
|
|
||||||
// 排序
|
|
||||||
sortNumber?: number;
|
|
||||||
// 类型:1天,2小时
|
|
||||||
type?: string;
|
|
||||||
// 天数或小时
|
|
||||||
num?: string;
|
|
||||||
// 退款比率
|
|
||||||
proportion?: string;
|
|
||||||
// 退款规则组
|
|
||||||
moneyJson?: string;
|
|
||||||
// 场馆图片
|
|
||||||
files?: string;
|
|
||||||
// 创建时间
|
|
||||||
createTime?: number;
|
|
||||||
// 更新时间
|
|
||||||
updateTime?: number;
|
|
||||||
// 周末活动订场开关:1开,0关
|
|
||||||
weekendOpen?: number;
|
|
||||||
// 租户id
|
|
||||||
tenantId?: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 场地搜索条件
|
|
||||||
*/
|
|
||||||
export interface BookingSiteParam extends PageParam {
|
|
||||||
id?: number;
|
|
||||||
name?: string;
|
|
||||||
keywords?: string;
|
|
||||||
}
|
|
||||||
@@ -149,9 +149,9 @@ import { onLoad } from '@dcloudio/uni-app';
|
|||||||
import { useUserStore } from '@/store/modules/user';
|
import { useUserStore } from '@/store/modules/user';
|
||||||
import { getInstance, saveDocument, submitInstance } from '@/api/approval/instance';
|
import { getInstance, saveDocument, submitInstance } from '@/api/approval/instance';
|
||||||
import { deleteAttachment, uploadAttachment } from '@/api/approval/attachment';
|
import { deleteAttachment, uploadAttachment } from '@/api/approval/attachment';
|
||||||
import { listBookingSite } from '@/api/booking/bookingSite';
|
import { listThinkSite } from '@/api/think/thinkSite';
|
||||||
import type { ApprovalAttachment } from '@/api/approval/model';
|
import type { ApprovalAttachment } from '@/api/approval/model';
|
||||||
import type { BookingSite } from '@/api/booking/bookingSite/model';
|
import type { ThinkSite } from '@/api/think/thinkSite/model';
|
||||||
import { showError, showSuccess } from '@/utils/app';
|
import { showError, showSuccess } from '@/utils/app';
|
||||||
|
|
||||||
const FLOW_CODE = 'venue';
|
const FLOW_CODE = 'venue';
|
||||||
@@ -179,7 +179,7 @@ const form = reactive({
|
|||||||
purpose: '',
|
purpose: '',
|
||||||
activityFee: ''
|
activityFee: ''
|
||||||
});
|
});
|
||||||
const sites = ref<BookingSite[]>([]);
|
const sites = ref<ThinkSite[]>([]);
|
||||||
const sitesLoading = ref(false);
|
const sitesLoading = ref(false);
|
||||||
const attachments = ref<ApprovalAttachment[]>([]);
|
const attachments = ref<ApprovalAttachment[]>([]);
|
||||||
const category = ref('OTHER');
|
const category = ref('OTHER');
|
||||||
@@ -239,10 +239,11 @@ onLoad(async options => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/** 场地主数据取 approval 服务的 think_site(modules 侧没有 /booking/booking-site,实测 404) */
|
||||||
async function loadSites() {
|
async function loadSites() {
|
||||||
sitesLoading.value = true;
|
sitesLoading.value = true;
|
||||||
try {
|
try {
|
||||||
sites.value = await listBookingSite();
|
sites.value = await listThinkSite();
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
showError(error?.message || '场地主数据加载失败', null);
|
showError(error?.message || '场地主数据加载失败', null);
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
Reference in New Issue
Block a user