更新若干功能

This commit is contained in:
2026-08-20 19:15:41 +08:00
parent 9e7f0fa1b5
commit 00b00e0c95
40 changed files with 1862 additions and 387 deletions

31
api/page/address.js Normal file
View File

@@ -0,0 +1,31 @@
import { get, post } from '../request'
const prefix = 'address/'
export const getAddressListApi = async () => {
return await get(`${prefix}list`)
}
export const getDefaultAddressApi = async () => {
return await get(`${prefix}default-one`)
}
export const getAddressDetailApi = async (id) => {
return await get(`${prefix}detail`, { id })
}
export const createAddressApi = async (params) => {
return await post(`${prefix}create`, params)
}
export const updateAddressApi = async (params) => {
return await post(`${prefix}update`, params)
}
export const deleteAddressApi = async (id) => {
return await post(`${prefix}delete`, { ids: [id] })
}
export const setDefaultAddressApi = async (id) => {
return await post(`${prefix}set-default`, { id })
}

11
api/page/afterSale.js Normal file
View File

@@ -0,0 +1,11 @@
import { get, post } from '../request'
const prefix = 'after-sale/'
export const getAfterSaleListApi = async () => {
return await get(`${prefix}list`)
}
export const createAfterSaleApi = async (params) => {
return await post(`${prefix}create`, params)
}

View File

@@ -48,3 +48,8 @@ export const updateItemApi = async (id, params = {}) => {
...params
})
}
/** 导出清单报价文本/CSV */
export const exportQuoteApi = async (id) => {
return await get(`${prefix}export-quote`, { id })
}

19
api/page/colorcard.js Normal file
View File

@@ -0,0 +1,19 @@
import { get } from '../request'
const prefix = 'colorcard/'
export const getColorcardListApi = async (params = {}) => {
return await get(`${prefix}list`, params)
}
export const getColorcardDetailApi = async (id) => {
return await get(`${prefix}detail`, { id })
}
export const getColorcardClassListApi = async () => {
return await get(`${prefix}class-list`)
}
export const getColorcardCompanyListApi = async () => {
return await get(`${prefix}company-list`)
}

15
api/page/factory.js Normal file
View File

@@ -0,0 +1,15 @@
import { get } from '../request'
const prefix = 'factory/'
export const getFactoryListApi = async (params = {}) => {
return await get(`${prefix}list`, params)
}
export const getFactoryDetailApi = async (id) => {
return await get(`${prefix}detail`, { id })
}
export const getFactoryClassListApi = async () => {
return await get(`${prefix}class-list`)
}

11
api/page/favorite.js Normal file
View File

@@ -0,0 +1,11 @@
import { get, post } from '../request'
const prefix = 'favorite/'
export const getFavoriteListApi = async () => {
return await get(`${prefix}list`)
}
export const toggleFavoriteApi = async (catalogueId) => {
return await post(`${prefix}toggle`, { catalogue_id: catalogueId })
}

11
api/page/feedback.js Normal file
View File

@@ -0,0 +1,11 @@
import { get, post } from '../request'
const prefix = 'feedback/'
export const getFeedbackListApi = async () => {
return await get(`${prefix}list`)
}
export const createFeedbackApi = async (params) => {
return await post(`${prefix}create`, params)
}

View File

@@ -15,3 +15,7 @@ export const updateNickNameApi = async (nick_name) => {
nick_name
})
}
export const getEnterpriseApi = async () => {
return await get(`${prefix}enterprise`)
}