完善茶艺师接口对接

This commit is contained in:
wangxiaowei
2026-01-05 00:39:06 +08:00
parent 237df8d039
commit 39c64a2504
29 changed files with 1204 additions and 651 deletions

View File

@ -1,5 +1,12 @@
import { http } from '@/http/alova'
/**
* 获取已开通城市列表
*/
export function getOpenCityList() {
return http.Post<any>('/teamapi/user/teaStoreCity')
}
/**
* 获取茶艺师列表
*/
@ -32,6 +39,13 @@ 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)
}
/**
* 茶叶商品列表
*/
@ -44,4 +58,43 @@ export function getTeaProducts() {
*/
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})
}