Commit 3b2bb40f by zhuzhequan

改变传参方式

parent cacd6eec
...@@ -2,7 +2,7 @@ import { BasePaginationData, BaseRespData } from '@/types/api' ...@@ -2,7 +2,7 @@ import { BasePaginationData, BaseRespData } from '@/types/api'
import axios from './axios' import axios from './axios'
import { import {
LogListData, LogListData,
OrderData, Refresh, OrderData,
SearchForm, SearchForm,
SendOrderData, SendOrderData,
ShipmentForm, ShipmentForm,
...@@ -137,7 +137,7 @@ export function cancelOrderApi(id: number) { ...@@ -137,7 +137,7 @@ export function cancelOrderApi(id: number) {
) )
} }
export function refreshProductInfo(data: Refresh[]) { export function refreshProductInfo(data: number[]) {
return axios.post<never, BaseRespData<never>>( return axios.post<never, BaseRespData<never>>(
'factory/customJomallOrder/refreshProductInfo', 'factory/customJomallOrder/refreshProductInfo',
data, data,
......
...@@ -16,10 +16,7 @@ export interface Tab { ...@@ -16,10 +16,7 @@ export interface Tab {
quantity: number quantity: number
} }
export interface Refresh {
id: number
}
export interface OrderData { export interface OrderData {
id: number id: number
......
...@@ -799,11 +799,7 @@ const refreshProduct = async () => { ...@@ -799,11 +799,7 @@ const refreshProduct = async () => {
} catch { } catch {
return return
} }
const res = await refreshProductInfo(selection.value.map(el => { const res = await refreshProductInfo(selection.value.map(el =>el.id))
return {
id: el.id,
}
}))
ElMessage({ ElMessage({
message: res.message, message: res.message,
type: 'success', type: 'success',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment