|
@@ -14,7 +14,6 @@ interface IAmount {
|
|
|
export const formatOrderDetail = async (item: any, amount?: IAmount) => {
|
|
|
const type = item.goodType
|
|
|
let tempList: any = {}
|
|
|
-
|
|
|
switch (type) {
|
|
|
case 'PIANO_ROOM':
|
|
|
{
|
|
@@ -57,6 +56,20 @@ export const formatOrderDetail = async (item: any, amount?: IAmount) => {
|
|
|
throw new Error(e.message)
|
|
|
}
|
|
|
break
|
|
|
+ case 'MUSIC':
|
|
|
+ {
|
|
|
+ try {
|
|
|
+ const res = await getMusicDetail(item.bizId)
|
|
|
+ tempList = {
|
|
|
+ orderType: item.goodType,
|
|
|
+ goodName: item.goodName,
|
|
|
+ ...res
|
|
|
+ }
|
|
|
+ } catch (e: any) {
|
|
|
+ throw new Error(e.message)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ break
|
|
|
}
|
|
|
tempList.orderType = type
|
|
|
tempList.goodName = item.goodName
|
|
@@ -83,6 +96,16 @@ export const getVipDetail = async (id: any) => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+// 获取曲目详情
|
|
|
+export const getMusicDetail = async (id: any) => {
|
|
|
+ try {
|
|
|
+ const res = await request.get(`/api-teacher/music/sheet/detail/${id}`)
|
|
|
+ return res.data
|
|
|
+ } catch {
|
|
|
+ throw new Error('获取曲目详情失败')
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
export const tradeOrder = (result: any, callBack?: any) => {
|
|
|
const {
|
|
|
orderNo,
|