129 lines
2.8 KiB
TypeScript
129 lines
2.8 KiB
TypeScript
import { http } from '@/http/alova'
|
|
|
|
/**
|
|
* 获取已开通城市列表
|
|
*/
|
|
export function getOpenCityList() {
|
|
return http.Post<any>('/teamapi/user/teaStoreCity')
|
|
}
|
|
|
|
/**
|
|
* 获取茶艺师列表
|
|
*/
|
|
export interface ITeaSpecialistParams {
|
|
page: number
|
|
size: number
|
|
latitude: number
|
|
longitude: number
|
|
level?: string
|
|
search?: string
|
|
server_type?: string | number // 1到店服务 2上门服务
|
|
status?: string | number // 0可约 1已约 2已取消
|
|
state?: string | number // 0全部 1已约 2不可约
|
|
city_id?: string | number // 城市ID
|
|
}
|
|
|
|
export function getTeaSpecialist(data: ITeaSpecialistParams) {
|
|
return http.Post<any>('/api/Teamaster/teamasterList', data)
|
|
}
|
|
|
|
/**
|
|
* 茶艺师详情
|
|
* @param team_user_id 茶艺师用户ID
|
|
* @param longitude 经度
|
|
* @param latitude 纬度
|
|
*/
|
|
export interface ITeaSpecialistDetailParams {
|
|
team_user_id: number
|
|
longitude: number
|
|
latitude: number
|
|
}
|
|
|
|
export function getTeaSpecialistDetail(data: ITeaSpecialistDetailParams) {
|
|
return http.Post<any>('/api/Teamaster/TeamasterDetails', data)
|
|
}
|
|
|
|
/**
|
|
* 费用明细
|
|
*/
|
|
export function getTeaSpecialistFeeDetails(data) {
|
|
return http.Post<any>('/api/Teamaster/countTeamPrice', data)
|
|
}
|
|
|
|
/**
|
|
* 套餐费用明细
|
|
*/
|
|
export function getPackageTeaSpecialistFeeDetails(data) {
|
|
return http.Post<any>('/api/Teamaster/countGroupTeamPrice', data)
|
|
}
|
|
|
|
/**
|
|
* 茶叶商品列表
|
|
*/
|
|
export function getTeaProducts() {
|
|
return http.Post('/api/Teamaster/LeafList')
|
|
}
|
|
|
|
/**
|
|
* 获取茶艺师优惠券
|
|
*/
|
|
export function getTeaSpecialistCoupons() {
|
|
return http.Post<any>('/api/Teamaster/userCoupon')
|
|
}
|
|
|
|
/**
|
|
* 取消订单
|
|
* @param id 订单ID
|
|
*/
|
|
export function cancelTeaSpecialistOrder(id: number) {
|
|
return http.Post('/api/Teamaster/cancelOrder', {id})
|
|
}
|
|
|
|
/**
|
|
* 删除订单
|
|
* @param 订单ID
|
|
*/
|
|
export function deleteTeaSpecialistOrder(id: number) {
|
|
return http.Post('/api/Teamaster/delOrder', {id})
|
|
}
|
|
|
|
/**
|
|
* 创建续单订单
|
|
*/
|
|
export interface ITeaSpecialistRenewOrder {
|
|
id: Number
|
|
type: Number
|
|
hours: Number
|
|
tea_id: string
|
|
}
|
|
|
|
export function createTeaSpecialistRenewOrder(data: ITeaSpecialistRenewOrder) {
|
|
return http.Post<any>('/api/Teamaster/addTeamRenwOrder', data)
|
|
}
|
|
|
|
/**
|
|
* 申请退款
|
|
* @param id 订单ID
|
|
* @param order_type 固定传10
|
|
*/
|
|
export function applyTeaSpecialistRefund(id: number, order_type: number = 10) {
|
|
return http.Post('/api/Teamaster/TeamRefund', {id, order_type})
|
|
}
|
|
|
|
/**
|
|
* 获取专属圈子标签
|
|
*/
|
|
export function getExclusiveCirclesLabel() {
|
|
return http.Post<any>('/api/Teamaster/teamasterLabel', null,
|
|
{
|
|
meta: { ignoreAuth: true }
|
|
}
|
|
)
|
|
}
|
|
|
|
/**
|
|
* 团体预约茶艺师
|
|
*/
|
|
export function reserveGroupTeaSpecialist(data) {
|
|
return http.Post<any>('/api/user/reservation', data)
|
|
} |