feat: initial project setup with core infrastructure and api clients
- Add environment configs for dev/staging/prod environments - Implement centralized axios request utility with standardized error handling - Add shared TypeScript types for API responses and requests - Create comprehensive API client modules for all core endpoints - Configure vue router with all application page routes - Add icon fonts, static assets, and loading animations - Set up project documentation and collaboration guidelines - Remove deprecated uni-app bridge component files
This commit is contained in:
0
src/api/booking.ts
Normal file
0
src/api/booking.ts
Normal file
46
src/api/goods.ts
Normal file
46
src/api/goods.ts
Normal file
@@ -0,0 +1,46 @@
|
||||
import { request } from "../utils/request";
|
||||
|
||||
// 获取商品详情
|
||||
export function goodsDetail(args: any) {
|
||||
return request({
|
||||
url: "/hotelBiz/commodity/commodityDetail",
|
||||
method: "post",
|
||||
data: args,
|
||||
});
|
||||
}
|
||||
|
||||
// 订单支付
|
||||
export function orderPay(args: any) {
|
||||
return request({
|
||||
url: "/hotelBiz/trade/order",
|
||||
method: "post",
|
||||
data: args,
|
||||
});
|
||||
}
|
||||
|
||||
// 获取商品日价格及库存
|
||||
export function commodityDailyPriceList(args: any) {
|
||||
return request({
|
||||
url: "/hotelBiz/commodity/commodityDailyPriceList",
|
||||
method: "post",
|
||||
data: args,
|
||||
});
|
||||
}
|
||||
|
||||
// 分页查询商品分类列表
|
||||
export function commodityTypePageList(args: any) {
|
||||
return request({
|
||||
url: "/hotelBiz/commodity/commodityTypePageList",
|
||||
method: "post",
|
||||
data: args,
|
||||
});
|
||||
}
|
||||
|
||||
// 快速预定分页列表
|
||||
export function quickBookingList(args: any) {
|
||||
return request({
|
||||
url: "/hotelBiz/mainScene/quickBookingList",
|
||||
method: "post",
|
||||
data: args,
|
||||
});
|
||||
}
|
||||
90
src/api/home.ts
Normal file
90
src/api/home.ts
Normal file
@@ -0,0 +1,90 @@
|
||||
import { request } from "../utils/request";
|
||||
|
||||
export function submitFeedback(args: any) {
|
||||
return request({
|
||||
url: "/hotelBiz/feedback/submitFeedback",
|
||||
method: "post",
|
||||
data: args,
|
||||
});
|
||||
}
|
||||
|
||||
// 首页tab场景数据
|
||||
export function homeTabsData(args: any) {
|
||||
return request({
|
||||
url: "/hotelBiz/mainScene/queryTagListWithCache",
|
||||
method: "post",
|
||||
data: args,
|
||||
});
|
||||
}
|
||||
|
||||
// 首页tab场景下内容数据
|
||||
export function homeTabContentData(args: any) {
|
||||
return request({
|
||||
url: "/hotelBiz/mainScene/queryContentListWithCache",
|
||||
method: "post",
|
||||
data: args,
|
||||
});
|
||||
}
|
||||
|
||||
// 获取距离用户最近的标签
|
||||
export function getNearbyTags(args: any) {
|
||||
return request({
|
||||
url: "/hotelBiz/mainScene/nearestTag",
|
||||
method: "get",
|
||||
params: args,
|
||||
});
|
||||
}
|
||||
|
||||
// 获取本地天气
|
||||
export function getLocalWeather(args: any) {
|
||||
return request({
|
||||
url: "/hotelBiz/mainScene/getLocalWeather",
|
||||
method: "get",
|
||||
params: args,
|
||||
});
|
||||
}
|
||||
|
||||
// 获取时间公告列表
|
||||
export function getTimeNoticeList(args: any) {
|
||||
return request({
|
||||
url: "/hotelBiz/mainScene/eventList",
|
||||
method: "get",
|
||||
params: args,
|
||||
});
|
||||
}
|
||||
|
||||
// 快速问题列表
|
||||
export function homeQuickQuestionData(args: any) {
|
||||
return request({
|
||||
url: "/hotelBiz/mainScene/queryQuickQuestionListWithCache",
|
||||
method: "post",
|
||||
data: args,
|
||||
});
|
||||
}
|
||||
|
||||
// 主页数据
|
||||
export function mainPageData(args: any) {
|
||||
return request({
|
||||
url: "/hotelBiz/mainScene/mainPageData",
|
||||
method: "post",
|
||||
data: args,
|
||||
});
|
||||
}
|
||||
|
||||
// 快速预订组件
|
||||
export function quickBookingComponent(selectedData: any) {
|
||||
const args = { selectedData: selectedData };
|
||||
return request({
|
||||
url: "/hotelBiz/mainScene/quickBookingComponent",
|
||||
method: "post",
|
||||
data: args,
|
||||
});
|
||||
}
|
||||
|
||||
// 探索发现卡片组件
|
||||
export function discoveryCradComponent() {
|
||||
return request({
|
||||
url: "/hotelBiz/mainScene/discoveryComponent",
|
||||
method: "get",
|
||||
});
|
||||
}
|
||||
55
src/api/login.ts
Normal file
55
src/api/login.ts
Normal file
@@ -0,0 +1,55 @@
|
||||
import { request } from "../utils/request";
|
||||
|
||||
// 获取oauth token
|
||||
export function oauthToken(args: any) {
|
||||
return request({
|
||||
url: "/auth/oauth2/token",
|
||||
method: "post",
|
||||
data: args,
|
||||
});
|
||||
}
|
||||
|
||||
// 绑定用户手机号
|
||||
export function bindUserPhone(args: any) {
|
||||
return request({
|
||||
url: "/hotelBiz/user/bindUserPhone",
|
||||
method: "post",
|
||||
data: args,
|
||||
});
|
||||
}
|
||||
|
||||
// 检测用户是否绑定手机号
|
||||
export function checkUserPhone(args: any) {
|
||||
return request({
|
||||
url: "/hotelBiz/user/checkUserHasBindPhone",
|
||||
method: "get",
|
||||
params: args,
|
||||
});
|
||||
}
|
||||
|
||||
// 获取登录用户手机号
|
||||
export function getLoginUserPhone(args: any) {
|
||||
return request({
|
||||
url: "/hotelBiz/user/getLoginUserPhone",
|
||||
method: "get",
|
||||
params: args,
|
||||
});
|
||||
}
|
||||
|
||||
// 获取服务协议
|
||||
export function getServiceAgreement(args: any) {
|
||||
return request({
|
||||
url: "/hotelBiz/mainScene/serviceAgreement",
|
||||
method: "get",
|
||||
params: args,
|
||||
});
|
||||
}
|
||||
|
||||
// 获取隐私协议
|
||||
export function getPrivacyAgreement(args: any) {
|
||||
return request({
|
||||
url: "/hotelBiz/mainScene/privacyPolicy",
|
||||
method: "get",
|
||||
params: args,
|
||||
});
|
||||
}
|
||||
55
src/api/order.ts
Normal file
55
src/api/order.ts
Normal file
@@ -0,0 +1,55 @@
|
||||
import { request } from "../utils/request";
|
||||
|
||||
// 获取用户订单列表
|
||||
export function userOrderList(args: any) {
|
||||
return request({
|
||||
url: "/hotelBiz/order/userOrderList",
|
||||
method: "post",
|
||||
data: args,
|
||||
});
|
||||
}
|
||||
|
||||
// 获取订单详情
|
||||
export function userOrderDetail(args: any) {
|
||||
return request({
|
||||
url: "/hotelBiz/order/userOrderDetail",
|
||||
method: "post",
|
||||
data: args,
|
||||
});
|
||||
}
|
||||
|
||||
// 预下单
|
||||
export function preOrder(args: any) {
|
||||
return request({
|
||||
url: "/hotelBiz/trade/preOrder",
|
||||
method: "post",
|
||||
data: args,
|
||||
});
|
||||
}
|
||||
|
||||
// 订单取消
|
||||
export function orderCancel(args: any) {
|
||||
return request({
|
||||
url: "/hotelBiz/trade/cancelRefund",
|
||||
method: "post",
|
||||
data: args,
|
||||
});
|
||||
}
|
||||
|
||||
// 申请退款
|
||||
export function orderRefund(args: any) {
|
||||
return request({
|
||||
url: "/hotelBiz/trade/applyRefund",
|
||||
method: "post",
|
||||
data: args,
|
||||
});
|
||||
}
|
||||
|
||||
// 未支付订单立即支付
|
||||
export function orderPayNow(args: any) {
|
||||
return request({
|
||||
url: "/hotelBiz/trade/applyPay",
|
||||
method: "post",
|
||||
data: args,
|
||||
});
|
||||
}
|
||||
0
src/api/quick.ts
Normal file
0
src/api/quick.ts
Normal file
10
src/api/upload.ts
Normal file
10
src/api/upload.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { request } from "../utils/request";
|
||||
|
||||
// 上传文件
|
||||
export function uploadFile(args: any) {
|
||||
return request({
|
||||
url: "/hotelBiz/hotBizCommon/upload",
|
||||
method: "post",
|
||||
data: args,
|
||||
});
|
||||
}
|
||||
36
src/api/workOrder.ts
Normal file
36
src/api/workOrder.ts
Normal file
@@ -0,0 +1,36 @@
|
||||
import { request } from "../utils/request";
|
||||
|
||||
// 获取用户订单列表
|
||||
export function userWorkOrderList(args: any) {
|
||||
return request({
|
||||
url: "/hotelBiz/workOrder/userWorkOrderList",
|
||||
method: "post",
|
||||
data: args,
|
||||
});
|
||||
}
|
||||
|
||||
// 获取工单类型
|
||||
export function workOrderTypeListForBiz() {
|
||||
return request({
|
||||
url: "/hotelBiz/workOrder/workOrderTypeListForBiz",
|
||||
method: "get",
|
||||
});
|
||||
}
|
||||
|
||||
// 创建工单
|
||||
export function createWorkOrder(args: any) {
|
||||
return request({
|
||||
url: "/hotelBiz/workOrder/createWorkOrder",
|
||||
method: "post",
|
||||
data: args,
|
||||
});
|
||||
}
|
||||
|
||||
// 关闭工单
|
||||
export function closeWorkOrder(args: any) {
|
||||
return request({
|
||||
url: "/hotelBiz/workOrder/closeWorkOrder",
|
||||
method: "post",
|
||||
data: args,
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user